I have a requirement where for a specific E1EDKT1 TDID value, I need to concatenate the multiple E1EDKT2 TDLINEs into one Target field defined as a String. The target field is defined as:
<xsd:element minOccurs="0" maxOccurs="1" name="Comments" type="xsd:string" />
I need to select the correct set of TDLINES and either Loop thru them to concatenate them together, or concatenate them to the target field. I've looked as using a variable, but I'm not sure if this will work.
Sender data looks like:
<E1EDKT1 SEGMENT="1"> <TDID>0102</TDID> <TSSPRAS>E</TSSPRAS> <TSSPRAS_ISO>EN</TSSPRAS_ISO> <E1EDKT2 SEGMENT="1"> <TDLINE>Testing Transport Info Text</TDLINE> <TDFORMAT>*</TDFORMAT> </E1EDKT2> <E1EDKT2 SEGMENT="1"> <TDLINE>Multiple line text test</TDLINE> <TDFORMAT>*</TDFORMAT> </E1EDKT2> </E1EDKT1> <E1EDKT1 SEGMENT="1"> <TDID>ZFGP</TDID> <TSSPRAS>E</TSSPRAS> <TSSPRAS_ISO>EN</TSSPRAS_ISO> <TDOBNAME>MATERIAL FREIGHT GROUP</TDOBNAME> <E1EDKT2 SEGMENT="1"> <TDLINE>REF</TDLINE> </E1EDKT2> </E1EDKT1>
Only when TDID = 0102 the result should be:
<Comments>Testing Transport Info Text Multiple line text test</Comments>
I don't have experience with PI mapping so all of this is very new to me. Would someone be able to provide a solution or lead me to a blog that would help me determine how to accomplish this requirement?