on 11-10-2014 10:04 AM
Hi Experts,
I have an outbound scenario Multiple IDOC to File and I have DELVRY03 IDOC on the sender side.
My requirement is as follows:
1. For every EDL24 segment in the IDOC ITEM node should get generated(I am able to accomplish it).
2. Inside EDL24 there is a segment TXTH9 and inside that TXTP9, Here for every TXTH9,TXTP9(item text) can come multiple times.
My requirement is: For a fixed set of values in field TDID(I have 4 or 5 such values) which is there in segment TXTH9, if the condition holds true then the number of times TXTP9 is there ITEMTEXT should get generated on the target side.
I have tried with all the possible graphical mapping solutions, the farthest I have reached is I can accomplish this for all set of condition that holds true, If the condition is false i.e. the value of TDID is not among the fixed set of values the output is not coming as expected.
Your earliest reply is highly appreciated.
Thanks,
Hello,
Use below UDF:
Input var1 and var2
Execution type - All values of a context
for (int i =0;i<var2.length;i++)
{
if(var1[0].equals("true"))
{
result.addValue("");
}
else
result.addSuppress();
}
Mapping:
Note - Set the context of E1TXTP9 input to E1EDL24 only in format by example function
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Akshat,
Request you to give the Screenshot of your MM that you are able to achieve..
Also incase if TDID is not having correct values, do you want to Suppress the ITEMTEXT or map some other field to it?
Regards,
Azhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Azhar,
I need to suppress itemtext in case the condition doesn't holds true.
For eg, If I have 4 set of TDID values out of which the third value doesn't meet the condition then only for the third value I have to suppress the itemtext and the fields inside that node. For the 4th value again Itemtext should be created with all the relevant data inside the node.
Attaching mapping screenshot.
Hi Azhar,
Sorry for the delay in response, I was running some tests on the same MM.
I tried with the below condition:
My payload had 2 EDL24 segments, First one consist of 2 TXTH9 segments and each TXTH9 consist of 2 TXTP9 segments.
When I tried with your solution the output is not as expected in case of correct condition as well. However when I changed the context of TDID and TDLINE to EDL20 then it is working for correct condition.
For incorrect values, when I did a display queue,I am able to see suppress in the queue for one value only. The expected was that for first item only 2 itemtext should be generated because for the other one I changed the value in TDID to the wrong one.
The expected result was that, I was suppose to get 2 itemtext for first item and I am getting 3.
Please find below screenshots:
Also can you please explain me in brief what _sUpPresSeD_ is doing.
Hi Akshat,
_sUpPresSeD_ is for adding a Suppress in the Output Queue.
I have tried with following logic and works for me...please check if it works for ur combination
Also since yours is 0..Unb Idoc, it will be though to handle Contexts at for huge file with various combinations using Graphical mapping...looks like u might have to write an UDF in that case..
Regards,
Azhar
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.