Application Development 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: 

Update MSR_ID in VBAK table

Former Member
0 Kudos
1,041

HI,

A quick help  required.

Can anyone let me know the FM/BAPI to update sales order header data.

The FM/BAPI should update MSR_ID in VBAK along with other data fields when the orders are created manually.

Thanks,

Prema

7 REPLIES 7

shadab_maldar
Active Participant
0 Kudos
486

Hi Prema,

Did you tried with BAPI_SALESORDER_CHANGE.

Regards,

Shadab.

0 Kudos
486

HI Shadab,

I tried using it but it is not updating the required field msr_id.

Thanks,

Prema

0 Kudos
486

Hi Prema,

After the BAPI have you written commit work, If yes please check the update requests in SM13.

Regards,

Shadab.

bauert
Explorer
0 Kudos
486

Hi,

the FM  MAP2E_VBAK_TO_BAPISDHD maps the VBAK structure to the BAPI structure, but as you can see the field MSR_ID is not mapped.

The BAPIs for VBAK you find in FG VBAK.

Maybe you have to use the Extension structures EXTENSIONEX (BAPIPAREX) to get the field updated. (SD_SALESDOCUMENT_CREATE).

Thx.

Former Member
0 Kudos
486

Thank  You Thomas. But can you please guide how do i use the extension structure and read the same.

0 Kudos
486

Sorry, I checked again. This is only possible with custom fields.

How to use it you can find here:

http://help.sap.com/saphelp_46c/helpdata/en/c3/40999d8b8911d396b70004ac96334b/content.htm

raymond_giuseppi
Active Contributor
0 Kudos
486

You want to update the field(s)


when the orders are created manually.

You should use a BAdI/Exit, not a BAPI, you could start reading good old User Exits In Sales Document Processing in User Exits in Sales. Look for forms like USEREXIT_MOVE_FIELD_TO_VBAK or USEREXIT_SAVE_DOCUMENT_PREPARE. You could also look at enhancements like VA45* thru transaction SMOD.

Regards,

Raymond