Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Orders IDocs Processing With Wrong Data

Former Member
0 Likes
1,608

I'm a very experienced IDoc ABAP programmer and cannot figure this one out. We are parallel processing inbound ORDERS using IDOC_INPUT_ORDERS to create sales orders. Inside the VA01 exit MV45AFZB / USEREXIT_CHECK_VBKD, we have a custom BADI call that checks for a duplicate PO number (against a Z table). The call from the exit passes VBAK-BSTNK to the BADI at which time we check if the PO exists in a custom table. If so, we invoke an error message. If not, we update the custom table for subsequent checks. However, IDoc 1 will come and post and update the Z table with IDoc 1's PO number. Then IDoc 2 will come and fail on this check EVEN THOUGH IT HAS A UNIQUE PO NUMBER IN THE IDOC. Even the error message in IDoc 2's status 51 message has IDoc 1's PO number? So far I cannot re-create the issue. For example, I've created 20+ IDocs and made ~5 contain duplicate PO numbers. I parallel processed them and they successfully created orders while properly erroring the duplicates. I've double-checked the IDoc posting program exits to ensure we weren't passing the wrong PO number to the application and they look OK. Somehow, someway, when IDoc 2 runs, VA02 has IDoc 1's data??? Further, the error is rare. In 99% of our runs, no issues. But the error is pretty severe as we can create orders with invalid key data.

Any ideas would be appreciated.

Keith

2 REPLIES 2
Read only

christian_wohlfahrt
Active Contributor
0 Likes
897

Hi Keith!

My first questions in case of such problems is always: do you use somewhere export/import?

Also global data in function modules is a dangerous place for overwriting - but just inside one session, not cross-session. (e.g. reading two times different articles into global MARA)

Something in synchronic part of IDOC creation? Only if you use user-exits, otherwise it's just simple value moving and IDOC saving for parallel execution.

Would be much easier, if you have no error in case of double numbers... than a lot about missing / late commit work and buffering could be said.

Is it possible, that you e.g. book 5 IDOCs sequential in one session, parallel with other session à 5 IDOCs?

Then maybe errors inside one session can occur. Using global data, which was neither refreshed or overwritten by new access...

Strange, but still have a look for export into memory!

Regards,

Christian

Read only

Former Member
0 Likes
897

Hi,

Maintain the sequence# to the field Serialization in control record.

This Serialization feild allows the IDoc types to be placed in the correct order in the target system if this order was changed during transmission.

Thanks

Naga