on 08-16-2011 9:30 AM
Hi Friends,
I am using ACC_DOCUMENT03 IDOC, in that i need to genarate line item number for a field ITEMNO_ACC in E1BPACGL09 segment.
If 2nd IDOC is genarating that line Item number shou start from 1 onwards.
Example: ACC_DOCUMENT03 - E1BPACGL09- ITEMNO_ACC 1
E1BPACGL09- ITEMNO_ACC 2
E1BPACGL09- ITEMNO_ACC 3
when 2nd IDOC starts,
ACC_DOCUMENT03 - E1BPACGL09- ITEMNO_ACC 1
E1BPACGL09- ITEMNO_ACC 2
E1BPACGL09- ITEMNO_ACC 3
Please help me on this
with regards,
Vivek
Hi,
Please refer this blog
Sequence Number Generation : Mapping Pattern in PI
/people/sunil.ojha5/blog/2008/01/22/sequence-number-generation-mapping-pattern-in-pi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Use this UDF
In messaage mapping editor Function tab add the follwing under
Attribut and method
int i;
Under init section
i=0;
And create a UDF using global variable i
public String sequence(Container container) throws StreamTransformationException{
i=i+1;
return Integer.toString(i);
}
ORRRRRRRR
If it is betweebn different mapping then
You can try to use the logic mentioned in the DOC for your requirement.
Generating Sequence Number Between Multiple Instances of Mapping Execution
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/503e9bea-ea09-2e10-ec8a-cdf369de99d3
Hello,
You can make use of the statistic function called index. Just make sure that the radio button is set to reset index to initial value with each new context.
To do this, group the contexts for idoc1 and idoc2 separated by a context change e.g
anyvalue
anyvalue
anyvalue
cc
anyvalue
anyvalue
anyvalue
Source -> index: 1,1 -> splitByValue -> Target
Will generate the following output
1
2
3
cc
1
2
3
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.