on 09-16-2016 8:01 AM
Hi Experts,
Scenario: File to IDOC(DELVRY03)
We have a requirement that the field POSNR count should start from 900001 to 9000XX based on line items and this has to start from 900001 again for another delivery.
Earlier we have a rule "multiple deliveries in One IDOC", this case we used Counter funtion and it worked .
Counter => POSNR
Now the rule has changed "One IDOC for each Delivery", for this case we need to generate the counter from 900001 for each delivery.
Could you please let me know, can we get the logic from PI mapping fuctions? Or do we need to write an UDF?
Please do the helpful.
Regards,
Sunitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sunitha,
Check if the below meets your requirement , assuming you POSNR filed or parent field has occurrence 0..99
UDF:
Inp:var1 Exec Type:All values of queue
int len = var1.length;
for(int i = 0; i<len; i++)
{
result.addValue(900000+i);
}
Mapping: you may use split by each value after counter udf to appear value in next context
Output for 5 line Items :
Br,
Manoj
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.
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.