#SAPGYAN : Append Query Output in Local Variable in SAP MII
Hi Friends,
Hope you all are doing great and having a great time as well.
I just got one scenario in mii to get a column output in one variable comma separate. So will talk about it today.
Those who doesn't understand the scenario till now will give an example here.
SQL query : Select ITEM from ITEM will return only one column with ITEM's.
ITEM |
---|
MAT1 |
MAT2 |
MAT3 |
We need to append these table formatted ITEM value into one local variable (" , " separated).
So how do we achieve this:
Solution:
1. Create a fixed query and save it with the some name.
2. Create a transaction and load query template into the transaction.
3. Put repeater on the query till row.
4. Create a local variable name appendString type string only.
5. In assignment action block assign appendString to appendString and query output.
6. It will give one extra comma at the beginning (like ,MAT1,MAT2)we need to get only the string right using stringright function in sap mii.
7. Trace local variable using tracer.
this will append column value in one variable. And output will like MAT1,MAT2
Hope you get the solution. let me know in case of any doubt in this.
Waiting for your comments.
Thanks,
Ankit Gupta
Comments
Post a Comment