Automate

 View Only
  • 1.  CA01 Rounting issue with loop

    Posted 02-15-2021 11:54
    Hello Te@m, 

    Need your lights/support in order to fix or correct my script issue for upload routing with transaction CA01.

    My issue is coming from the fact that i have a specific control key value that should may be trigger the necessity to have a second loop into the first one and i'm stuck how to handle that for this transaction.

    Each time i have the control key ZSUB it suppose to fill information about subcontracting for the material linked with informations regarding purchase info record, price , unit, currency etc...

    I have followed the tutorial about loop inside existing loop with others transactions ME21N, VA02, VK11 but i'm not able to transpose it to my needs.

    Could we handle that with a simple loop or should we have to insert another into the first one for this transaction ca01 ?

    You will find attached the scripts and the template with sap screenshot

    Many thanks for your support

    Best regards

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

    Attachment(s)

    Txr
    CA01_TEST.Txr   168 KB 1 version
    xlsx
    Routing1.xlsx   410 KB 1 version
    Txr
    CA01_6120.Txr   117 KB 1 version


  • 2.  RE: CA01 Rounting issue with loop

    Employee
    Posted 02-15-2021 18:44
    Hi Jerome

    Not my area of expertise. 

    I did take a look at your scripts and didn't see the additional fields of setup and operational time.  If it's always those 2 fields you're entering that are additional inputs with control key ZSUB, then it's likely just recording the extra screens/fields and using an IF statement around the extra portion to only run if ZSUB.

    Say control key is mapped to column F, in the IF statement use if column F is equal to ZSUB.  This is an example - not of the screen with extra input fields because again you don't have them in your script, but what the IF might look like:

    HTH a little,
    Sigrid

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



  • 3.  RE: CA01 Rounting issue with loop

    Posted 02-16-2021 12:49
    Hello Sigrid 

    Thanks for your lights but i'm still stuck

    Please find hereafter new script with the relevant field, but the issue is still the same with the value that trigger an error message due to subcontracting value to fill in.

    Many thanks for your time

    Best regards


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

    Attachment(s)

    Txr
    CA01_6120_TEST.Txr   130 KB 1 version
    xlsx
    Book1.xlsx   5 KB 1 version


  • 4.  RE: CA01 Rounting issue with loop

    Posted 02-16-2021 13:03
      |   view attached
    Following your advise with if condition ...

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

    Attachment(s)

    Txr
    CA01_6120_TEST3.Txr   132 KB 1 version


  • 5.  RE: CA01 Rounting issue with loop

    Employee
    Posted 02-16-2021 16:03
      |   view attached
    Hi Jerome

    A couple of suggestions
    (1) inside the loop at the top, add an insert line.  You want to always enter the operation on row 2, which becomes available when you click insert line 
    which gives you an extra screen with the insert line OK code
    (2) upload the operations number, so that your operations are in the order you want them

    (3) I believe you had an IF statement around a hard-coded operation 9999 - NOT the subcontracting fields.  It should look something like this - note I haven't tried it because I don't have any data handy to try it

    (4) I got rid of the 9999 line that was hard coded after that part.

    My adjustments are attached. 

    Hope this helps.

    Sigrid


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

    Attachment(s)

    Txr
    CA01_6120_TEST3_SK.Txr   151 KB 1 version