Application Development 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: 

Billing block removal in Billing Plan - Transaction VA02

Former Member
0 Kudos

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.

8 REPLIES 8

Former Member
0 Kudos

have a look

[Link|http://help.sap.com/printdocu/core/print46c/en/data/pdf/SDBIL/SDBIL2.pdf]

Regards

Shashi

Former Member
0 Kudos

Hi,

Check with the following link,

Thanks,

Neelima.

Former Member
0 Kudos

hi,

please see this link....u will get the answer

thanks

Former Member
0 Kudos

Hi,

I don't want to use this is the sales order user-exit. What I really want is to have another different program running in background for example and removing this Billing Block (FPLT-FAKSP).

My code is only working for the billing block in Billing Document Tab and not for the one in Billing Plan.

Thanks a lot

Br

Anyone knows already a solution for this??

Edited by: Ninfx Ninfx on Feb 27, 2009 4:42 PM

Former Member
0 Kudos

Issue closed

0 Kudos

Pls. let us know, How did u solved, people get learned.

thanq

0 Kudos

I used this Function Module:

FUNCTION RV_SALES_DOCUMENT_UPDATE.

We can use these structures to update the billing block:

*" FXFPLA STRUCTURE FPLAVB OPTIONAL

*" FYFPLA STRUCTURE FPLAVB OPTIONAL

*" FXFPLT STRUCTURE FPLTVB OPTIONAL

*" FYFPLT STRUCTURE FPLTVB OPTIONAL

Regards

0 Kudos

thnaq