How to give Billing plan details to BAPI_CONTRACT_CREATEFROMDATA
Hi,
I am using BAPI-BAPI_CONTRACT_CREATEFROMDATA for creating contract (VA41), the problem is, i am not able to give the billing plan details in this BAPI. I mean, in VA41, in Billing plan tab, it will have 2 fields- Dates From, Dates Until.
These 2 fields i am not able to give in BAPI. Any help is appreciated.
Vinoth
I face same issue now i solve so i tell how to solve
first u use
CALL FUNCTION 'BAPI_CONTRACT_CREATEFROMDATA'
then u commit
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
after that you can use following FM for billing plan details
CALL FUNCTION 'SD_SALES_BILLINGPLAN_READ'
CALL FUNCTION 'BILLING_SCHEDULE_READ'
CALL FUNCTION 'BILLING_SCHEDULE_SAVE'
CALL FUNCTION 'SD_SALES_DOCUMENT_SAVE'
using above FM u pass all billing plan data if u want sample code give ur mail id because if i past full code then can't read able it it more then 1500 char.
Edited by: kk.adhvaryu on Jun 8, 2010 8:57 AM
Similar Messages
-
How to copy billing plan details of main item to all its sub-items...
In the sales order, we have main item and sub-items. The main item is a project item and it has a billing plan which gets copied from the project. Now the requirement is to copy the same billing plan(of the mainitem) to all its subitems- billing dates, billing type, billing rule, date category, percentage of the amount to be billed, etc. So that when we do billing for this sales order all the items and its sub items are copied in the milestone billing document.
The billing plan is not at header level since the sales order can have multiple project items and their milestones can differ.
Please suggest how to acheive this- coping of billing plan details from main item to all the subitems.
Rds,
sucmsssYou can use the enhancement section in include mv45af0f_fplan_aktualisieren_c. In the below code, I am copying milestone lines from previous document, but you could adapt to copy from the higher level item. Copy and pretty print it in ABAP editor.
ENHANCEMENT 10 ZSD_SALES_DOC1. "active version * Generate Billing Plan without dialog. * Because copy control does not work with milestone billing plans, we need to perform the below tricks.
DATA: zlt_fplt TYPE TABLE OF fpltvb, zlt_fpla TYPE TABLE OF fplavb, zlv_fareg TYPE tfpla-fareg, zlv_fplnr TYPE fplnr, zls_vbkd TYPE vbkd. FIELD-SYMBOLS:TYPE vbkdvb, TYPE fplavb, TYPE fpltvb, TYPE fpltvb.
IF xvbkd-updkz = chari AND tvap-fpart IS NOT INITIAL AND * xfplt[] IS INITIAL AND vbkd-fplnr IS INITIAL AND "bill plan not created vbak-vbtyp CA 'CG'. "contracts and orders SELECT SINGLE fareg FROM tfpla INTO zlv_fareg WHERE fpart = tvap-fpart. IF zlv_fareg IS NOT INITIAL AND zlv_fareg <> '6'. READ TABLE cvbkd ASSIGNINGWITH KEY vbeln = vbap-vgbel posnr = vbap-vgpos. IF sy-subrc IS INITIAL. CALL FUNCTION 'BILLING_SCHEDULE_READ' EXPORTING fplnr =-fplnr tables ZFPLA = zlt_fpla zfplt = zlt_fplt. * Check if any of the lines are not periodic and not from milestone before proceeding. READ TABLE zlt_fplt ASSIGNINGWITH KEY MLSTN = abap_false nfdat = 0. IF sy-subrc IS INITIAL. CONCATENATE '$000' vbap-posnr INTO zlv_fplnr. ENDIF. ENDIF. IF sy-subrc IS INITIAL. LOOP AT zlt_fplt ASSIGNINGWHERE mlstn = abap_false. -fplnr = zlv_fplnr. APPENDTO xfplt. -updkz = chari. ENDLOOP. LOOP AT zlt_fpla ASSIGNING. -fplnr = zlv_fplnr. CLEAR-vbeln. -updkz = chari. APPENDTO xfpla. ENDLOOP. da_fplnr =-fplnr. ENDIF. ENDIF. ENDIF. CALL FUNCTION 'BILLING_SCHEDULE_GENERATE' EXPORTING I_FKDAT = VBKD-FKDAT I_FPLNR = DA_FPLNR I_WAERS = VBAK-WAERK I_FPART = TVAP-FPART I_VEDA = XVEDA I_VEDA_KOPF = VEDAVB I_UPD_FPLA = UPD_FPLA I_UPD_FPLT = UPD_FPLT I_KOMK = TKOMK I_KOMP = TKOMP I_KOMPAX = KOMPAX I_FKREL = VBAP-FKREL I_CREATE_DATES = US_FLG_CREATE_DATES I_KFPLAN = DA_KFPLAN I_KFPLNR = DA_KFPLNR I_NOMSG = US_NOMSG I_ABSAGEN = DA_ABSAGEN I_FPLAA = FPLAA IMPORTING E_FPLNR = XVBKD-FPLNR E_DATALOSS = DA_DATALOSS E_UPD_FPLA = UPD_FPLA E_UPD_FPLT = UPD_FPLT E_KOMPAX = KOMPAX TABLES FPLA_NEW = XFPLA FPLA_OLD = YFPLA FPLT_NEW = XFPLT FPLT_OLD = YFPLT I_FPLTS = TFPLTS I_FPLTNP = TFPLTNP I_KOMV = XKOMV I_TKOMK = TKOMK I_SVBAP = UVBAP. LOOP AT zlt_fplt ASSIGNING. READ TABLE xfplt ASSIGNINGWITH KEY mandt =-mandt fplnr =-fplnr fpltr =-fpltr. CHECK sy-subrc IS INITIAL. -updkz = chari. ENDLOOP. ENDENHANCEMENT. -
How to create Billing Plan in sales order using Function module /BAPI
hi,
How to create Billing Plan in sales order using Function module /BAPI
i hv check few FM such
BILLING_SCHEDULE_READ
BILLING_SCHEDULE_GET_NUMBER
BILLING_SCHEDULE_SAVE
But unable to create billing plan for a sales order.....any other method to create???Hi,
Use this link.
Create sales order with billing plan via LSMW and BAPI BUS2032
BAPI or Function to update Billing Plan in Sales Order Items
Hope this will help you.
Regards,
Vijay -
BILLING PLAN DETAILS -Function Module
I have sales order no .
What is the function module to give the details of BILLING PLAN for that sales order.There is a link between VBKD-FPLNR and FLTP-FPLNR.
Pass the VBELN to VBKD, Fetch the FPLNR and pass it to FLTP to get the FLTP details.
Try the FM - DPBP_SLS_GET_REF_FPLNR_FPLTR -
How to enable Billing plan tab in sales order (lean) with NWBC
Dear All,
The Billing plan tab in sales order (lean) is not availabe with NWBC. How to enable this tab?
Is there is any documentation to do the modifications of NWBC's webdynpro screens?
for example, there is a standard webdynpro screen in NWBC from SAP best practices to create sales order (lean). The lean sale order screen having restricted elements and tabs when compare with standard SAP GUI (t code va01).
So I want to include the few missing tabs for data entry.
any documentation or solution?
thanks in advance,
Suresh Yerra.Dear All,
Is there is any documentation to do the modifications of NWBC's webdynpro screens?
for example, there is a standard webdynpro screen in NWBC from SAP best practices to create sales order (lean). The lean sale order screen having restricted elements and tabs when compare with standard SAP GUI (t code va01).
So I want to include the few missing tabs for data entry.
any documentation or solution?
Thanks,
Suresh Yerra. -
How to view existing plan details?
Does anyone know whether I can view my existing plan details on the BT website? The various package names are getting less and less clear - eg which type of calls are free - and the charges are getting more and more unfathomable. Thanks. Dolphin
Hi Dolphin,
Welcome to the forum. Have you setup online billing? This will allow you to keep an eye on your account to see what you are paying for.
Please visit this website to setup an online billing profile My BT: https://www.bt.com/reg/consumer/displayPage.do?journeyType=consumer_online_registration&page=registr...
Let me know if you have any problem in setting this up.
Cheers
Sean
BTCare Community Manager
If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-) -
How to see billing plan balance value ?
Team-
I am using billing plan with VA01 and client wants the see the remaining balance of the sales order, how can I do this without RICEF object ?
Lets say billing plan was started with Net value 1000 for 10 periods, and of the period is paid but Net value is still showing 1000. Is there any place where I can find remaining balance of 900 ?
ThanksHi,
Go to KKBC_KUN
Put sales contract number and periods from to & execute
You will get
Plan value which is your total contract value
Actual value which is invoice
Plan/actual variance which is your remaining value to be billed
Modify layout if need more information
Or you can view it by VA42/VA43 >> Environment >> Cost report
Kapil -
How to update Billing Plan using BAPI_SALESORDER_CHANGE
Hi,
In my case initailly sales order header data is created and saved, with reference to SO Project is created and then item level data is updated.
So clients requirement is to create any upload programme which can use for mass upload.
i.e to develop a program to upload,
i) Items in Sales Order.
ii) Billing Plan & Pricing Conditions in SO
I am trying to use BAPI_SALESORDER_CHANGE for this requirement. Problem is in this scenerio user exit is already used which validate "Amount" at item level and "Bill. value" in Billing plan tab should be same.
As observed Billing plan data can not be updated using this BAPI.
Even I've tried to use BDC for this requirement, but as we need to double click on line item while updating billing plan data and conditions it does not work while recording.
Incase anyone have worked on similar scenerio and found out solution, please share all your inputs.
Warm Regards,
NitishHi,
The following code will take you to Billing plan tab in BDC.
PERFORM bdc_dynpro USING 'SAPMV45A' '0102'.
PERFORM bdc_field USING 'BDC_CURSOR'
'VBAK-VBELN'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'VBAK-VBELN'
wa_vbap-vbeln.
PERFORM bdc_dynpro USING 'SAPMV45A' '4001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ITEM'.
PERFORM bdc_field USING 'BDC_CURSOR'
itemno . "'RV45A-MABNR(wa_vbap-posnr)'.
PERFORM bdc_dynpro USING 'SAPMV45A' '4003'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=T\06'.
PERFORM bdc_dynpro USING 'SAPLV60F' '4001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
Regards,
P Gomatheeswaran -
How to update billing plan date in contract
Hi guys!
I*m using the bapi BAPI_CUSTOMERCONTRACT_CHANGE to change some data in my contract
However, I want to set the date for the beginn of the billing plan. (Billing plan start date) and i don't find this field in the BAPI.
So is there a way to set and change this date?
...by the way. There is a rule initiated named "rule for origin of start date of billing plan". This should set the billing plan start date to the contract start date. - The contract start date is updated with BAPI_CUSTOMERCONTRACT_CHANGE - but the changes doesn't affect the billing plan startdate.
If i edit the contract, the changes to the billing plan occur automatically, but not in the BAPI
thanks!!
Edited by: tom54321 on Aug 6, 2009 9:36 AMHi,
Plz check the link given below:
BAPI_CUSTOMERCONTRACT_CHANGE is giving dump when start date of contract
It may help you.
Thanks & Regards,
Sarita Singh Rathour -
Hi all,
I am using [BAPI_SALESORDER_CREATEFROMDAT2] for creating Sales order
and i also have billing plans data to be updated in the sales order. But i dont find any structures for populating the Billing plan data into the BAPI.
But i found the SD_SALES_BILLINGPLAN_CHANGE function module for updating the Billing plan schedule data. But this function module needs [Billing plan number / invoicing plan number] assigned to the sales order from the table VBKD.
When i create the Sales order through BAPI, the [Billing plan number / invoicing plan number] is not getting updated and i dont know how to update the billing plan for the sales order created using BAPI.
Can anyone help out how to create the Billing plan data for a Sales order?
Regards
Dhanapal Shi Dhanapal
i ahve 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 -
Copy Billing plan from Contract to Sales Order
Dear Expert,
We created the Contract with Billing plan related to specific "WBS "Element". Then, tried to create the sales order with reference to that Contract. But billing plan details maintained in contract is not getting copied to sales order. can anybody give your experience to solve this issue.
Warm Regards,
NagHello Nag,
Did you check your copy control routines in transaction VTAA? You need to see if these fields are included in the routines maintained for copy control between your contract and sales order.
I hope this helps.
Best regards,
Ian Kehoe -
Hi,
I need to use a function module or a bapi to simulate (but no create) billing plan in the contract items.
So i would like to reproduce the standard function (see how it works in debug) but i don't know how to simulate billing plan. I try to use VA42 but i can't any simulation function or something else.
Can you help me?
ThanksHi,
Ideally you would simulate a cycle from contract to invoice and make sure its working alright.
To enter a billing plan for a contract (after entering VA41 and the customer, material details), go to the item level screen. There is a tab called billing plan here.
You assign a billing plan reference for your document type (Path:IMG Settings > Sales and Distribution > Sales Documents Header, and Billing > Billing Plan > Maintain Date Proposals for billing plan types).
If these settings are maintained, then the billing plan should automatically populate. Then you create the release order, remove billing block and invoice.
Cheers. -
Hi,
Based on a sales order how can I know the billing plan? I tried to search for some posts, but could not find one with one exact answer regarding this.
What I need to know is on which tables or Function Module could I have this connection? Sales order - billing plan
Thanks,
Best regardsHi,
You can use the table VBKD to get the billing plan number FPLNR for the corresponding sales order.
Then use the FPLNR to get the billing plan details from FPLA & FPLT.
Thanks
Naren -
Creating Billing Plan data for sales order using BAPI_SALESORDER_CREATEFROM
Hi All,
We are using BAPI_SALESORDER_CREATEFROMDAT2 to create the sales order.We are unable to get the fields for billing plan tab in this BAPI.
Kindly let me know the fileds in BAPI that corresponds to the fileds of billing plan in sales order.
Thanks in Advance,
Kiran I.Hi kiran
hi Dhanapal
i ahve 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 -
Defining values on SD Billing Plan during order entry
Scenario-
User enters a sales order with 10 line items.
Based on specific material master information (material group, etc), items will be split on two billing plans.
For example, lines 1, 3, and 10 would go on the first billing plan at 5% of the price.
The second billing plan would have the remaining 95% for lines 1, 3, and 10.... and 100% for lines 2, 4, 5, 6, 7, 8, and 9.
I can manually go through this process. Is there a way to automate? I see many user exits (old SD style, CMOD/SMOD style, and BAdI style), but they do not appear to manipulate the percentages or fixed values of the billing plan.
Are there any enhancements to set values and define the billing plan details?
Thanks!
NormHi Erik,
Another solution would be to define an output type in the order for sending the mail and to attach a requirement to the output type which will trigger the output only in case the billing block is changed.
Regards,
John.
Maybe you are looking for
-
Flattening a PDF that contains an XML file
Hi I am hoping someone can help me. We have a PDF document that contains an XML form. We are starting to utilize DocuSign software to electronically sign and route our forms. The problem is that this form cannot be converted in the DocuSign portal. W
-
Imposible to restart netbook T130
Hello all, please is here anybody who could help me to solve my problem. Restart of my notebook with Win7 does not work correctly. If I click on "restart" my notebook is shut down. If any update require restart system, instead of restart system my no
-
Just got it today 2.33 120gig 2 gigs of ram glossy screen runs great screen seems brighter then my old macbook pro 17inch but when i play world of warcraft the fans go bananas my old macbook pro didn't turn on the fans once while playing WOW. Beside
-
My Apple Mail program isn't working properly
My Mail program suddenly won't get mail. I clicked on provide mail feedback and when it showed Accounts it said there were 5. I only have three. The dropdown menu asking what system I use didn't list mine: 10.5.8
-
Invoice numbers for a purchase order
Hello Experts, For a particular purchase order, there are 2 invoice numbers in the R/3 system. But when i am running a certain BW report, which displays the invoice numbers for a PO, it is showing ony one invoice number. Please advice.