‎2007 Dec 10 10:28 PM
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.
‎2007 Dec 10 11:54 PM
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
‎2007 Dec 11 12:16 AM
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