on 07-05-2022 8:57 AM
Dear All,
We have a requirement to build query based on the fields (Cloumn,operator,values) and generate value for the Text field as shown in the below screenshot.
For each query line item, we should add "AND" at the end and values should be populated in single quotes.
Mapping
Output
Input
<?xml version="1.0" encoding="UTF-8"?>
<root>
<query>
<column>BUKRS</column>
<operator>EQ</operator>
<values>9370</values>
</query>
<query>
<column>BUDAT</column>
<operator>LIKE</operator>
<values>202206%</values>
</query>
<query>
<column>BLDAT</column>
<operator>LIKE</operator>
<values>202206%</values>
</query>
<query>
<column>XBLENR</column>
<operator>LIKE</operator>
<values>4530</values>
</query>
</root>
Expected Output
<?xml version="1.0" encoding="UTF-8"?>
<root>
<options>
<Text>BUKRS EQ '9370' AND</Text>
</options>
<options>
<Text>BUDAT LIKE '202206%' AND</Text>
</options>
<options>
<Text>BLDAT LIKE '202206%' AND</Text>
</options>
<options>
<Text>XBLENR LIKE '4530'</Text>
</options>
</root>
Please help me to achieve this requirement.
Thanks in advance.
Regards
Revathi CH
Hi!
I would put count(query) to the variable and check if the index() of current "query" item is equal to the stored value.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.