cancel
Showing results for 
Search instead for 
Did you mean: 

Structural Conversions in SAP PI

former_member183908
Active Contributor
0 Kudos

Hi,

I need quick help on converting source node CONTACT_DETAILS to target

CONTACT_DETAILS.When ever CONTACT_EMAIL element exists in the node with multiple email Id separated by ; then I need to create 3 target CONTACT_DETAILS with same other element values.My udf is not working as expected.

Appreciate for any help in this regard.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

manoj_khavatkopp
Active Contributor

Pavan ,

Try this UDF: You may need to apply split by value after this as per your requirement.

Exec Type:All value of context
String inp[] = var1[0].split(";"); 
for(int i=0;i<inp.length;i++) 
result.addValue(inp[i]);

Br,

Manoj

former_member183908
Active Contributor
0 Kudos

Hi Manoj,

Thanks for the reply.I suppose my query was not so clear.Let me explain.I have two CONTACT_DETAILS nodes in the source message in which 1 occurence does not have CONTACT_EMAIL element where as 2nd occurnece is having CONTACT_EMAIL with multiple emails Ids with ; as a delimiter.First CONTACT_DETAILS should be passed AS IS to target since my target strucuture is also AS IS.However 2nd CONTACT_DETAILS has to be repeated 3 times at target side based on CONTACT_EMAIL value with corresponding other field values.My UDF is splitting emails and using USEONEASMANY i can only able to repeat but not obtaining desired output.Hope this explains better to help me out with a solution 🙂

Cheers

Pavan