Two FI documents for one billing document.

Hi,
   This problem occurs rarely. We do VF04 and generate billing documents. Some billing documents thus generated were not found as actual billing documents by looking at VF03 but are posted in FI in the corresponding company code. When we see these documents in FB03, the header of the document indicates that they came from billing and are not manually posted in FI, thus indicating that billing ran, the FI document was processed, but the billing for some reason failed to be saved in SD. For each of these FI document which do not have a corresponding billing document in FI, there is one more billing document which is existing with the same billing amount and references the same details. It has a corresponding FI document too. So, the crux of the issue is there one only one billing document and two FI documents.
SAP service has given an OSS note 92592 to find out all the orphaned FI documents and then a way to reverse these documents. This is sort of a workaround. But the root cause for this issue is not found. The note also says the following..
"In one of the function modules called by FI/CO interface, a 'commit work' is performed.
A 'commit work' can, for example, be triggered in a Native SQL or result from an RFC.
A commit work is not allowed here.
The commit work should not be performed until the billing document is transferred to the update program."
I have gone through most of the custom codes written by us in the SD billing and FI accounting areas. None of the custom codes use 'commit work' staements. Since this issue doesn't happen frequently, we understood that this is due to a 'commit work' problem in the database but are unable to nail down on the exact piece of code.
Any suggestions/ideas or experiences of similar instances, please share.
Regards,
- Raja.

Hi Raja!
Explicit commit work wasn't very likely (but of course you never know). Now you should extend your search for the implicit commit works -> database commit.
"Database commits are triggered either implicitly or explicitly in an SAP system.
<b>Implicit Database Commits</b>
The implicit database commits in an SAP system are caused by the fact that the SAP system is logged on to the database system via its work processes . A work process can only ever execute a single database LUW but cannot interfere with the database LUWs belonging to other work processes. Since an ABAP program can be executed by different work processes during its runtime, the database LUW for the current work process must be completed each time an action takes place that leads to a change of work process. As a result, a database commit is performed implicitly in the following situation:
Completion of a dialog step
The program waits for a user action and does not occupy a work process during this time. The next free work process is assigned to the program in the next dialog step.
Calling a function module in a synchronous or asynchronous Remote Function Call
The current work process hands over control to a different work process or system.
Completion of a function module accessed with a synchronous Remote Function Call in a separate work process
The calling program is assigned a new work process.
Execution of a RECEIVE statement in a callback routine specified in an asynchronous RFC
The current work process is interrupted so that the data can be received from the other application server.
Interruption of the current work process with a WAIT statement.
After interruption, the program is assigned the next free work process.
Sending error and information messages and warnings.
These messages interrupt the current dialog step (see above).
<b>Explicit Database Commits</b>
Database commits can be triggered explicitly in ABAP programs in the following ways:
Use of the corresponding database-specific native sql statement.
Calling the function module DB_COMMIT.
This function module, which has no parameters, encapsulates the corresponding native sql statement.
Executing the open sql statement COMMIT WORK."
Maybe there is somewhere a wait or sometimes a RFC is called - that are the most likely implicit commits.
Also calls of standard FMs can contain dangerous coding - include calling of 'bigger' standard functions into your search (not something like 'MARA_SINGLE_READ', but all BAPI).
Regards,
Christian

Similar Messages

  • Combining two sales documents  into one billing document

    Hi Friends,
    I need to combine two sales document into one billing document. Header data is same in both sales document.
    I have set factory calendar in the payer master.
    Tried for data transfer rotine at copy control of item level. But was not sure which routine to be set.
    Please let me know, what all settings are required to create one combine billing document.
    Regards
    Suman

    Hi,
    Is it delivery based billing or order based billing?
    2 orders / 2 deliveries and 1 invoice.
    For the above situation you need to write a routine which eliminates document number difference for Reference and Allocation.
    If you do not have different customer purchase orders for these two sales orders and in your copy control from delivery to billing your assignment and reference numbers are blank then system will club these deliveries and create one sales order.
    Else you need to eliminate these by writing a copy control routine and assign it at the header level.
    Hope this helps.  Pl. revert in case of further clarifications.
    Thanks
    Krishna.

  • Maximum line items for one billing document

    Hello Friends,
      We have a business requirement to invoice 50000 line items in a billing document.   Could you please advice the approach to fulfill this requirement.   As per my understanding, there are some limitations for billing item and accouting document item.
    Appreaciate for your valuable inputs.
    Best Regards,
    Goutham

    Yes your understanding is correct.  It is not possible to achieve this requirement.
    You can also go through some of the threads where the same topic was discussed
    [accounting document limit 999   |accounting document limit 999;
    [Re: More than 999 line items in Invoice|More than 999 line items in Invoice;
    thanks
    G. Lakshmipathi

  • One billing Docu two payers

    Dear All,
      I have scenario where for one billing document payers are two,Let me elobrate more
    In our scenario on be half od every sale farmer is the customer but government give subsidy for the sale ,so on every sale 70% of payment will be done by Government and 30% of payment will be done by Farmer .
      So please suggest me how to map this in SAP.
      Thanks&regards.

    Check if possible:
    If the quantity is say 1, is it possible to have 2 line item with quantity 0.7 and 0.3.
    or
    Check and work with FI Consultant regarding splitting the payer through development of a routine which will split the payer at the Accounting entry level and the 2 payer need to be maintained, one as payer and second as a copy of payer with a separate naming convention. proper logic will have to be framed for the same.
    Development will certainly be challenging.
    Regards,
    Rajesh Banka

  • FI Document Summarization for SD Billing Documents

    Hi Gurus,
    Appreciate if you can please let me know the configuration and process of FI Document summarization for sd billing documents where, there are more that 10000 line items in one billing document. And how can we do clearing of multiple accounting documents against one billing document when we recieve payment.
    Thank You

    Hello,
    The summarization of FI items for SD billing documents are done in transaction OBCY. The steps to configure it is explained in note 36353:
    1) Enter in transaction OBCY
    2) Inform Reference Transact. VBRK
    3) Add the following fields:
              BSEG     MATNR
              BSEG     MEINS
              BSEG     MENGE
              BSEG     PAOBJNR
              BSEG     POSN2
              BSEG     VBEL2
              BSEG     WERKS
    Be informed that the content of those items will be deleted in FI document.
    The information above will help you to configure summarization of FI items for SD billing documents.
    Kind regards,
    Cintia.

  • Multiple Deliveries into one Billing document

    Hi Gurus,
    Can any of you provide me the process how to combine multiple delivery documents into one Billing document.
    .Thanks
    Yuvraj.V

    Hi
    Payer
    Payment terms
    Billing date or billing due date
    Destination country
    Billing doc type
    Incoterms
    Actual GI date
    Foreign data trade
    If these are same in all delivery documents they can be combined into single billing
    This is controlled in copy controls in VTFL choose del type and billing type and your item category
    In that VBRK/VBRP if you choose 001 combined billing will happen
    In VF04 you can do the billing or in VF01 you have to input all the delivery nos manually and do the combined billing
    The same qn was posted by you on NOV 21st with so many replies?
    Why are you posting again and again?
    Pls close the thread whereever possible
    Regards
    Raja
    Edited by: ramanathan raja on Dec 14, 2008 5:00 PM

  • One billing document for multiple deliveries which are for different PO

    Hi All,
    I have a scenario where i need to create one billing document for multiple deliveries.
    Payer is same
    Ship-to is same
    PGI date different
    Sales area is one
    PO different
    In standard SAP it will create seperate billing document for different PO
    Please advice if there is a different copy routine which will combine all the POs in one billing document.

    Hi Mr. Bhat,
    Go to VTFL --> Select the combination of your delivery type and billing type --> Double click at Item(Left side) --> Select your item category --> Click at details
    In the feild "Data VBRK/VBRP" --> I think the routine assigned is 601 (Inv.split - PO Num.) --> Now change it to 3 (Single invoice)
    Then try your process, Hope it helps.
    Regards,
    MT

  • One Billing document for multiple Dilevery Documents

    Dear All,
             I m trying to generate one billing documents for multiple dilveries documents with Tcode : VF04. But it is generating billing documents for all the delivery documents.  M i missing any configuration or some thing like that.
    Suggestions?
    Regards,
    Vikas

    Hi Vikas,
    after you created the billing document there is one menu option protocol. If have it not 100% in mind and i am note able to test it for the moment.
    T

  • One billing document for many deliveries

    We want to be able to create one billing document with detailed line items of many deliveries. It will be based on the PO. Does anyone know of a way to do this?

    Hi Dave,
    You have the option of using customer-specific data transport routines in the copying control of the relevant document types which initialize the corresponding fields. However, the information contained in these fields is then lost in the billing document.
    This can be done with t-code VOFM.
    You can copy the existing one and make change.
    Below is a sample.
    FORM DATEN_KOPIEREN_6XX.
      VBRK-BZIRK = SPACE.      
      VBRK-KDGRP = SPACE.                    
      VBRK-KONDA = SPACE.                    
    ENDFORM.
    Hope this helps you.
    Regards
    Jean
    Please reward points if it is helpful for you.

  • How to create multiple accouting documents for one invoice for diff curr

    Hi experts/gurus,
    I have a requirement where we need to create two two different accounting documents for one invoice. The scenario is this:
    1) We are exporting goods to oversea customer, as such the currency is bill in USD
    2) We also have transportation charges using another condition type, we need to capture this charges/accrual in local currency which is MYR.
    Currently, the system will automatically convert the transporation charges to USD when we create the invoice and the accounting document will be generated in USD for both sales and transport charges.
    is there a way to fullfil the above requirement, any setting in condition type or any user exists we can used to create hte accounting documents.
    Any ideas/input is highly appreciated, points will be awarded

    Hi Wan,
       The following user exits are available in report SAPLV60B for transfer to accounting (function group V60B): So please go through these.
    ·EXIT_SAPLV60B_001: Change the header data in the structure acchd
    You can use this exit to influence the header information of the accounting document. For example, you can change the business transaction, "created on" date and time, the name of the person who created it or the transaction with which the document was created.
    ·EXIT_SAPLV60B_002: Change the customer line ACCIT
    You can use this exit to change the customer line in the accounting document. This exit is processed once the ACCIT structure is filled in with data from document header VBRK.
    ·EXIT_SAPLV60B_003: Change the customer line in costing
    The customer line is filled in differently for costing. You can use exit 003 to influence the ACCIT structure.
    ·EXIT_SAPLV60B_004: Change a GL account item ACCIT You can add information to a GL account item (such as quantity specifications) with this exit.
    ·EXIT_SAPLV60B_005: User exit for accruals
    Once all relevant data for accruals was entered in the GL account item, you can add to this data with this exit.
    ·EXIT_SAPLV60B_006: Change the control line ACCIT
    You can use exit 006 to add information to the control line.
    ·EXIT_SAPLV60B_007: Change the installment plan
    You can use exit 007 to add information to the installment plan
    parameters in the GL account item.
    ·EXIT_SAPLV60B_008: Change the transfer structure ACCCR, ACCIT and ACCHD
    After the accounting document is filled in with data, you can use exit 008 to change the document once again.
    ·EXIT_SAPLV60B_010: Item table for customer lines
    You can use exit 10 to influence the contents of customer lines before they are created.
    ·EXIT_SAPLV60B_0011: Change the parameter for cash account determination or reconciliation account determination
    You can use this exit to change inbound parameters in order to influence account determination.
    I hope any one of these will solve your problem
    Thanks,
    Murali.

  • How to get general account for a billing document ( BSEG) ?

    Hello,
    For a billing document to a client , We need to get the general account for each item of the invoice . We based on the field XBLNR of table VBRK to select a document from BKPF with condition : VBRK-XBLNR = BKPF-vbeln . If yes we will get from table BSEG for bseg-vbeln = bkpf-vbeln and bseg-posnr = vbrk-posnr . then get HKONT.
    But as you know BSEG is a cluster table, Select directly from this table is extremly long and seems impossible in our case. Could you please show me the way to do this ?
    Our main purpose is to get HKONT ( General account ) for a  billing document .
    Thanks in advance for your help

    Hi  Hoa Binh Xanh,
    Why don't you look into tables BSAD and BSID (Transperant Tables) rather directly hitting BSEG ( Cluster Table)
    Pass VBELN (Billing Document) in above two tables and get the doucment numbers and then if you need further info hit BSEG with the data you got from BSAD and BSID
    OR else Pass KOART = 'D' while selecting data from BSEG it will help in improving performance
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Excise Invoice created twice for same billing document.

    Hi All
    Excise Invoice ( J1IIN ) has been created twice for same billing document in 1 or 2 cases.
    How is this possible,if possible what is the config  to restrict the same.
    Thanks in advance
    Samson

    I dont think its possible to EI twice wrt: single billing document.
    EI created wrt: Invoice which is created wrt: Delivery document. Then there will be only one material document with movement type 601. Through which qty will get updated in Rg1 register.
    This document once utilized, cant used again.
    re-check billing document, which billing document you are using & their settings in IMG.
    Regards,
    Reazuddin MD

  • Cancel one billing document through VF11

    Hi Gurus,
    My client does not want to cancel more than one billing document at the same  time. Can I know which user exit can be used to restrict to cancell one billing billing document through VF11.
    Regards,
    Rakesh

    User Exits For Billing
    USEREXIT_NUMBER_RANGE (Module pool SAPLV60A, program RV60AFZZ)
    The internal number range used in the standard system is specified in the billing type table and can be changed in this user exit. This user exit is only called when the billing documents is created.
    USEREXIT_ACCOUNT_PREP_KOMKCV (Module pool SAPLV60A, program RV60AFZZ)
    In this user exit additional fields for account determination that are not provided in the standard system are copied into communication structure KOMKCV (header fields).
    USEREXIT_ACCOUNT_PREP_KOMPCV (Module pool SAPLV60A)
    In this user exit additional fields for account determination that are not provided in the standard system are copied into communication structure KOMPCV (item fields).
    USEREXIT_NUMBER_RANGE_INV_DATE (Module pool SAPLV60A, program RV60AFZC)
    Depending on the number range, table TVFKD is used to set the billing date (country-specific requirments in Italy).
    USEREXIT_NUMBER_RANGE is automatically deactivated when this user exit is being applied.
    USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC)
    This user exit is only called when the billing document is created. It is used to provide the header and the item of the new billing document with deviating or additional data.
    USEREXIT_PRINT_ITEM (Module pool SAPLV61A, program RV61AFZB)
    Printing the item line of a billing document can be supplemented or changed.
    USEREXIT_PRINT_HEAD (Modulpool SAPLV61A, Programm RV61AFZB)
    Printing the header line of a billing document can be supplemented or changed.
    User exits in program RV60AFZD
    Short descriptions of the user exits are contained in the program:
    USEREXIT_RELI_XVBPAK_AVBPAK
    USEREXIT_NEWROLE_XVBPAK_AVBPAK
    USEREXIT_NEWROLE_XVBPAP_AVBPAK
    User exits for program SAPLV60B (Interface to accounting):
    EXIT_SAPLV60B_001: Change the header data in the structure acchd
    EXIT_SAPLV60B_002: Change the customer line (accit and accccr)
    EXIT_SAPLV60B_003: Change the customer line in costing
    EXIT_SAPLV60B_004: Change a GL account item (accit and acccr)
    EXIT_SAPLV60B_005: User exit for accruals
    EXIT_SAPLV60B_006: Change the control line (accit and acccr)
    EXIT_SAPLV60B_007: Change the installment plan
    EXIT_SAPLV60B_008: Change the transfer structure acccr, accit and acchd
    EXIT_SAPLV60B_0011: Change the parameter for cash account determination or reconciliation account determination
    Regards,
    Raj

  • Order related item and delivery related item in one billing document

    Hi Experts,
    how can we include order related item and delivery related item in one billing document .
    Please give me the configuration logic .

    Hello,
    1)Reference Document Number VBRK-XBLNR.
    In transaction VTFA and VTFL at header level setup the field 'Reference number' so that it is the same (example 'E')
    2) Payment Reference VBRK-KIDNO
    It should be a consequence of the split, and not a cause. So you can ignore it
    3) Billing date for billing index VBRK-FKDAT
    In sales order and delivery you should set the same billing date. Alternatively, the the first screen of VF01 please set a Defailt billing date
    4) Customer purchase order number VBRK-BSTNK_VF
    It is necessary that sales order to be billed and sales order referenced to delivery to be billed have the same purchase order number. There is not other way.
    5) Assignment number VBRK-ZUONR
    In transaction VTFA and VTFL at header level setup the field 'Assignment number' so that it is the same (example 'E')
    6) Translation Date
    Same solution of point 3.
    Best regards,
    Ivano.

  • Process 2 delivery order document become 2 billing document in 1 one time

    HI,
    is it possible to process 2 delivery order document become 2 billing document in 1 one time (just like collective billing document but the billing document will be create as many as delivery order document ?
    Thanks & Regards,
    Saiful arif

    Dear Arif,
    Please try with this option
    Go to VF04 transaction enter the selection data (To execute the delivery documents) then execute now system will execute the list of delivery documents which were not billed.You select dleveries those you want to bill then click on Individual billing document push button now system will create the invoices for the delivery documents,
    I hope this will help you,
    Regards,
    Murali.

Maybe you are looking for