on 02-10-2016 9:10 AM
Dear Experts,
I am developing one Idoc to Idoc scenario. The sender structure is:
<ZABC> 0.. Unbounded
Field1 0..Unbounded
Field2 0.. Unbounded
Filed3 0.. Unbounded
Field4 0.. Unbounded
Field5 0.. Unbounded
</ZABC>
Receiver structure is same as sender. Now, the requirement is, if Field1, Field2, Field3, Field4 do not exist then map "Blank" value in the respective fields in the receiver side and If Field1 exists and do not contain any blank value then value of Field5 should be "Y" else value will be "N".
I have used below logic to achieve this:
For some cases, these logics are working fine. But some cases it failed.
Could you please help me regarding this. Is there any problem in my logic?
Please advise.
Thanks & Regards,
Moumita
Hi Maheswarareddy/ Praveen,
Thanks for your reply.
I have tried both the logics suggested by you. Still I am getting same error. Just elaborating the error.
The Source payload is:
<?xml version="1.0" encoding="UTF-8"?>
<IdocName>
<IDOC BEGIN="">
<E1MARAM SEGMENT="">
<Number>000000000000001</Number>
<E1MAKTM SEGMENT=""/>
<ZE1BP>
<ZABC>
<Field1>Value1</Field1>
<Field2>001</Field2>
</ZABC>
<ZABC>
<Field2>002</Field2>
</ZABC>
</ZE1BP>
</E1MARAM>
<E1MARAM SEGMENT="">
<Number>000000000000002</Number>
<E1MAKTM SEGMENT=""/>
<ZE1BP>
<ZABC>
<Field1>Value2</Field1>
<Field2>003</Field2>
</ZABC>
</ZE1BP>
</E1MARAM>
</IDOC>
</IdocName>
The Output which I am getting using the logic is:
<?xml version="1.0" encoding="UTF-8"?>
<Idoc_Name>
<IDOC BEGIN="1">
<E1MARAM SEGMENT="1">
<Number>000000000000001</Number>
<ZE1BP SEGMENT="1">
<ZABC>
<Field1>Value1</Field1>
<Field2>001</Field2>
<Field3/>
<Field4/>
<Field5>Y</Field5>
</ZABC>
<ZABC>
<Field1>Value2</Field1>
<Field2>002</Field2>
<Field3/>
<Field4/>
<Field5>N</Field5>
</ZABC>
</ZE1BP>
</E1MARAM>
<E1MARAM SEGMENT="1">
<Number>000000000000002</Number>
<ZE1BP SEGMENT="1">
<ZABC>
<Field2>003</Field2>
<Field5>Y</Field5>
</ZABC>
</ZE1BP>
</E1MARAM>
</IDOC>
</Idoc_Name>
Please see above example. The "Field1" value is shifted. Also, foe the last segment, field3 & field4 values are not getting generated.
Please advise.
Thanks & Regards,
Moumita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.