Automate

 View Only
  • 1.  Extending materials to populate classification and characteristics/descriptions

    Posted 11-17-2021 16:15
    Hello,

    I am trying to create a script to upload class and characteristics into existing materials. I am running into an issue where I search for the characteristic and there are multiple search results besides the one I need. For example, I need the characteristic "TYPE" but we also have a characteristic called "MOUNT TYPE" that is returned from the search in SAP. I know we can use the IF FIRST function but that will only work if the desired result is first on the list. Does anyone know of a work around for this?

    Much appreciated.
    Matt

    ------------------------------
    Matt Dunlap | Data Steward
    Dairy Farmers of America, Inc. | 8168636217
    ------------------------------


  • 2.  RE: Extending materials to populate classification and characteristics/descriptions

    Posted 11-18-2021 04:13
    Hi Matt,

    adding/changing classification and Charateristics is a tricky action in SAP to do with transaction scripts.
    I would suggest to use a direct script with BAPI.
    F.e. use BAPI_OBJCL_Create and BAPI_OBJCL_Change  for creating and changing the classification of a material.

    Kind Regards

    ------------------------------
    Jan van Asseldonk | Consultant
    CTAC | +31629078169
    ------------------------------



  • 3.  RE: Extending materials to populate classification and characteristics/descriptions

    Posted 12-30-2021 13:53
    If there are mass materials say 100-1000 needs classification updated,This process seems to be cumbersome. Can we have flat excel instead of H and D.

    ------------------------------
    Jeeju Karayate | PLM Consultant
    Sullair | 2192624309
    ------------------------------



  • 4.  RE: Extending materials to populate classification and characteristics/descriptions

    Employee
    Posted 11-18-2021 07:52
    Hi Matt,

    Would agree with Jan.  Given the characteristic name, which is actually the language specific description of the characteristic, I would use a BAPI.  It leverages the characteristic field name.   

    The BAPI Jan mentioned would work.  If you're on a newer version of the Winshuttle Function Module, 20+, you can also use a new remote-enabled function module that is part of it: /WINSHTLQ/TRN_MT_CLASIFICATION

    Overall characteristic options were covered in this Wuginar: https://www.winshuttle.com/assets/webinar-how-to-automate-class-characteristics-in-studio/ to both extract and load characteristics, and it included the new Function Module. /WINSHTLQ/TRN_MT_CLASIFICATION

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------



  • 5.  RE: Extending materials to populate classification and characteristics/descriptions

    Posted 11-18-2021 07:54
    For the script I created to update classifications I have a column for each classification and the script has an If statement that if under each specific column if the row is populated then that characteristic is meant to be updated. For each column the If statement is searching for the name of the characteristic in the column which allows for the correct attribute to be selected and then it loads the data. 

    2 disadvantages are that if you add more characteristics you have to add additional If statements and a column for the new characteristics, also if you have lots of characteristics the script can be really wide. 


    ------------------------------
    Chanelle West | Senior Data Governance Analyst
    HD Supply | 678-653-0586
    ------------------------------



  • 6.  RE: Extending materials to populate classification and characteristics/descriptions

    Employee
    Posted 11-18-2021 20:21
    Hi again Matt,

    The standard BAPI BAPI_OBJCL_CHANGE has separate tables for the different data types of a characteristic, but if your characteristics are CHAR or NUM, then you can load both as CHAR.  If you have a DATE, then you'll have to use the numeric table and use it to load date char values.  Simple example attached that load CHAR and NUM as CHAR, and it works fine. 

    Note you  will use the characteristic field name, not the description, which is unique, and there is no worry about positioning to the right place with the BAPI.

    FYI
    Sigrid

    ------------------------------
    Sigrid Kok
    PSE | Winshuttle NA
    ------------------------------