Skip to Content
-1

Repeat target header node of XML based on constant integer in source in sap hci mapping

Jan 11 at 07:18 AM

63

avatar image

Hi All,

I have a scenario where I need to repeat the header node in target structure depending on the constant integer value passed from source. Please help with the Groovy Script Custom Function UDF or Graphical Mapping logic in SAP HCI.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Evgeniy Kolmakov Jan 11 at 12:24 PM
0

Hi Aman!

Just write a simple UDF generating result list containing the number of rows according to number given in input parameter:

Regards, Evgeniy.


Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Evgeniy,

Thanks for the reply.

But, as i am using HCI this UDF will not work as only groovy script can be used in HCI custom functions.

0

Hi Evegeniy,

After some modification in code for groovy its working fine.

Regards,

Aman Raj

0
Sriprasad Shivaram Bhat
Jan 11 at 08:32 AM
1

Hello Aman,

It would be great if you can provide input structure and what you are expecting ( output structure ) instead of putting things in general.

Regards,

Sriprasad Shivaram Bhat

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Sivaram,

Thanks for the reply.

I need to fetch the value field number from the source node and generate the output row node as many times the number.

Like you can see in the diagram, if value node number is 9, target header row should be repeated 9 times.

Regards,

Aman Raj

inputsample.pngoutputsample.png

inputsample.png (2.6 kB)
outputsample.png (18.3 kB)
0