Automate

 View Only
  • 1.  IF Statement: Reading from excel Word Format

    Posted 06-02-2020 09:41
    Hi, 

    I am trying to use IF case in the following scenario and it does not work. Any suggestions how this issue maybe overcome: 

    So I am having in the Excel sheet written country codes - one code two letters( Example: Finland - FI )
    The IF Statement required, for certain countries to do one changes for other countries others. (Example for FI we are doing A Scenario, for the SE - B scenario.)
    My vision is for the Script firstly to take first line check country code and regarding result make A or B scenario. 

    For this I had used : If ( Column D <> SE ) Then .......
    Additionally I had tried to work with  If ( Column D <> 'SE' ) Then ....... 

    Also change text format in the excel sheet, but it does not work. Or to take not text but to align two columns.

    Any suggestions, how to make this work. This is simple example, mine is more complex one, but I am trying to understand how to work with text in the excel. 

    Additionally the text is not added in the SAP it would be used later on. The mapped excel column appeared as: If column

    Thank you. 

    BR,
    Aneta

    ------------------------------
    Aneta Akelan |
    Metso Oy |
    ------------------------------


  • 2.  RE: IF Statement: Reading from excel Word Format

    Posted 06-03-2020 02:33
    UPDATE:
    Ok it seems, that if we are using one parameter it works, but if we are using more when one with OR it does not work. What can be the issue?

    ------------------------------
    Aneta Akelan |
    Metso Oy |
    ------------------------------



  • 3.  RE: IF Statement: Reading from excel Word Format

    Posted 06-03-2020 08:50
    Hi Aneta,
    You will want to break up the statement. I have included a screenshot from one of our order creation (VA01) scripts. I also have similar scenarios in material master (MM01) scripts. 

    Sales Org. defaulted based on customer country


    ------------------------------
    Vanessa Kutasi | Application Analyst II
    IDEXX | New England WUG Leader
    ------------------------------



  • 4.  RE: IF Statement: Reading from excel Word Format

    Posted 06-03-2020 09:22
    Hi Vanessa, 

    yes today did it this way and it works. But of course not looks enormous. :)

    Thank you for your feedback. 

    Best regards, 
    Aneta

    ------------------------------
    Aneta Akelan |
    Metso Oy |
    ------------------------------



  • 5.  RE: IF Statement: Reading from excel Word Format

    Posted 06-03-2020 08:52
    I think you need to use double quotes. e.g. "SE"

    Thank you,
    Jack McGarry | Sr. Business Systems Analyst – SAP Finance | Airgas, an Air Liquide company
    610-781-1199 (Home Office/Cell) | jack.mcgarry@airgas.com 
    Find it with us, anytime, anywhere at Airgas.com