Automate

 View Only
  • 1.  Looking for help with CL20N

    Posted 07-23-2025 15:58

    I am trying to create a script to add classification to customer records.  Have 2 different class I am trying to add with multiple characteristic values.  I am able to run in debug but when I test it, I am getting error messages.  I am attaching the script and data file.  Anyone have success with a similar scenario?



    ------------------------------
    Kevin Simard
    Manager, IT COE - Global Master Data Integration
    Kraft-Heinz
    Warrendale PA
    ------------------------------

    Attachment(s)

    Txr
    CL20N_20250714_142655.Txr   278 KB 1 version


  • 2.  RE: Looking for help with CL20N

    Employee
    Posted 07-24-2025 14:49

    Hi Kevin

    One trick with multi-value characteristics is to provide a semi-colon separated list of values.  You can try it in the GUI and see:

    becomes this after you hit enter:

    I used that in MM02 for material class assignments, but it should work for CL02N and other class types:

    for the first material, it will add all of the values in the semi-colon list, even if some exist already.

    the second material if you specify the characteristic twice, it will just overwrite the first value, so you'd end up with "234" without the 123.

    Does that help?

    Best Regards,

    Sigrid



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------



  • 3.  RE: Looking for help with CL20N

    Posted 07-24-2025 16:30

    I may not have explained it correctly.  What I am trying to script is adding 2 Classes and then assigning characteristics values within those classes.  In the screenshot below, I want to add the 2 "Z" classes then assign values for Global banner and customer parent



    ------------------------------
    Kevin Simard
    Manager, IT COE - Global Master Data Integration
    Kraft-Heinz
    Warrendale PA
    ------------------------------



  • 4.  RE: Looking for help with CL20N

    Employee
    Posted 07-24-2025 18:38
    Edited by Sigrid Kok 07-24-2025 18:39

    Hi Kevin

    Sorry I missed that. 

    If we can assume the customer will have no classes assigned when this starts, your script looks to be sound.

    Please try checking the Start SAP GUI on the run tab and try again. The "N" versions of transactions like CL20N or CJ20N or ME21N or ME51N, etc, or what SAP calls the "Enjoy" transactions, often need this option checked. 

    Best Regards,

    Sigrid



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------



  • 5.  RE: Looking for help with CL20N

    Posted 07-25-2025 08:40

    Hi Sigrid,  Thank you for the suggestion.  I have tried that and it is still not working.  Does support cover script issues?  Would I be able to open a ticket for this?



    ------------------------------
    Kevin Simard
    Manager, IT COE - Global Master Data Integration
    Kraft-Heinz
    Warrendale PA
    ------------------------------



  • 6.  RE: Looking for help with CL20N

    Employee
    Posted 07-28-2025 17:20
      |   view attached

    Hi Kevin

    Yes, you could open a support ticket if you have tried to create a script and can't figure out why it's not working.

    I had a bit more time and took a closer look.  I see you had a characteristic with the header and then another section outside of the loop that were doing the same thing so cleaned that part up. I'm only using columns E and F - E for characteristic description and F for characteristic value description (This is the description not the Code, ex: if Blue is the description and BL is the value -> enter blue or Blue or BLUE. 

    I moved the loop ID next to the data - just a preference.

    I also had to look at the transaction behavior, because the first row has one behavior and the rest another.  For the first time through the tcode when you login to SAP, you will see the below screens:

    the above is what you had in the script.  

    But all other rows will allow you to enter the customer on the first screen and will complain if you don't, and defaults the class type to what you had for the first row - thus you can enter customer number right away, like this:

    The IF looks like this:

    It works for me if I am using the same class type.  If you switch class types, this will break because it will prompt for material number or something else.

    The best way to see the above is to run two rows in DEBUG mode.  You will see the differences.

    See attached script with changes. Hope this helps.

    Best Regards

    Sigrid



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------

    Attachment(s)

    Txr
    CL20N_20250714_142655_SK.Txr   402 KB 1 version


  • 7.  RE: Looking for help with CL20N

    Posted 08-13-2025 09:57

    Kevin,

    You could try using the RFM /WINSHTLQ/TRN_MT_CLASSIFICATION here.

    It is supposed to work for all classifications.  I recently tested it for adding vendor classifications and it worked perfectly.  I haven't tried multi-value characteristics but the screenshots show that it should.

    I hope this helps.

    Andrew



    ------------------------------
    Andrew Landry
    Leprino Foods Company
    CO
    ------------------------------



  • 8.  RE: Looking for help with CL20N

    Employee
    Posted 08-13-2025 10:11

    Thanks, Andrew. 

    If there's interest in using the custom function module Andrew mentioned, you can view this educational webinar: https://preciselyu.precisely.com/automate-studio-webinars/2274767/scorm/1rs85638v2du9

    It was created several years ago, but it's still relevant.

    It covered a number of approaches, including the custom FM.

    Best Regards,

    Sigrid



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------