Automate

 View Only
  • 1.  FIRS TRANSACTION and NOT FIRST TRANSACTION not visible in If condition

    Posted 02-09-2022 10:39
    Hi ,

    I am trying to run one line of code only during the first iteration of the loop , but i do not get the option for First transaction . Not sure what is missing . 

    I am running on studio 12.1

    ------------------------------
    vag vignesh Shenoy |
    ------------------------------


  • 2.  RE: FIRS TRANSACTION and NOT FIRST TRANSACTION not visible in If condition

    Employee
    Posted 02-10-2022 08:52
    Hi Vag, 

    If FIRST or NOT FIRST is only available outside of a loop.  It's meant for things like a pop-up for company code in a journal entry, for example.  It's not meant for IF FIRST ROW in a loop.

    If you can please explain what you're trying to do, we may be able to think of another way, as there are a lot of creative people in this community.

    Please let us know,
    Sigrid

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



  • 3.  RE: FIRS TRANSACTION and NOT FIRST TRANSACTION not visible in If condition

    Posted 02-10-2022 09:33
    Hi Sigrid,

    I am running FBS1 and there is a Calculate Tax check available for the first iteration and for the next items it is not available. How do i handle this situation ??

    ------------------------------
    vag vignesh Shenoy |
    ------------------------------



  • 4.  RE: FIRS TRANSACTION and NOT FIRST TRANSACTION not visible in If condition

    Employee
    Posted 02-10-2022 09:50
    Hi Vag

    There's a checkbox for that, right?   You could use an IF statement if "X" then run that part, otherwise it will skip it.



    Simple example attached.

    Hope that works for you.
    Sigrid

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

    Attachment(s)

    xlsx
    FBS1_20220210_064542.xlsx   5 KB 1 version
    Txr
    FBS1_20220210_064542.Txr   378 KB 1 version


  • 5.  RE: FIRS TRANSACTION and NOT FIRST TRANSACTION not visible in If condition

    Posted 02-10-2022 09:59
    Hi Sigrid ,

    Actually i have defaulted the value and have not provided this field in the Template . Is there any way to perform this without giving the field in the template ??

    ------------------------------
    vag vignesh Shenoy |
    ------------------------------



  • 6.  RE: FIRS TRANSACTION and NOT FIRST TRANSACTION not visible in If condition

    Employee
    Posted 02-10-2022 12:20
    Hi Vag

    You have to have something to key off of for the IF statement.  If not the calculate tax value, then something else creatively.

    For example, you could maybe use line items with formulas - not the document item number but a line number in the excel file that isn't uploaded but in the template somewhere - if header row make it zero, and the lines will all be 1,2,3,etc.  You could say IF line number = 1 then calculate tax.

    Another option may be a BAPI where you don't have changing screens like this tcode. 

    FYI,
    Sigrid

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



  • 7.  RE: FIRS TRANSACTION and NOT FIRST TRANSACTION not visible in If condition

    Employee
    Posted 02-11-2022 09:32
    Hi Vag,

    Last nite I thought of another approach.  Record the first row to go with the header line.  There you can hardcode the calculate tax.  Then record a 2nd row, and put that in the loop.

    Template - first row on header line,  rest in the loop, both mapped to the same columns - like below - K-O

    In script first row is outside loop with hardcoded calc tax

    Inside loop - no calc tax


    I hope that will work better.  Quick example attached.

    Sigrid

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

    Attachment(s)