Hi Experts,
I am working on IDOC to File scenario, in message mapping i have to read segment of idoc (occurence of this segment is 0..4) and check the key of this segment and accordingly pass the value. I am creating a UDF to send the data in target field
My logic in UDF is as follows
if id = BB and payment = V
return variable1
else
return variable2
this logic is not working
Note: The id BB is in second line of the segment and first line of the segment has id BA.
Please help me to send me the correct logic.
Regards,
Shradha
Hi,
After analysing this issue i come to know that the if condition is using data from 2 different segments
Segment1 (key fiiqualli)
The occurence of this segment is 0....4, Inside this segment i have 2 rows first row has Key Fiiqualli = BA, second row has key Fiiqualli = BB
Segment2 (Key payment id)
The occurence of this segment is 0....1
Inside this segment i have only 1 row with Key payment ID= V
Now if i write the condition if fiiqualli = BB and payment ID = V
return 1
else
return 2
Here if condition fails for second line but works for first line because it is unable to read payment ID for second row as payment id is in different segment.
Is there any way to read the data from two different segment where the occurence of one segment is 0..4 and other is 0..1
Regards,
Shradha
Hi,
Paste ur input XML structure and the desired output structure??
i think u need to take care abt the context...
Thanks
Amit
Add a comment