Automate

 View Only
  • 1.  Material Additional Data » Descriptions

    Posted 11-28-2019 09:24
      |   view attached
    Hi,

    I need to make a Winshuttle script to add an PT descriotion into a material.

    i use MM02, then I select Basic Data and on top I click on Additional Data. Then in Descriptions tab I want to add or update the PT dexfription of the material.

    I'm ok to delete if exists and then add.

    Any suggestion of how to do this?


    ------------------------------
    Regards,
    Marco Silva
    ------------------------------


  • 2.  RE: Material Additional Data » Descriptions

    Posted 11-29-2019 02:05
    We deleted a language using the material change badi and an if statement where language = PT

    ------------------------------
    Phil Harrison | Business Analyst
    CRODA LTD |
    ------------------------------



  • 3.  RE: Material Additional Data » Descriptions

    Posted 11-29-2019 03:17
      |   view attached
    Hello Marco,

    May be you can try with this script
    In the line 02 instead EN put PT and it will normally add this description in the second line after the first already existing in english

    Best regards


    ------------------------------
    jerome gaden | SAP master data
    Atlas Copco Power Tools Distribution N.V. | +33 02.40.80.20.63
    ------------------------------

    Attachment(s)

    Txr
    MM02_TEXT_EN .Txr   215 KB 1 version


  • 4.  RE: Material Additional Data » Descriptions

    Posted 11-29-2019 05:44
    Hello Jerome,

    Many thanks for your reply. 

    The script works well in debug, just change the script line 91 from EN to PT and was ok.

    Although, in automatic it's not working, I believe because the script is not selecting the MM02 view.

    See pictures attached.

    ------------------------------
    Regards,
    Marco Silva
    ------------------------------



  • 5.  RE: Material Additional Data » Descriptions

    Posted 11-29-2019 05:45
    Hi,

    Sorry, I'm a newbie in Winshuttle :) what's "badi"? 

    Cheers.


    ------------------------------
    Regards,
    Marco Silva
    ------------------------------



  • 6.  RE: Material Additional Data » Descriptions

    Employee
    Posted 12-02-2019 10:53
    Hi Marco

    With any grid in the Material master (and most other objects) that don't have a position or insert new line button, you have two options
    (1) use GUI scripting - Indexed If statements will help you position to a specific line, and Indexed Loops will position you to the first empty line.  For descriptions in multiple languages, use the language code as the index field.
    (2) use a BAPI.  For material master, you can use: BAPI_MATERIAL_SAVEDATA  It will allow you to add, update or delete languages, alternate units of measure, etc., easily.  Am attaching an example, in case you have not seen Direct before - it does an update.  There is also a delete flag in the language table, if you need to delete descriptions.

    There is online training available, with a link from the community site.   If you don't have an account, you can open a support ticket to request one. 


    Hope this helps,
    Sigrid


    ------------------------------
    Sigrid Kok
    pse | Winshuttle North America
    ------------------------------



  • 7.  RE: Material Additional Data » Descriptions

    Posted 12-13-2019 12:22

    Hi,

     

    Many thanks Sigrid. Very useful.

     

    Regards,

    Marco

     



    Aviso: Esta mensagem e eventuais ficheiros anexos poderão conter informação confidencial e / ou privilegiada e destinam-se exclusivamente ao(s) destinatário(s) acima mencionado(s). Se não for o destinatário ou uma pessoa autorizada a receber esta mensagem por Thai Union Group e/ou suas subsidiárias/afiliadas relevantes, não deve usar, copiar ou divulgar esta mensagem ou qualquer informação contida na mesma. Qualquer distribuição, cópia ou divulgação é estritamente proibida. Caso receba, por engano, esta mensagem, desde já agradecemos que nos comunique por E-mail e a apague do sistema. Thai Union Group e/ou suas subsidiárias/afiliadas relevantes não se responsabilizam por quaisquer perdas ou danos resultantes directa ou indirectamente da posse, publicação, uso ou confiança nas informações obtidas, ou quaisquer danos causados por qualquer vírus anexado a esta mensagem.



    Disclaimer: This message and any attachment may contain confidential and/or privileged information and intended solely for the recipient(s) named above. If you are not the addressee or authorized by Thai Union Group and/or its relevant subsidiaries/affiliates to receive this message, you must not use, copy, disclose this message or any information herein. Any other distribution, copying or disclosure is strictly prohibited. If you received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thai Union Group and/or any of its subsidiaries/affiliates will not be liable for any loss or damage arising directly or indirectly from the possession, publication or usage or reliance on information obtained, or any damage caused by any virus attached with this message.