on 09-21-2011 12:29 PM
Hi Friends,
my scenario is jdbc to idoc.
Am able to create multiple idocs basing upon delivery_date. But here my requirement is -- there are qty, slnumber, vaxinum are having different values. And all these should also be generated in the same Idoc.
INPUT
delivery_date ------ qty -------- slnumber -------- vaxinum
19/02/2006 ------ 10 ---------- 457854 --------- 10001
19/02/2006 ------ 20 ---------- 457855 --------- 10001
19/02/2006 ------ 30 ---------- 457854 --------- 10001
19/02/2004 ------ 20 ---------- 457854 --------- 10001
19/02/2004 ------ 20 ---------- 457854 --------- 10001
19/02/2005 ------ 20 ---------- 457854 --------- 10001
OUTPUT
Three Idoc's to be created -- am able to create it basing upon delivery_date.
But for 19/02/2006 this Idoc number there are different qty and different slnumber. So, I want to be created multiple segments in the same IDoc.
Thanks.
S.
Edited by: Swarna on Sep 21, 2011 1:29 PM
Hi Swarna,
This can be done using normal graphical mapping.
You can use SplitByValue with Value Change parameter for creating IDoc
You can use useOneasmany function to map same header and different line items.
http://wiki.sdn.sap.com/wiki/display/XI/StandardFunctionsinPI7.0
http://wiki.sdn.sap.com/wiki/display/XI/MappingConceptsinSAPXI
Refer the above links
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes you can do this with normal graphical mapping. Please provide expected target structure so that we can suggest mapping.
Regards,
Gouri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OUTPUT:
IDOCNUM delivery_date ------ qty -------- slnumber -------- vaxinum
000123 19/02/2006 ------ 10 ---------- 457854 --------- 10001
000123 19/02/2006 ------ 20 ---------- 457855 --------- 10001
000123 19/02/2006 ------ 30 ---------- 457854 --------- 10001
000124 19/02/2004 ------ 20 ---------- 457854 --------- 10001
000124 19/02/2004 ------ 20 ---------- 457854 --------- 10001
000125 19/02/2005 ------ 20 ---------- 457854 --------- 10001
above should be the output.
for 123 idoc number there are multiple dates, different qty's and different slnumber. So, I want for the same Idoc number multiple segments to be generated.
I hope my output requirement is clear.
Note: I am able to generate multiple idoc in gra mapping but not able to generate multiple segments, this is my problem.
Regards
S.
Hi Swarna,
Please try with the below logic.
DeliveryDate-->removecontext->sort->splitbyvaluechange->collapsecontext---IDOC
concatsortUDFSegment
coacat:
Input1-OutputofFormatByExample1sort
Input2-OutputofFormatByExample2sort
FormatByExample1:
input1:outputofsortbykey2
input2:DeliverNo-removecontext-sort--splitbyvaluechange
FormatByExample2:
input1:outputofsortbykey1
input2:DeliverNo-removecontext-sort--splitbyvaluechange
sortbykey1:
input1:DeliveryNo--removeContext
input2:SlNumber--removecontext
sortbykey2:
input1:DeliveryNo--removeContext
input2:qty--removecontext
*ExecutionType of UDF is all values of context*
public void UDF(String[] var1, ResultList result, Container container) throws StreamTransformationException{
ArrayList aList = new ArrayList();
for(int i=0;i<var1.length;i++){
if(aList.contains(var1<i>))
continue;
else{
aList.add(var1<i>);
result.addValue(var1<i>);
}
}
}
Thanks
Priyanka
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.