in my automation a cell value of an excel file determines which string to write in SAP.
E.g:
If the cell value is 1200 → type into SAP “ABCD1200”
If the cell value is 1250 → type into SAP “ABCD1200”
If the cell value is 1450 → type into SAP “ABCD1400”
If the cell value is 2650 → type into SAP “XYZ2600”
and so on. I have about 40 different cases.
How would you solve that? I am thinking to use an Excel macro but maybe there is an easier way in Studio.
I am not sure how to do that, I’ll give some detailed info:
these are some of the values to choose from in SAP:
AT1000 Wien
AT1100 Wien
AT1150 Wien
AT1200 Wien
AT1230 Wien
AT1300 Wien
One of those values should be chosen in SAP depending on the cell value (= ZIP code) in excel.
A ZIP code like “1050” should have “AT1000 Wien” as result , a ZIP code of “1180” should have “AT1150 Wien” as result.
If mycellvalue = “1050” orElse mycellvalue = “xxxx” orElse mycellvalue = “xxxx” … Then go to SAP and type AT1000; Else: another if condition with mycellvalue = “yyyy” orElse …
In this way, you are filtering your data and typing in SAP what you need. The issue here is that maybe you are going to have too many conditionals. That’s why I said building a datatable with two columns.