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

FM SD_SALESDOCUMENT_CREATE on creating a sales order using reference

Former Member
0 Likes
1,172

I create a sales order using a reference order number.On displaying it in VA02, and giving document flow, the reference document which I used to create the sales order gets displayed.

A program/fm u2018Xu2019 is called on giving document flow (which takes the reference order number I used as input )

Now if that u2018Xu2019 is getting the data of the reference order I used from some table u201CT_Yu201D.This table u201CT_Yu201D must be set during sales order creation itself. So, some program which is called during creation of sales order gets the reference order number I used as input and puts it in that table u201CT_Yu201D.

My assumption is that SD_SALESDOCUMENT_CREATE is the function module handling that part. If it is not for that, then what is its function.

*****If it is handling that part, which structure which this FM gets as input contains that order number which I used as reference?

There are 3 bapiu2019s called on sales order creation, BAPI_SALESORDER_CREATEFROMDAT2, BAPI_SALESORDER_CREATEFROMDAT1, BAPI_SALESORDER_CREATEFROMDATA.

Only one BAPI calls SD_SALESDOCUMENT_CREATE namely BAPI_SALESORDER_CREATEFROMDAT2

*****Why does the FM SD_SALESDOCUMENT_CREATE not get triggered when I set a breakpoint in it during sales order creation?

I create a sales order using a reference order number.On displaying it in VA02, and giving document flow, the reference document which I used to create the sales order gets displayed.

A program/fm u2018Xu2019 is called on giving document flow (which takes the reference order number I used as input )

Now if that u2018Xu2019 is getting the data of the reference order I used from some table u201CT_Yu201D.This table u201CT_Yu201D must be set during sales order creation itself. So, some program which is called during creation of sales order gets the reference order number I used as input and puts it in that table u201CT_Yu201D.

My assumption is that SD_SALESDOCUMENT_CREATE is the function module handling that part. If it is not for that, then what is its function.

*****If it is handling that part, which structure which this FM gets as input contains that order number which I used as reference?

There are 3 bapiu2019s called on sales order creation, BAPI_SALESORDER_CREATEFROMDAT2, BAPI_SALESORDER_CREATEFROMDAT1, BAPI_SALESORDER_CREATEFROMDATA.

Only one BAPI calls SD_SALESDOCUMENT_CREATE namely BAPI_SALESORDER_CREATEFROMDAT2

*****Why does the FM SD_SALESDOCUMENT_CREATE not get triggered when I set a breakpoint in it during sales order creation?

1 REPLY 1
Read only

Former Member
0 Likes
709

Please search in SDN so many thread related to create sales order