Automate

 View Only
  • 1.  Tip of the Week - Using Transaction to DOWNLOAD long text

    Employee
    Posted 07-22-2025 10:09
    Edited by Tammy Lake 07-22-2025 12:43
      |   view attached

    Managing SAP long text associated with both master and transactional data can sometimes be tough. Fortunately, Studio offers a solution to make this easier.

     

    In today's tip, let's talk about material master long text.  I'll show you how to create a Transaction script to download existing material text to Excel.

     

    First, start by creating an Excel template that will allow users to review/update material master long text.  In this use case, we will give the users the ability to interact with the Basic Data Text, Purchase Order Text, Internal Note, and Inspection Text fields - Example Excel file is attached.

     

     

     

     

    Create a Transaction script to download existing material text to Excel.  Steps:

    1. File, New
    2. Transaction
    3. Create from SAP Recording

     

     

     

    • Log in to a non-production SAP system

     

    1. Enter MM02 in the Transaction Code field
    2. Click Start Recording
      1. Note:  You can select an existing data file if you have one you want to use.

     

     

    We will be adding long text from within Studio, so it is not necessary to go to the long text screens in the MM02 transaction.  The only steps to be completed during the recording are enter a material number, deselect default views, and exit SAP.

     

    Steps:

    1. Enter a material number
    2. Click Continue

     

     

     

     

     

     

    1. Click Deselect All to remove default view selections
    2. Click the check box next to Basic Data 1
    3. Click the green check to open MM02

     

     

     

     

    • It is not necessary to enter any data in the screen, simply click Save to stop the recording.

     

     

     

    • Studio returns the steps to the Map screen.
    • In the Map screen, click Add Long Text

     

     

     

    • Click the checkbox next to each long text type you would like to add to your workbook and then click OK

     

     

     

     

     

    • For each long text type, there will be three rows added to your script:
      • Material Number
      • Long Text
      • Language

     

     

     

    • Mapping Long Text
      • Material number, you only need to have the material number listed in one column.
        • Map to the material number column for each long text type
      • Long Text - The mapping direction for the long text will need to be download
      • Language - You can have language in your Excel file or you can use a fixed value for each long text type.  For example, "E".

     

     

     

    • Now you are ready to download the long text data to your Excel file.
      • Note, when using Transaction to download material long text (or other material-related data), you must provide the material number to return data for that material.  Example below:

     

     

    • Go to the Run tab and click Test to see the data.

     

     

     

    • Deploy as normal.
    • Sample Transaction script and Excel template are attached.
    • Stay tuned for more future long text tips on how to write If Statements to update specific data.

    NOTE:  For a list of transactions that support the long text feature, go here:  Welcome to the Precisely Help Center

    Precisely remove preview
    Welcome to the Precisely Help Center
    View this on Precisely >



    ------------------------------
    Tammy Lake
    Principal Sales Engineer
    *Precisely Software Inc.
    ------------------------------

    Attachment(s)

    zip
    Materials_Long_Text.zip   304 KB 1 version


  • 2.  RE: Tip of the Week - Using Transaction to DOWNLOAD long text

    Posted 07-23-2025 06:03

    Many thanks Tamy for this tuto.

    Has anyone ever made a script to edit customer texts? I'm having trouble with the editor.



    ------------------------------
    Anne-Claude Barbary
    BI & CRM Manager
    Sorin CRM S.A.S
    ------------------------------



  • 3.  RE: Tip of the Week - Using Transaction to DOWNLOAD long text

    Posted 07-25-2025 12:46

    Hi Anne-Claude,

    We currently use FM /WINSHTLQ/TRN_CREATE_TEXT to update any type of long text (Customer, Material, Vendor, etc.). There is a helpful guide for it listed here: https://help.precisely.com/r/n/Automate-Function-Module/pub/Latest/en-US/Automate-Function-Module/WINSHTLQ/TRN_CREATE_TEXT?tocId=h0Bw9XpdwC1gankkH3D_YA

    Hope this can help you.

    Thanks



    ------------------------------
    Knavis McGowan
    Winshuttle Developer
    ABBOTT RAPID DX INTERNATIONAL LIMITED
    FL
    ------------------------------



  • 4.  RE: Tip of the Week - Using Transaction to DOWNLOAD long text

    Posted 09-15-2025 21:54
    Edited by Jesse Dytioco 09-15-2025 21:54
      |   view attached

    Thank you, Tammy for this tip and detailed steps. I was trying to do it for notifications (IW22), but unable to download. Instead, when I execute, the long text is overwritten with blank, even if the mapping of the field is set to Download. I attach the script, not sure what is wrong.



    ------------------------------
    Jesse Dytioco
    ------------------------------

    Attachment(s)



  • 5.  RE: Tip of the Week - Using Transaction to DOWNLOAD long text

    Employee
    Posted 09-19-2025 19:06

    Hi Jesse

    It looks like you recorded the long text.  That's something you don't need to do for the Function Module long text that Tammy described above.

    Please try disabling line 5 with the long text, which is set to fixed and blank, which explains why it's blanking it out. 

    To use the the Function Module, which added rows  6-8, namely row 7 with the Long Text - Long text on PM notification, all you have to record is opening the object - in this case the PM notification in IW22.

    Best Regards,

    Sigrid



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