2015 Dec 30 8:54 AM
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
2015 Dec 30 9:14 AM
Hi Prema,
Did you tried with BAPI_SALESORDER_CHANGE.
Regards,
Shadab.
2015 Dec 30 10:19 AM
HI Shadab,
I tried using it but it is not updating the required field msr_id.
Thanks,
Prema
2015 Dec 30 10:51 AM
Hi Prema,
After the BAPI have you written commit work, If yes please check the update requests in SM13.
Regards,
Shadab.
2015 Dec 30 9:17 AM
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.
2015 Dec 30 10:08 AM
Thank You Thomas. But can you please guide how do i use the extension structure and read the same.
2015 Dec 30 12:02 PM
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
2016 Jan 05 9:37 AM
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