on 05-14-2012 6:34 AM
Hi,
I have scenario where i am storing some values in Hashmap using StoreValues UDF. In this UDF i have input as IDOC number and the other values which will be stored in this hashmap using the key IDOC number. Also there is another ReturnValues UDF which is having input as IDOC number and will retrieve the values based on IDOC number and map it to respective fields in output.Both UDF excution type is "All Values Of a Context".
While executing this scenario when there are two IDOCs it should behave as shown in below sequence(Ideally).
1) StoreValues UDF for first IDOC
2) ReturnValues UDF for first IDOC
3) StoreValues UDF for second IDOC
4) ReturnValues UDF for second IDOC
But it is behaving not as expected.
It is first calling
1) StoreValues UDF for first IDOC
2) ReturnValues UDF for first IDOC
3) ReturnValues UDF for second IDOC (But as the StoreValues UDF is not executed for second IDOC, the ReturnValues UDF returns null values for second IDOC)
4) StoreValues UDF for second IDOC
As the ReturnValues UDF called twice it is returing null values for second time, which further fails in Mapping. How should i handle this scenario?
Thanks & regards,
Shilpa.
I guess its a context issue. Without knowing how exactly the mapping is implemented we cant get a clear picture. so please provide us the mapping screenshots.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shilpa,
Have you got StoreValues followed by ReturnValues for the same target node?, if you have the functions in different nodes and at the same level you shoud take Grzegorz Glowacki advice.
Have you considered to use a Graphical variable (since SAP 7.1) for return that values ?
Check William Li's blog http://scn.sap.com/people/william.li/blog/2008/02/13/sap-pi-71-mapping-enhancements-series-using-gra...
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think you won't be able to force some particular sequence of executing UDFs. But you could change the execution type to All Values of Queue, so that all the data will be processed by Store Values, and then by Return Values. Thanks to this, you will avoid errors.
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Greg,
I agree with your reply but if i use All Values of queue then all IDOCs data will be stored in Hashmap using the IDOC Numbers. There could be more than 3000 IDOCs that can come over. I think this would create problem in storing values for all IDOCs data in Hashmap and may get fail.
Do you have any other suggestion?
Thanks,
Shilpa
Hi Shilipa,
At first, this problem seems a context issue. Could you post the images about the queues before calling the funtions?
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.