Automate

Welcome to the Automate community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Here are some useful links where you can find more information:

Product Announcements

 View Only
  • 1.  Tips script J7L2 - update qty of packaging assignment

    Posted 9 days ago

    Hi all, 

    I've been struggling with a script for T-code J7L2 (Change REA Articles). The updates we want to do with the script is adjust the Quantity of the packaging assignment. The different pack.assignments are listed in a table. With the binoculars I can look for the specific packaging assignment to select the right row. Then the details of the selected row appear below the table and can be updated (MENG, MEINS, VPEBENE)--> fields in blue. When recording the script in Standard non-batch mode, the script doesn't capture these fields that I update. The fields in red are greyed out during recording.


    When I create a script in batch mode, I have no option (that I know of) to select the right packaging assignment in the table and if I want to update multiple lines, I would get a lot of different columns in my template. 

    Anyone has experience with this and willing to share tips?

    Thanks a lot

    Petra van Houwelingen

    AkzoNobel



    ------------------------------
    Petra van Houwelingen
    Akzo Nobel Coatings Inc.
    ------------------------------


  • 2.  RE: Tips script J7L2 - update qty of packaging assignment

    Employee
    Posted 9 days ago

    Hi Petra,

    What you're seeing is expected for J7L2. The packaging assignment list isn't a classic SAP screen table; it's an SAP grid/tree control. Batch and Standard (non-batch) recording can only capture classic screen fields, so anything inside the control isn't recorded. That includes the binoculars search, the row selection, the Detail buttons and the quantity/unit/level fields underneath. It's also why those buttons are greyed out while you record.

    The way around it is to record the script in GUI Scripting mode:

    Make sure SAP GUI scripting is enabled, both on the SAP server (your Basis team can check parameter sapgui/user_scripting) and in your SAP GUI options.
    Record J7L2 in GUI Scripting mode. Open the article, use the binoculars to find the packaging assignment, select the row, update quantity, unit and level, then save.
    In the mapper, map the article number, the packaging assignment number (the value you search for) and the new quantity, unit and level to columns in your data file.
    To update several assignments, use one row per article and packaging assignment in your template rather than extra columns. The script repeats the find-and-update for each row, so the template stays small even with many lines.

    Test it on a few rows first, including one near the bottom of the list, to confirm the search always picks the right line.

    One thing to be aware of: GUI Scripting scripts drive the SAP GUI screen, so they're slower than batch scripts and need a visible SAP GUI session while they run. If speed matters, it's also worth asking your SAP team whether a BAPI or function module exists for updating REA packaging assignments. A script built on that would avoid the screen entirely.

    Precisely's article on recording ALV grids covers the GUI Scripting requirement: https://customer.precisely.com/s/article/Can-t-record-a-Z-transaction-that-have-an-editable-ALV-Grid-360032166672

    Hope this helps!

    Thanks



    ------------------------------
    jagat kaushal
    *Precisely Software Inc.
    ------------------------------



  • 3.  RE: Tips script J7L2 - update qty of packaging assignment

    Posted 8 days ago

    Hi Jagat,

    Thanks a lot for this detailed answer, really appreciated. I will go and check with our SAP Team internally for the best solution.

    Thanks,

    Petra van Houwelingen
    Akzo Nobel Coatings Inc.



    ------------------------------
    Petra van Houwelingen
    Akzo Nobel Coatings Inc.
    ------------------------------



  • 4.  RE: Tips script J7L2 - update qty of packaging assignment

    Employee
    Posted 8 days ago

    Hi Petra,

    Thanks for your kind words.

    Kind regards



    ------------------------------
    jagat kaushal
    *Precisely Software Inc.
    ------------------------------