Automate

 View Only
  • 1.  spaces in basic data long text loop BAPI_MATERIAL_SAVE

    Posted 03-30-2020 19:17

    Hello, I am using the BAPI_MATERIAL_SAVE data to add basic data long text with a loop. When it starts the next line with the loop it is adding an extra space. So if a word happens to be in the middle of the 72 character limit for the row it will have a space in it. Any ideas on how to not have a space? I removed the padding from the entry, I also tried to see if it was a 73 character limit and that did the same thing.

    Thanks,
    Derek



    ------------------------------
    Derek Sayres | SAP PLM/MDM Business Analyst
    ------------------------------


  • 2.  RE: spaces in basic data long text loop BAPI_MATERIAL_SAVE

    Employee
    Posted 03-31-2020 10:04
    Hi Derek
    The BAPI is a great way to load/maintain materials, except for long text, as you have found.   You'd either have to use macros, or something like that, to split up the text properly - or - you can use the long text feature in Transaction and then chain the scripts together.
    In order to do so, simply record a script to update a material and choose any view, like Basic Data 1.  Then exit.  When you finish on the map tab, choose to add long text feature and then select the long text you want to either download or upload.  Each one will  require at least the material number, and possibly data like plant and sales area, and language code, depending on which text you want to maintain.  You can pass the text up as one long string.
    Best Regards,
    Sigrid

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



  • 3.  RE: spaces in basic data long text loop BAPI_MATERIAL_SAVE

    Employee
    Posted 03-31-2020 10:06
    Hey Derek,

    I hope you're staying safe and well! Can you let me know which version of Winshuttle is on your machine and which version of the Winshuttle Function Module is on your system? Adding Basic Data Long Text in Winshuttle Studio is a built in feature that doesn't have the 72 character limit, so you could upload the text directly.

    Check out this article to see how to do that: https://winshuttle-help.s3.amazonaws.com/studio/en/central-sap/help/12/Record-long-text.htm

    ------------------------------
    James Lofgren | Solutions Engineer
    Winshuttle North America | [City] |
    ------------------------------



  • 4.  RE: spaces in basic data long text loop BAPI_MATERIAL_SAVE

    Posted 03-31-2020 16:15
    Hi Sigrid and James,

    thanks for the replies.

    I am using version 12.1. The BAPI I am using is also changing several other fields in the material master.


    I see the 264 limit in the BAPI_MATERIAL_SAVE. However, when I had 264 characters in Excel it cut off at 131 characters.

    I did try the Long Text feature in Transaction, very easy to set up and it works really well for getting the text loaded, but I do miss the overall speed of the BAPI.

    Thanks again and be well,
    Derek


    ------------------------------
    Derek Sayres | SAP PLM Business Analyst
    ------------------------------



  • 5.  RE: spaces in basic data long text loop BAPI_MATERIAL_SAVE

    Employee
    Posted 03-31-2020 18:48
    Hi again Derek,

    Agree a BAPI is faster.  :)  For long text, though, I would use the transaction script and then chain the BAPI, which updates other things, with the transaction script for long text.

    Best Regards,
    Sigrid

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