How to pick up a value in Excel that has been created in SAP and returned in the log message in Excel to use it as an upload value for another script?
Excel,Transaction,Query, Runner, Studio
In the example below you will find the steps to follow to use the Concatenate function in Excel to pick up a value showing in the log message returned from SAP. This could apply to anything from PO number to material number to financial document number. The goal here, is to isolate the number in the message so that the value can be used as an upload value in a different script. This is particularly good for linked scripts when, for example, the first script creates a PO number then the second script needs to change that PO number that has just been created.
Say, you have a script which creates PO in SAP. When the PO is created in SAP via transaction the following message is received in the log message in Excel:
1- Select the first line of the message where it says Standard PO xxxxxxxx
2- Click 'fx' in Excel
- Select Text as a category – then select function MID
- In 'Text' will be the column where the log is returned
- 'Start_num' is the number of characters before the value so here it would be:
Standard PO (you need to count both spaces as characters too)
- 'Num_chars' is the number of characters in the PO number:
Once the formula is complete the log now transforms the message into a value that can be picked up as an upload one.