cancel
Showing results for 
Search instead for 
Did you mean: 

Removal of billing block from periodic billing plan

Former Member
0 Kudos

Hi ,

I want remove billing block from sales order periodic billing plan (Table FPLT). I have one Z-transaction and when I execute from there I want to remove the billing block from Sales Order Periodic Billing Plan.

Is there any Functional Module (FM) / BAPI or any program which will help me to remove billing block? This should go to sales order in change mode and remove billing block.

Please suggest.

Regards,

Nihar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Nihar

It is possible to remove the Billing block from the billing plan, through BAPI.

Please follow the below steps to get the soltution.

1. Use 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.

2. Use BILLING_SCHEDULE_MAINTAIN.

3. Debug the program with concentration, If your are not able to delete the billing block, then ask help to other SME.

4. For your hint, follow below code

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.

SELECTION-SCREEN SKIP 1.

PARAMETERS : FPLNR TYPE FPLT-FPLNR,

FKDAT TYPE FPLT-FKDAT.

SELECTION-SCREEN SKIP 1.

SELECTION-SCREEN END OF BLOCK B1.

DATA : I_ZFPLT LIKE FPLTVB OCCURS 0 WITH HEADER LINE.

DATA : I_FPLA_NEW LIKE FPLAVB OCCURS 0 WITH HEADER LINE.

DATA : I_FPLA_OLD LIKE FPLAVB OCCURS 0 WITH HEADER LINE.

DATA : I_FPLT_NEW LIKE FPLTVB OCCURS 0 WITH HEADER LINE.

DATA : I_FPLT_OLD LIKE FPLTVB OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'BILLING_SCHEDULE_READ'

EXPORTING

FPLNR = FPLNR

I_VFKDAT = FKDAT

  • I_BFKDAT =

TABLES

  • ZFPLA =

ZFPLT = I_ZFPLT .

*******************

LOOP AT I_ZFPLT WHERE FKDAT = FKDAT.

MOVE-CORRESPONDING I_ZFPLT TO I_FPLT_OLD.

APPEND I_FPLT_OLD.

I_ZFPLT-FAKSP = ' '.

MODIFY I_ZFPLT.

MOVE-CORRESPONDING I_ZFPLT TO I_FPLT_NEW.

APPEND I_FPLT_NEW.

CALL FUNCTION 'BILLING_SCHEDULE_SAVE'

TABLES

FPLA_NEW = I_FPLA_NEW

FPLA_OLD = I_FPLA_OLD

FPLT_NEW = I_FPLT_NEW

FPLT_OLD = I_FPLT_OLD .

ENDLOOP.

5. If not through, change the profession.

Cheers

Former Member
0 Kudos

HI Ranjith ,

Thanks for your replay , i have run the below code what you have post but it will not remove the billing block ,

In the function module "BILLING_SCHEDULE_SAVE" there is no value in I_FPLA_NEW internal table here sy-subrc = 4 .

could you please send the complete code .

Former Member
0 Kudos

Hi Nihar

Trust you are able to remove the blling block from Blling plan through FM. Great work done. You are very hard working, results oriented business developer.

The learning form above process will be " Never loose the confidence, always tries the solution with different approach, SAP is great to meet every expection for customer requirement.

Cheers

Naren

Answers (1)

Answers (1)

Jelena
Active Contributor
0 Kudos