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: 

BAPI or Function to update Billing Plan in Sales Order Items

Former Member
0 Kudos

Hello all !

I have to update some fields in the billing plan data in sales order's item (VA02) with a program (receiving it's data form csv files).

I've searched a BAPI but infortunately there are no "Billing Plan" data structure to update thoses fields.

The transaction in VA02, the billing plan data is found in FPLT table, linked to VBKD table with key field VBKD-FPLNR.

I've tried theses Functions with no result :

BILLING_SCHEDULE_MAINTAIN

BAPI_SALESORDER_CHANGE

BAPI_SALESORDER_CHANGEBOS

BAPI_SALESDOCUMENT_CHANGE

For now I'm searching how VA02 is saving the billing plan data, but it's very tricky and maybe not reusable.

If someone have an idea for updating billing plan data in a abap program ( and not a batch input of VA02 because the line to update can have a variable position ).

Thanks a lot.

Message was edited by: Thomas B.

8 REPLIES 8

Former Member
0 Kudos

Hi Thomas,

You can go for a BDC which will update. i guess one you can use this function module to update. check this and let me know .

FM : 'SD_SALES_BILLINGPLAN_CHANGE'

Regards,

Kiran I

0 Kudos

Thanks Kiran I for your answer.

This function might be helpful but there is a strange control at the begining of the code.

(I guess VBAK must be filled somewhere..)

IF I_VBELN NE VBAK-VBELN.

MESSAGE A044 WITH I_VBELN VBAK-VBELN.

ENDIF.

But I've found another way to update the billing plan dates: using the function BILLING_SCHEDULE_SAVE (with BILLING_SCHEDULE_READ before). My point is solved.

0 Kudos

Hello Thomas

The strange "control" can be passed if you first call function module SD_SALES_DOCUMENT_READ which fills VBAK.

Regards

Uwe

PS: I am currently struggling with billing planes, too. Hope your input will help.

0 Kudos

Hi Thomas

I am also trying to create the billing schedule though have been able to key in the dates, etc. am unable to generate a billing document which copies from the Billing Plan tab of the SO but it gets created if I click on CREATE DATES on the same tab. Appreciate if you could revert with your solution.

Regards

Ravi

0 Kudos

hi Thomas

i have the same problem which u posted..

My scenarion is to create billing plan while creation of order using the BAPI_SALESORDER_CREATEFROMDAT2 but could not find any structure to pass billing plan details ,pls can u let me know if u found any solution for this if so can u send me detailed mail..i want to populate in both way header level and item level (by removing check header plan in the billing plan tab)

Pls let me know ASAP..

Thanks

anil

0 Kudos

Hi,

Please let me know how you solved this problem.

Thanks a lot.

Ajith

Former Member
0 Kudos

Thomas

Can u Plaease Send me the Code of how to use

BILLING_SCHEDULE_READ

BILLING_SCHEDULE_SAVE

michal_tvrdy
Discoverer
0 Kudos

See reports SDFPLA02, SDFPLAC1 and SDFPLAC2 where is implemented changing of the billing plans ....