Hi,
How can I remove the Billing Block in Billing plan for a single sales order? (header level)
What I need to remove/change to empty is the field FPLT-FAKSP (from Billing Plan tab) and not the FAKSK from table VBAK (in Billing Document tab).
Following example is only to remove the VBAK-FAKSK, but what i need is to remove the FPLT-FAKSP.
Please help.
Thanks
REPORT Z_BILLING_BLOCK.
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.
update the flag.
l_header_inx-updateflag = 'U'.
l_header_inx-bill_block = 'X'. " Billing
l_header_in-bill_block = ''. " Remove Billing block.
Call the bapi.
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.
WRITE: / 'Billing block removed'.
COMMIT WORK AND WAIT.
ENDIF.