on 09-22-2015 2:22 PM
E1EDP01 and E1EDK01 are nodes of IDOC segment.
E1EDPA1 has parent node E1EDP01.
ZE1EDKT has parent node E1EDK01.
The occurrence of E1EDPA1 and ZE1EDKT are different in idoc. E1EDPA1 may come N number of times and ZE1EDKT may come M number of times.
Condition - The PARTN field has to be equal for both segments.E1EDPA1-PARTN where E1EDPA1-PARVW is 'RS' AND ZE1EDKT-PARTN (Context E1EDK01) is equal then target field LIN has to be created. Target field LIN has parent SG25 which is mapped to E1EDP01.
If PARTN is matching 5 times,then 5 LIN segment should come.
Can you please help in UDF for it.
1) make a udf
2)three inputs E1ED_PARTN, ZE1ED_PARTN, E1ED_PARVW
3)Execution type all values of a context
4) Pass values after removecontext to the udf
for(int i=0; i<E1ED_PARTN.length; i++) //loop runs on E1EDP01 as the parent of target is mapped to E1EDP01
{
if(E1ED_PARVW[i].equals("RS")
for(int j=0; j<ZE1ED_PARTN.length; j++)
{
if(E1ED_PARTN[i].equals(ZE1ED_PARTN[j])
{
result.addValue("");
break;
}
}
}
Mapp the udf's output to Target LIN
a)if 5 LIN's have to come in same parent dont use splitbyValue
b)if LIN's have to be generated one in each node than use splitbyvalue before mapping to target
Regards
Vinay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
ZE1EDKA2-PARTN (Context E1EDK01) values -
0000100532 - I want output for this in one node of output M1
0000100547 - I want output for this in another node of output M2
0000100532 is having 2 values and 0000100547 is having 2 values.
Current output is putting 0000100532 1st output in M1 and 2nd output in M2.
I need both output of 0000100532 to come in M1 node.
for(int i=0; i<ZE1ED_PARTN.length; i++)
{
for(int j=0; j<E1ED_PARTN.length; j++)
{
if(E1ED_PARTN[j].equals(ZE1ED_PARTN[i]) && E1ED_PARVW[j].equals("RS"))
{
result.addValue("");
break;
}
}
if(i+1!=ZE1ED_PARTN.length)
result.addValue(ResultList.CC);
}
map this to the target field without using splitbyvalue or remove context. also share the screenshot of the graphical mapping you have done and the target structure with occurence
I will explain in detail.
The scenario is INVOICE IDOC to receiver xsd message.
Sender Invoice idoc is attached as "SCN Invoice.xsd"
Receiver message type -
Logic we have to put is -
Create an instance of S_LIN group for every E1EDP01 segment in the Idoc.ZE1EDKA2-PARTN field is in sender invoice idoc and fetch E1EDP01 which have sub-segments matching E1EDPA1-PARTN where E1EDPA1-PARVW is 'XY'.
Thus -
E1EDP01 and E1EDK01 are nodes of IDOC segment.
E1EDPA1 has parent node E1EDP01.
ZE1EDKA2 has parent node E1EDK01.
The occurrence of E1EDPA1 and ZE1EDKA2 are different in idoc. E1EDPA1 may come N number of times and ZE1EDKA2 may come M number of times.
Condition - The PARTN field has to be equal for both segments.E1EDPA1-PARTN where E1EDPA1-PARVW is 'RS' AND ZE1EDKA2-PARTN (Context E1EDK01) is equal then target field LIN has to be created. Target field LIN has parent SG22 which is mapped to E1EDP01.
Any help in UDF will be appreciated.
Please save attachment as xsd file.
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.
Hi,
Can you please be more specific and elaborate your requirement so that I can try to help you.
Its very difficult to understand what kind of mapping are you trying to do.
Thanks,
Apu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you please share your IDOC payload.
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 | |
7 | |
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.