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

VBUK

former_member582701
Contributor
0 Likes
951

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!

4 REPLIES 4
Read only

Former Member
0 Likes
750

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

Read only

former_member582701
Contributor
0 Likes
750

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

Read only

0 Likes
750

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.

Read only

0 Likes
750

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