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_SALESORDER_CHANGE

Former Member
0 Likes
360

Hi,

I have to carry out the Header level repricing with option "C' --Copy manual pricing and carry out others.

I need to know,

, I have Sales Document number (VBELN) available. How to pass parameter to BAPI_SALESORDER_CHANGE?

If some body helps with example, it will be useful.

2 REPLIES 2
Read only

former_member191735
Active Contributor
0 Likes
310

t_hdr2-ref_1_s = 'C'.

t_hdr2_inx-updateflag = 'U'.

t_hdr2_inx-ref_1_s = 'X'.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

EXPORTING

salesdocument = g_salesdoc

order_header_in = t_hdr2

order_header_inx = t_hdr2_inx

TABLES

return = t_return.

IF sy-subrc = 0.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'.

ENDIF.

and also fill out the following tables with conditions.

CONDITIONS_IN STRUCTURE BAPICOND OPTIONAL

CONDITIONS_INX STRUCTURE BAPICONDX OPTIONAL

Read only

Former Member
0 Likes
310

You are better of to put the reprice flag in the user-exit MV45AFZB in any of the performs

FORM USEREXIT_NEW_PRICING_VBAP CHANGING NEW_PRICING.

new_pricing = 'C'.

ENDFORM. "userexit_new_pricing_vbap

FORM USEREXIT_NEW_PRICING_VBKD CHANGING NEW_PRICING.

endform

Make sure you are changing a field in one of the above tables.

Albert