Billing plan update in VA02

Hi,
We have created a Z report for updating the Billing Plan in VA02.
For this we are using the FM BILLING_SCHEDULE_GENERATE.
The issues is, the billing dates are getting generated but the billing value is not getting updated. To update the billing value we need to press Create Date in VA02->Item details->Billing plan.
Any pointers to this will be highly appreciated. Points assured.
Regards,
Nilesh.

Thanks, but the problem is to generate a billing plan number (FPLNR) in (X)VBKD and (X)FPLA automatically.
Yes, it must probably be done before the SAVE exit, but the real question is how?
I saw module functions BILLING_SCHEDULE_GENERATE and _DIALOG but I don't konw if I can use them without problems...

Similar Messages

  • BAPI or Function to update Billing Plan in Sales Order Items

    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.

    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.

  • Problem in updating Billing plan while changing Sales order

    Hi All,
            I am using the BAPI 'BAPI_SALESORDER_CHANGE' to change a Prepaid Sale order.After calling this BAPI ,I am calling the function module <b>'BILLING_SCHEDULE_SAVE'</b> to update the Billing plan of the changed Sale order(Billing plan dates for Billing type ZF1 are changed).
         The updated date values are getting reflected in the screen when I view through the transaction VA02 and the values are also updated in FPLT table but the values are not getting reflected in the table VKDFS.
       Since the values are not getting reflectedin the table VKDFS the billing date is not correct while we view in the transaction VF04.
       Please provide your valuable suggestions for updating the Billing date in VKDFS table.
        Thanks in advance for your help.
    Thanks and regards,
    Siva

    Hi,
    I had the same problem. Here is an example code to resolve it:
    REPORT  ytestfg.
    DATA: i_bsid LIKE bsid OCCURS 0,
          i_bsid2 LIKE bsid OCCURS 0.
    TABLES: bsid.
    DATA: doc     LIKE     vbak-vbeln,
          pos(6) TYPE n.
    DATA e_fpla     LIKE     fpla.
    DATA e_fplt     LIKE     fpltvb OCCURS 0 .
    DATA: zfpla     LIKE     fplavb OCCURS 0,
    zfplt     LIKE     fpltvb OCCURS 0.
    DATA zfplt2     LIKE     fpltvb OCCURS 0 WITH HEADER LINE.
    doc = 'G03060619'.
    pos = '000010'.
    CALL FUNCTION 'SD_SALES_DOCUMENT_READ'
      EXPORTING
        document_number = doc.
    CALL FUNCTION 'SD_SALES_BILLINGPLAN_READ'
      EXPORTING
        i_vbeln                = doc
        i_posnr                = pos
      IMPORTING
        e_fpla                 = e_fpla
      TABLES
        e_fplt                 = e_fplt
      EXCEPTIONS
        no_billingplan_allowed = 1
        no_billingplan_found   = 2
        OTHERS                 = 3.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Read the billing plan
    CALL FUNCTION 'BILLING_SCHEDULE_READ'
      EXPORTING
        fplnr          = e_fpla-fplnr
      I_VFKDAT       =
      I_BFKDAT       =
      TABLES
       zfpla          = zfpla
        zfplt          = zfplt
    Upddate the ZFPLT2 table with the new values
    MOVE zfplt[] TO zfplt2[].
    READ TABLE zfplt2 INDEX 1.
    zfplt2-afdat = '20080927'.
    Very important to set field updkz = 'U' ***
    zfplt2-updkz = 'U'. "--> UPDATE!!
    MODIFY zfplt2 INDEX 1.
    CALL FUNCTION 'BILLING_SCHEDULE_SAVE'
      TABLES
        fpla_new = zfpla
        fpla_old = zfpla
        fplt_new = zfplt2 " --> NEW
        fplt_old = zfplt.
    CALL FUNCTION 'SD_SALES_DOCUMENT_SAVE'.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Regards,
    Edited by: PHO_BA on Mar 9, 2009 5:28 PM

  • Service Contracts  with billing plan not updating debit memo request in ECC

    For service contracts with billing plan, we cancel the line items and set the user status at header to "cancelled" and also set the cancellation date (under Cancellation Tab) at the header as well as item level which delete all items in the “DMR” in ECC (which are not yet billed). When we do this, it works perfect for most of the time and in some cases DMR items are not updated in ECC and it is billing. When I checked in CRM, the billing plan items are updated based on the cancellation date.
    Experts appreciate your help on this issue.
    Thanks,
    George.

    This is resolved by the note 1008663

  • Customer exit for tab 'Billing Plan' at item level in VA02

    Hi gurus,
    is there any customer or user exit for tab 'billing plan' in va02 where we find other tab like SALE A, SALES B, SHIPPING etc, i allready tried mv45afzz (userexit_field_modification) and exit V60F0001( Cmod). the requirement is to suppress field NET VALUE for certain user n based upon sale order type. so i cant use transaction variant.
      well i found one include "RV60FUS4" which contain form 'userexit_field_modification' but i dont know how to change the code n through which user exit.
    any reply will be awarded.
    thanks

    well include "RV60FUS4" which contain form 'userexit_field_modification' worked with development key from sap.
    thanks

  • BAPI_CUSTOMERCONTRACT_CHANGE - Updating Line Item Billing Plan

    Hi all,
    We're using the BAPI_CUSTOMERCONTRACT_CHANGE to update Contracts, which is nothing but updating fields in VA42.
    However for some reason it's not updating the Billing Plan date in the line items.
    Version: SAP 4.7 R/3 Enterprise.
    All OSS notes are up to date.
    How to pass data for billing plan in the BAPI.
    Any feedback regarding this matter is highly appreciated.
    Thanks
    Gopakumar
    Sr.SAP Tech.Lead
    [email protected]

    Hi Gopakumar,
    There is no separate structure to be filled out for the Billing Plan Tab. Since it is coming under the Item level, you have to use the item structure to fill in the data.
    Quickest way is, find out the "Data base structure field name" and check in the Item structure(BAPISDITM). i.e. for eg. for billing_block the field is "FAKSP" and the corresponding Item Structure field name is bill_block. you should fill this data in the structure (BAPISDITM) and set 'X' in the check_in structure (BAPISDITMX).
    CALL BAPI_CUSTOMERCONTRACT_CHANGE using update mode. You will get the data.
    Thanks and Regards
    Ratish

  • In BDC VA02 i am uploading header details in BILLING PLAN tab.

    Hi Friends,
    In BDC VA02 i am uploading header details in BILLING PLAN tab.
    I am having sales order no in flat file.
    While i am clicking BILLING PLAN tab its showing 1 POPUP screen for Milestobe For billing plan (INPUT AS NETWORK NO).
    Some sales order nos this popup is not coming.
    How to code this bdc?

    CLOSED

  • 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,
    Nitish

    Hi,
    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

  • Billing block removal in Billing Plan - Transaction VA02

    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.

    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

  • 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 AM

    Hi,
    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

  • To edit a billing plan with VA02

    Hi,
    I need help because I would like to print a billing plan with VA02.
    I 'm going to link this billing plan with output types of my sales order.
    For example, when I save my sales order, I would like that the billing plan print automatically.
    Somebody could tell how I ccoud do it?
    I know, I need to create another form.
    I want  to know how to link this new form to my sales order withe NACE?
    Thanks
    Kari

    Hi,
    You are right,we have to define a new form.
    The logic on the form is:
    Pass the sales order number in the table "FPLA".
    Execute.
    Fetch the Billing plan number from the field "FPLNR".
    Pass this to the table "FPLT".
    Execute.
    You will get all the item details maintained in that order.
    Goto the T.Code "NACE".
    Select the application as "V1".
    Click on "Output types".
    Select your output type.
    Click on "Processing routines".
    Enter your form name here.
    Take help from your ABAPer.
    Regards,
    Krishna.

  • Billing Plan Values different in VA02 & VA03

    Hi All,
    We have a case where in the billing plan values are different for the same sales order when seen in change mode (VA02) & display mode (VA03). can you please let me know what and where the problem can be?
    Regards
    Sujay

    Hi, Rajesh,
    My issue is with the billing plan values are not getting copied into the F1 invoice.  But when I run the order related billing due list I am able to see all the billing line items with values mentioned in the billing plan.
    regards
    AVS

  • Update Contract End Date on Billing plan

    Help would be appreciated.
    We use milestone billings with fixed values based on date setbacks from the contract end date.  For example, 6 months prior to contract end or 12 months prior to contract end.  Once the 1st billing in the plan is processed and the invoice created, the contract end date on the item>Billing plan is no longer be updated.   Occasionally, the contract end date changes based on the build schedule and the remaining billing due dates in the plan need to be recalculated. 
    We have the config set to adjust to the milestone and this works great until the 1st billing is processed then we can no longer update the milestone date.
    Thanks in advance for any help.
    Jamie

    Hi sunil ,
    In CRM_ORDER_MAINTAIN you have this table : IT_APPOINTMENT.
    you have to use FM : IB_CONVERT_INTO_TIMESTAMP
    to :  timestamp_from in that Structure,
    you have to fill the guid and the timezone.
    in appt_type you have to give the name of the date you want to change.
    Lilach.

  • Billing plan is not updating project plan revenue

    Hi,
    My client has scenario like he creates projects manually and when he creates any sales order, he assign this sales order to the project though account assignment tab.
    The plan revenue for the project comes from sales order billing plan.
    The issue is the billing plan is not updating project plan revenue. Even if there is a billing plan, project report S_ALR_87013543 shows there is no revenue.
    Please tell me if there is any link between sales order billing plan and project plan revenue.
    How can I resolve this issue?

    Hi,
    I think you have not maintained planning profile in project definition.
    Goto project and  check planning profile in control data.
    We can create planning profile in OPSB t.code.  Select the fields Quotation and sales order in +Automatic revenue planning segment+ and assign revenue element.
    Now create a sales order with billing plan and check S_ALR_87013543 report.
    Regards,
    Chandra

  • Problem in updating FPLT Table with custom fields of the billing plan

    Hi Guys
    I have a requirement to add 2 custom fieldd in the billing plan tab of sales order and I could not find any screen exit for that. However I got access key and added those 2 fields on the screen but I am not able to uodate table FPLT from there.
    I can see exits to pass the value but because there is no screen exit, the program cant retain the values keyed given by use on the screen.
    I really dont know where do I need to write the code and how to make screen fields read by the program.
    Please please help.
    Thanks a lot

    Hi,
    Probably too late, but here's the solution:
    - Transaction SE51 program: SAPLV60F and dynpro number: 0030
    - Goto 'Logical execution' or something like that (i'm connected in french)
    -  Modify standard code line 75: here I have added the field 'LIBEL'
        FIELD:
          FPLT-FAKSP,
          FPLT-FAREG MODULE FPLT-FAREG_PRUEFEN ON REQUEST,
    *{   REPLACE        DTAK910958                                        1
    *\      FPLT-FPTTP.
          FPLT-FPTTP,
          FPLT-LIBEL.
    *}   REPLACE
        CHAIN.
    Il means that field LIBEL will be checked with field FPTTP.
    regards.

Maybe you are looking for