Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how can i change VBAK-Faksk of VAO1 at header level using BAPI_SALESORD_CHA

Hi Experts,

How can i change the value of VBAK-FAKSK (Billing doc value) at header level .

by using the bapi_salesorder_change.Could you please send the sample code

how to change the value of any field in VBAk . so that i can take as reference and work accordingly ..

It's urgent,

thanks

kumar.

Tags:
Former Member
Former Member replied

Hi,

Check this


PARAMETERS: p_vbeln type vbak-vbeln.

DATA: l_header_inx TYPE bapisdh1x,
l_header_in TYPE bapisdh1.

data: lt_return type standard table of bapiret2.

MOVE: 'U' TO l_header_inx-updateflag,
'X' TO l_header_inx-bill_block,  " Billing
'ZL' TO l_header_in-bill_block.  " Billing block.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = p_vbeln
order_header_in = l_header_in
order_header_inx = l_header_inx
TABLES
return = lt_return.

* check for errors.
LOOP AT lt_return transporting no fields WHERE type = 'A' Or type = 'E'.
  EXIT.
ENDLOOP.

If sy-subrc = 0.
  write: / 'Error in updating'.
ELSE.
  commit work and wait.
endif.

Thanks

Naren

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question