Automate

 View Only
  • 1.  Loop issue with transaction CS01 BOM

    Posted 10-08-2020 05:17
    Hello Community,

    Need your help !
    Trying to upload a Bill of material with transaction CS01 where i have to add line with different item category class : L (items) and T (Text)
    I have already followed existing webinar and tutorial on forum for cs01 and it works perfectly (looping) when the item category L are the same .
    But in my case (excel file attached for example with script) it doesn't works.
    That's why it would be kindly appreciate if you can provide a working script/explanations in order to upload these data correctly
    Many thanks for your attention
    Regards

    ------------------------------
    jerome gaden | [Logistic analyst]
    Atlas Copco Power Tools Distribution N.V. | +33 02.40.80.20.63
    ------------------------------

    Attachment(s)

    xlsx
    CS01.xlsx   158 KB 1 version
    Txr
    CS01_TEST12.Txr   782 KB 1 version


  • 2.  RE: Loop issue with transaction CS01 BOM

    Posted 10-08-2020 08:35
      |   view attached
    Hi Jerome -

    There were a couple of major issues with your script. Firstly, the first line item, item 0010, was completely being ignored.  In your data file, you have the first line on the same row with the Header fields.  But you did not have entering a line item on the header, since the loop started right away, so it was being ignored. I've edited your script so that the first item 0010 is also now being included as part of the Header actions.  I then essentially repeated that line item action and put that in the loop.  It was missing a field so I added that, and also corrected a mismapped text field. 

    Give the attached a try.

    Thank you!

    ------------------------------
    JENNIFER HWANG | SE
    Winshuttle North America
    ------------------------------

    Attachment(s)

    Txr
    CS01_TEST12_WSUpdated.Txr   789 KB 1 version


  • 3.  RE: Loop issue with transaction CS01 BOM

    Posted 10-08-2020 09:42
    Awesome ! Seems easy with experts Thanks !

    ------------------------------
    jerome gaden | [Logistic analyst]
    Atlas Copco Power Tools Distribution N.V. | +33 02.40.80.20.63
    ------------------------------



  • 4.  RE: Loop issue with transaction CS01 BOM

    Employee
    Posted 10-08-2020 08:47
    Hi Jerome, 
    You need an IF condition within the Loop to ensure that both item categories will work.
    Loop (while LoopID = D)  
         IF Item Category = L, then you enter the component information and lastly press on new row insert (ERFA) 
         IFItem Category = T, you enter text information and last press on new row insert (ERFA) 
    End Loop 

    I changed your script and ran a quick test which seemed to work. 
    Please check and update. 

    Looping for Item Category Types



    ------------------------------
    Jayasri Varyani | SE
    Winshuttle North America |
    ------------------------------

    Attachment(s)



  • 5.  RE: Loop issue with transaction CS01 BOM

    Posted 10-08-2020 09:45
    Second one more tricky but equally functionnal, very helpful
    Many thanks both of you for your expertise

    ------------------------------
    jerome gaden | [Logistic analyst]
    Atlas Copco Power Tools Distribution N.V. | +33 02.40.80.20.63
    ------------------------------