on 11-12-2010 4:48 PM
Hi all,
I have the following input file and i would like to have the output in mentioned way.
I have to look for the STOP from delivery segment, if that matches to the STOP in the E1ADRM4 segment means i have to take that date.
For the first STOP in the delivery segment is getting the correct date from the E1ADRM4 segment but for the second onwards it is not giving in the uotput.
Please suggest me how to achieve this
Input file
<E1EDT20>
<E1ADRM4>
<STOP>01</PARTNER_Q>
<PARTNER_ID>1108</PARTNER_ID>
<APNTD>20101115</APNTD>
</E1ADRM4>
<E1ADRM4>
<STOP>10</PARTNER_Q>
<PARTNER_ID>1115</PARTNER_ID>
<APNTD>20101130</APNTD>
</E1ADRM4>
</E1EDT20>
<E1EDL20>
<VBELN>0085001387</VBELN>
<ZATEDLVINFO>
<STOP>10</STOP>
<PRO>do not update</PRO>
<CONTAINER>do not update</CONTAINER>
<VESSEL>do not update</VESSEL>
</ZATEDLVINFO>
</E1EDL20>
<E1EDL20>
<VBELN>0085009999</VBELN>
<ZATEDLVINFO>
<STOP>01</STOP>
<PRO>do not update</PRO>
<CONTAINER>do not update</CONTAINER>
<VESSEL>do not update</VESSEL>
</ZATEDLVINFO>
</E1EDL20>
Output
<E1EDL20 SEGMENT="1">
<VBELN>0085001387</VBELN>
<ZATEDLVINFO SEGMENT="1">
<STOP>10</STOP>
<PRO>do not update</PRO>
<CONTAINER>do not update</CONTAINER>
<VESSEL>do not update</VESSEL>
<APNTD>20101130</APNTD>
</ZATEDLVINFO>
</E1EDL20>
<E1EDL20 SEGMENT="1">
<VBELN>0085009999</VBELN>
<ZATEDLVINFO SEGMENT="1">
<STOP>01</STOP>
<PRO>do not update</PRO>
<CONTAINER>do not update</CONTAINER>
<VESSEL>do not update</VESSEL>
<APNTD>20101115</APNTD>
</ZATEDLVINFO>
</E1EDL20>
Regards
try removecontext and splitbyvalue functions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this UDF:
Execution type: All values of a context.
Input : var1, avr2, var3.
int a=var1.length;
int b= var2.length;
for(int i=0;i<a;i++)
{
for(int j=0;j<b;j++)
{
if(var2[j].equals(var1<i>))
{
result.addValue(var3[j]);
}
}
}
Mapping:
STOP(ZATEDLVINFO)
STOP(E1ADRM4)--
APNTD(E1ADRM4)
NOTE: Change the context of all the 3 input fields(set the context to its message type name).
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.