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 for changing the sales order

Former Member
0 Likes
1,063

Hi Experts,

I want to change the field VBAP-PRCTR(Profit center (screen field: COBL-PRCTR)) in transaction VA02 with MARC-PRCTR when some conditions are true. I am passing VBAP-VBELN through select-options. Can you please guide me regarding how to use BAPI for above operation as i am new to BAPI.

Regards

Akshay

Hi Experts,

I want to change the field VBAP-PRCTR(Profit center (screen field: COBL-PRCTR)) in transaction VA02 with MARC-PRCTR when some conditions are true. I am passing VBAP-VBELN through select-options. Can you please guide me regarding how to use BAPI for above operation as i am new to BAPI.

Regards

Akshay

4 REPLIES 4
Read only

Former Member
0 Likes
641

hi ,

You can use the bapi BAPI_SALESORDER_CHANGE for the changing the sale order . Go through the docoumentation provided for the function module .

Read only

0 Likes
641

Hi,

fill the parameter SALESDOCUMENT of the FM with the number of the document.

Fill the field ITM_NUMBER with the number position and PROFIT_CTR of the structure ORDER_ITEM_IN with the new value.

Fill the fields ITM_NUMBER with the position number , UPDATEFLAG with 'X', PROFIT_CTR with 'X' of the structure ORDER_ITEM_INX.

Call the function. If there aren't any errors (loop to return table and search for message type 'E') call the function BAPI_TRANSACTION_COMMIT.

Bye

Andrea

Read only

0 Likes
641

Hi Andrea,

Thank you for the great support

Regards

Akshay

Read only

Former Member
0 Likes
641

Hi,

You can use BAPI_SALESORDER_CHANGE. This BAPI is to Change Sales Order.

Regards,

Jyothi CH.