‎2007 Mar 13 9:59 AM
Hi people.
I am programming in an user exit from IDOC_OUTPUT_ORDRSP for fill my own segment. One of this fields is LFSTK (order status) of VBUK table.
The problem is that in my idoc i save an A (wait status) but when i go to VBUK the value is C (complet order).
I think there is any moment that IDOC_OUTPUT_ORDRSP or something changes the value in the database table after i fill the segment but i don't find any reference to VBUK in all code.
Do u have any idea?
Thx in advance!
‎2007 Mar 13 10:02 AM
Where are you taking the value of 'A' from. Is it VBUK. The VBUK record is being updated after your IDoc is created. You may want to look for a different user exit. Or do not create the IDoc immediatley.
That user exit are you using. I would use
ZXVEDU15 - EXIT_SAPLVEDC_003
Message was edited by:
Martin Shinks
‎2007 Mar 13 10:16 AM
I am using user exit EXIT_SAPLVEDC_002. This exit is called after every segment is filled. When previous segnam is the previous segment of my segment i fill it.
Do you know where vbuk field is modified?
Thx
pd: i always reward with points. Thx for spend your time reading it
‎2007 Mar 13 10:22 AM
The user exit I have mentioned is called after the IDoc is created. It is the last user exit in the FM IDOC_OUTPUT_ORDRSP.
IDocs are created as a seperate task. However, I would expect all of the database updates to be completed before the IDoc is created.
‎2007 Mar 13 3:31 PM
Hi,
I would suggest you to use user-exit EXIT_SAPLVEDC_003 instead of EXIT_SAPLVEDC_002.
In SAP, an update is divided into different modules. Each module corresponds to an update function module. These two updates are V1 update an V2 update.
The V1 update is for time-critical data like database commit for transaction data. The V2 updata is for non-time critical data.
When sales order is being saved, the data is saved into database using V1 update. Once V1 update is done and Locks on update request are release, it triggers the V2 update. V2 update is used for task like, Printing, generating IDOCs etc.
That means, when idoc is generated and your user-exit is triggered, data is already saved into database. Eventhough, I have also faced the problem of not getting data while processing idoc. Thats why i suggest you to use EXIT_SAPLVEDC_003. By the tiem EXIT_SAPLVEDC_003 will trigger, the data must have been saved into database.
Let me know if you have any other question.
Check this link to know more about "Update task" in SAP.
http://help.sap.com/saphelp_46c/helpdata/en/e5/de86f335cd11d3acb00000e83539c3/frameset.htm
Regards,
RS