hi all,
i've a source structure and target structure which looks like this below
<L_PO1>
<S_PO1>
<D_330>30</D_330>
<D_355>BD</D_355>
<D_235>BP</D_235>
<D_234>MAT1</D_234>
</S_PO1>
<L_PID>
<S_PID>
<D_349>F</D_349>
<D_352>description which can have length 140 characters max</D_352>
</S_PID>
</L_PID>
<L_PID>
<S_PID>
<D_349>F</D_349>
<D_352>another description for the same MAT1 which also can have max 140 char</D_352>
</S_PID>
</L_PID>
</L_PO1>
The target structure is a IDOC orders and it should look like this below after the mapping of item level segment
<E1EDP01 SEGMENT="1">
<MENGE>30</MENGE>
<MENEE>BD</MENEE>
<E1EDP19 SEGMENT="1">
<QUALF>001</QUALF>
<IDTNR>MAT1</IDTNR>
</E1EDP19>
<E1EDPT1 SEGMENT="1">
<TDID>Z001</TDID>
<TSSPRAS>E</TSSPRAS>
<E1EDPT2 SEGMENT="1">
<TDLINE>take first 70 characters of the description</TDLINE> "if the description is greater than 70 characters
<TDFORMAT>/</TDFORMAT>
</E1EDPT2>
<E1EDPT2 SEGMENT="1">
<TDLINE>remaining 70 characters or less from the description</TDLINE> "create a new TDLINE with a new context of E1EDPT2.
<TDFORMAT>/</TDFORMAT>
</E1EDPT2>
<E1EDPT2 SEGMENT="1">
<TDLINE>this description is not greater than 70 characters</TDLINE> " no need to split because it's not more than 70 characters.
<TDFORMAT>/</TDFORMAT>
</E1EDPT2>
</E1EDPT1>
</E1EDP01>
so, basically, I have to split description into 70 characters if its more than 70 characters and assign to a new TDLINE field.
howz it doable?
thx
mike