cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member241350
Participant
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor
0 Kudos

Hi Aman!

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

Regards, Evgeniy.

former_member241350
Participant
0 Kudos

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.

former_member241350
Participant
0 Kudos

Hi Evegeniy,

After some modification in code for groovy its working fine.

Regards,

Aman Raj

Answers (1)

Answers (1)

Sriprasadsbhat
Active Contributor

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

former_member241350
Participant
0 Kudos

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