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

BAPI_SALESDOCUMENT_COPY

bhargava_dns
Participant
0 Likes
4,269

I am using this function to copy sales order documents...but i need to update pricing also...can anyone suggest how to do this..

or suggest any other bapi through which can be achieved.

3 REPLIES 3
Read only

Former Member
0 Likes
2,493

Hello,

If you want to create with reference to old sales order than you try below way.

BAPI_SALESORDER_CREATEFROMDAT2

In item structure ORDER_ITEMS_IN,

REF_DOC = 'old sales order number'

REF_DOC_IT = 'old sales order item number'

REF_DOC_CA = 'C' sales order.

If you want to create without reference than you can try as below.

1. Collect the data for the reference document with the 'BAPISDORDER_GETDETAILEDLIST' function module.

2. Create the sales document using the 'BAPI_SALESORDER_CREATEFROMDAT2' function module by transferring the prepared data.

4. Finally, you must remove a COMMIT WORK so that the sales document can be written into the database.


For this you can check below link which has example for your ref.


BAPI COPY WITH REF - Sapwiki

Read only

0 Likes
2,493

Hi,

Sometimes is better to use BAPI...GET and BAPI...CREATEFROMDAT, but if You need to make slighty small modfication You can modify target document in exit (ex in MV45AFZZ)..

Regards,

Jarek

Read only

Former Member
0 Likes
2,493

Hi Bhargava,

BAPI_MATVAL_PRICE_CHANGE

PRICES_CHANGE & PRICES_POST

BAPI_M_REVAL_CREATEPRICECHANGE

BAPI_MATERIAL_SAVEDATA


These are the fm's to save or change material price.