Funtion Module in accounting document

Hi All,
Can someone tell what function module is called while creating the accounting document and what are its important import and export parameters?
Regards
Vijay

Hi Vijay,
The most important funtion module responsible to creating accounting documentt is RV_ACCOUNTING_DOCUMENT_CREATE . Below are its important import and export parameters:
Import parameters
CASH_SALE_ACCOUNT : contains the cash clearing account, if this is not to be posted to the customer 
CPD_ADRESS: must be filled if you are posting to a one-time customer        
DOCUMENT_OLD : contains the $000000x number of the billing document, as VBRK-VBELN already has the final value, XVBRP and so on still contain $000000x
INVOICE_HEADER : Contains the billing header VBRK
I_COMP : Control parameter, if only CO is to be posted            
I_COMP_CHECK :   Control parameter if only CO is to be posted (check run)
CHECK : Controlling for error messages (issue immediately or in log)            
MODE : Change mode ( A = old, B = new)           
MODE_TYPES  : Scope of change (1=rebate/2=VPRS)
Differences can occur due to the update of cost price conditions or rebate conditions in billing documents that have already been posted. These two fields (MODE and MODE_TYPES) are required to enable the posting of those differences to CO-PA.
RRREL: If this field is set, the billing document contains revenue recognition items             
BOKRE  : If this field is set, the billing document is rebate-relevant
These  two fields (RRREL and BOKRE) are required for the new cancellation function as of Release 4.6A. This is because the new cancellation procedure cannot be implemented for revenue recognition or rebate relevant billing documents.           
Export parameters
O_VBRK_RFBSK: This is set if an error has occured in account determination ( characteristic B)
O_KONV_CHANGED: This is set if XKOMV is changed in account determination
Regards
Roop

Similar Messages

  • Accounting document not posted from billing document SD module

    Dear Sir,
    I am encounting a weird issue in SD module, that is when I am saving the billing document the system will generate accounting document automatically from my ID but when the same process will perform from the other ID having same rights and previligies then system prompt the folllowing message .
    "Tax code C1 does not appear in any G/L account item"
    It means the system allow a specific user to post accounting document with reference to billing document but not allowing to post from any other ID.
    Apparently this issue related to basis module. we have checked in the basis area as well . still unable to get ane resolution for this issue.
    Best Regards,
    HASEEB KHAN
    MM,PP,SD CONSULTANT

    Hello Haseeb,
    In that case, I would suggest you check Change Message Control for Taxes follow following path in SPRO:
    IMG - Financial Accounting (New) - Tax on sales/purchases - Basic setting - Change Message Control for Taxes
    Check corresponding doc to it and go through different Application Area, particularly, FF
    Also refer SAP Note 495737 - Customizable messages in FI_TAX_SV_BSEG_BSET_GROSS
    Hope this can assist you in understanding
    Thanks & Regards
    JP

  • Function Module require for Accounting Document

    Hi All,
    Is there any Function Module available for getting Accounting document no which is created after IR.
    Regards,
    Paras

    Hi,
    You can use BAPI_ACC_DOCUMENT_POST.
    Regards,
    Eli

  • Function module to find the attachment list for an accounting document?

    Is there a function module to find the attachment list for an accounting document? Or which table stores such references?
    I know I can find this info from the transaction FB03, but is there a function module to find the attachments for an accounting document? So far I only found the attachments are stored in the table SOOD, and archived documents in table TOA03, but I can't find the table that stores the links between the accounting document and its attachments?
    <b><REMOVED BY MODERATOR></b>
    Thanks,
    Ning
    Message was edited by:
            Alvaro Tejada Galindo

    Hi,
      i_object1-typeid = 'YARSATTA'.  "<<< Give your Object id name
      i_object1-catid  = 'BO'.
      i_object1-instid = i_yarsitem-docno.    "<<<< Document Number
      call method cl_gos_attachment_query=>count_for_object
        exporting
         is_object = i_object1
         ip_arl    = space
        receiving
         rt_stat   = i_stat1.
      read table i_stat1 into wa_stat1 index 1.
      if sy-subrc eq c_0.
         move wa_stat1-counter to v_attno1.
      endif.
    For link you need to check for table SRGBTBREL
    and also please check class CL_GOS*

  • Accounting document generate

    hi
    I have used a funtion module to generate a Accounting document .The generation is working perfectively.
    but I also use a fm called AC_document _check to check whether the document exists.it always giving me sy-subrc = 0 even if docu exist
    what should i do
    sarang

    The function module AMBU_CALL_AC_DOCUMENT_CHECK does not have an exception as such so sy-subrc will always be 0.
    The function module will execute regardless of any error.
    In order to handle exceptions, use an internal table of errors and pass it to T_RETURN of the TABLES parameter in the fuction module.
    Then you can find whether the function module is being executed correctly or not.

  • Accounting Document not Cleared using BAPI_ACC_DOCUMENT_POST

    Dear Experts,
    I am Using BAPI_ACC_DOCUMENT_POST to post the GL'S , Accounting document is getting created successfully . My Doubt is whether this bapi will clear the Accounting document automatically or we have to use any other function module to clear the Document?
    Please let me know how to clear the document.
    Thanks & Regards,
    Hemant Gulati(A1)

    Documents are not cleared; their line items are.
    Rob

  • Number range of  accounting document for different plants

    whenever a billing document is created in SD (using the T-code VF01); an accounting document will be simultaneously created in the FI module. one document type(TS,number range---60:1 to 9999 ) have four  plants .different plants have own number range and sequential document number .
    eg: doc. type   num.range    fr       to           plant cty       co code
             TS           61            1        1000       PLANT_1      3100
                            62           1001    2000       PLANT_2      3100
                            63           2001    3000       PLANT_3      3100
                            64           3001    4000       PLANT_4      3100
    How can that carry out this function ?
    thank you for your help !

    Hi leung,
      As Mr.Rohit has mentioned it has to be done with the z table and the available user exit.
    Wht we have done is.we have created no ranges in obj rv_beleg.Eg
    AA   0000000001 to 0000099999
    AB   0000100000 to 0000199999
    AC   0000200000 to 0000 299999.
    Using the user exit we have created a Z table.And assignd for this ombination in the Ztable.
    Plant X   Billing type A   AA
    Plant Y   Billing Type A  AB
    Plant Z    Billing type A  AC
    Once this combination matches the appropriate invoice no range gets picked up.
    Regards,
    K.Vivek

  • Related Accounting Document Number for an SO

    Hi,
    How will I determine the Accounting Document number related to a Sales Order?
    I know the flow is in VBFA but, I can't seem to see the Accounting Document number in there be cleared/completed or not cleared.
    Is there a function module, bapi that I could use?
    Thanks,
    KLL

    Hi,
      If you to check whether the accounting document is cleared of not ..Check the field BSEG-AUGBL not initial..
      If the field BSEG-AUGBL is initial.
         accounting document not cleared.
      elseif the field BSEG-AUGBL not initial.
         accounting doucment is cleared.
      endif.
    Thanks,
    Naren

  • Accounting document number from billing data

    hi
    i have billing document with multiple items. I need to find out the accounting document number corresponding to each of the billing document item. which tables i need to refer for this.give me the field names.
    thanks

    Hi,
    You can read the FI document with the function module AC_DOCUMENT_RECORD
      call function 'AC_DOCUMENT_RECORD'
        exporting
          i_awtyp      = 'VBRK'
          i_awref      = awref
          i_aworg      = aworg
          i_awsys      = awsys
          i_awtyp_incl = 'BKPF'
          i_valutyp    = '0'
          x_dialog     = ' '
        tables
          t_documents  = docs_fi
        exceptions
          no_reference = 1
          no_document  = 2
          others       = 3.
    where docs_fi is as the table ACC_DOC. Read the records where awtyp = 'BKPF' in itab docs_fi. Search AWREF, AWORG and AWSYS in equivalent fields in table VBRK.
    I hope this helps you
    Regards,
    Eduardo
    Edited by: Eduardo Hinojosa on Jun 14, 2010 3:35 PM

  • Link between Accounting Document and Sales Order

    Dear SD Gurus,
    How to find the Sales Order number and Sales Order Item from the accounting document- like document types DZ, DG, ID etc.
    Kindly specify the table links and fields to fetch the above details
    Regards
    Vimal

    Link Between SAP SD, MM & FI
    The link between SD and MM :-
    1. When you create sales order in SD, all the details of the items are copied from Material master of MM.
    2. MRP and availibility check related data is also taken from MM although you control this data in SD also.
    3. While you create inbound/outbound delivery with reference to a sales order,the shipping point determination takes place with the help of the loading group, plant data, shipping conditions etc. This also refers to Material Master.
    4. The material which you are entering in a sales order must be extended to the sales area of your sales order/customer otherwise you cannot transact with this material.
    There are many such links between SD and MM.
    Now the link between SD and FI :-
    1. Whenever you create a delivery with reference to a sales order, goods movement takes place in the bacgground. eg. In case of standard sales order, you create an outbound goods delivery to the customer.
    Here movement 601 takes place. This movement is configured in MM. Also, this movement hits some G/L account in FI. Every such movement of good s hits some G/L account.
    2. The accounts posting in FI is done with reference to the billing documents (invoice, debit note, credit note etc) created in SD. Thus this is a link between SD and FI
    3. Tax determination: In case of a tax determination also, there is a direct link between SD and MM
    SD Integration points with other modules
    SD module is highly integrated with the other modules in SAP.
    Sales Order –
    Integration Points                      Module
    •Availability Check             -       MM
    •Credit Check                   -       FI
    •Costing                        -       CO/ MM
    •Tax Determination              -       FI
    •Transfer of Requirements       -       PP/ MM
    Delivery & Goods Issue –
    Integration Points                      Module
    •Availability Check             -       MM
    •Credit Check                   -       FI
    •Reduces stock                  -       MM
    •Reduces Inventory $            -       FI/ CO
    •Requirement Eliminated         -       PP/ MM
    Billing -
    Integration Points                      Module
    •Debit A/R                      -       FI/ CO
    •Credit Revenue                 -       FI/ CO
    •Updates G/ L                   -       FI/ CO
      (Tax, discounts, surcharges, etc.)
    •Milestone Billing              -       PS
    Return Delivery & Credit Memo -
    Integration Points                      Module
    •Increases Inventory            -       MM
    •Updates G/ L                   -       FI
    •Credit Memo                    -       FI
    •Adjustment to A/R              -       FI
    •Reduces Revenue                -       FI
    SD Transaction Code Flow: 
    Inquiry / Document type IN
    Tcode for creation VA11,VA12,VA13. tables VBAK,VBAP
    Quotation / QT
    Tcode for creation VA21,VA22,VA23. tables VBAK,VBAP
    Purchase Order PO
    Tcode for creation ME21,ME22,ME23. tables EKKO,EKPO.
    Sales Order OR
    Tcode for creation VA01,VA02,VA03. tables VBAK,VBAP
    Delivery LF
    Tcode for creation VL01,VL02,VL03. tables LIKP,LIPS
    Billing F2
    Tcode for creation VF01,VF02,VF03. tables VBRK,VBRP
    <b>The SD & FI link is established through mapping of appropriate G/L accounts through T.Code: VKOA</b>
    Regards,
    Rajesh Banka
    Reward suitable points.
    How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left. You also get a point yourself for rewarding (one per thread).

  • IR created for Purchase order without accounting document

    Hi all,
    We have a peculiar situation where an IR (Invoice receipt) document has been created for a purchase order where the corresponding accounting document has not been generated. Can you please let us know how can we create accounting document for this IR.
    We tried to reverse this IR by transaction code MR8M but it is throwing the error message "Reversal not possible, accounting document for the ref. does not exist".
    We understand that there is some standard SAP utility which posts the accounting document and in case there is some configuration also for this, please let us know.
    We would be grateful for any information on resolving this issue.
    Regards,
    Santosh

    Hi,
    Please refer to the below links:-
    http://www.sap-img.com/financial/integration-of-fico-with-other-modules.htm
    http://www.sap-img.com/materials/what-is-the-dataflow-of-mm.htm
    Re: FI-MM(Valuation Class)
    Rgds.

  • Problem creation of accounting document impossible

    Dear Gurus,
    I created a new Material Type in reference to "DIEN" Material Type.
    I have created a Sales Order -> Delivery -> Invoice flow (yes the delivery isn't useful but needed for some flat file sending...).
    After the creation of the Invoice, the Accounting document won't create itself.
    I get the message : KE 348 described here below
    Of course, no CCR exists but it's quite normal since we are on a Service Flow.
    I check my customizing of the CO module, affectation of the Valorisation to Material Type and all is fine too.
    Any ideas anyone please??
    Thx in advance for your kind help
    Xanticles
    No valuation segment exists in the material master record for product 551                                                                               
    Message no. KE 348                                                                               
    Diagnosis                                                                               
    In Profitability Analysis (CO-PA), the system tried to valuate a line  
        item by looking for a product cost estimate for product "551" using the
        plan period indicator.                                                                               
    To do this, the system has to read the valuation segment ("MBEW") of the
        material master. This segment does not exist in valuation area NISL.                                                                               
    Display material, View: Costing                                                                               
    The system tried to read the product cost estimate according to costing
        costing key Z01 as defined in the CO-PA Customizing settings.

    Your PA is configured to insist (error msg) on a cost estimate. You either need to create a cost estimate for the service you are providing, or configure PA such that it will not generate an error when it doesn't find a cost estimate.

  • Addition of G/L items in Accounting Document during creationof Material Doc

    Hi All
    I am looking for User exit or BADI that allows me to add additional G/L line items (offsets) in Accounting Document during creation of Material Document. I wish to do this when I save Material document in MIGO, MB01 or MIRO.
    Has anyone done this before? Is there any user exit, badi or function module to do this. Please share insight on this situation.
    Thanks in advance
    Sunny

    Hi,
      check out BADI MB_DOCUMENT_BADI this would trigger before and during update task while posting Material documents i think you can ful fill your requirement with this.
    Regards,
    Himanshu

  • How to configure to generate two accounting documents for Mvt 645

    Dear Experts,
    I read all documents related to STO one-step procedure (mvt 645). They said that the system generate two accounting documents for 2 company codes (receing and issuing company codes) after goods issue reference to DO.
    However, after configuration one step procedure and test my system, the system only generated one accounting document for receiving company code, not for issuing company code. In Material document, I saw 2 Mvt 645 and 101. In the lines having Mvt 645, I saw G/L account of cost-of-goods-sold.
    Could you please to show me how to generate two accounting documnets automatically after goods issue referent to DO with Mvt 645?
    Thank you so much,
    Best regards,
    Anh Duong

    My configuration steps are:
    Step 1: preparation:
          create customer and vendor master
          extend sales & purchasing views for material master
    Step 2: Assign customer number and the organizational units (sales organization, distribution channel, and division) to the Supplying plant and Receiving plant
    IMG --> Materials Management --> Purchasing --> Purchase Order --> Set up Stock Transport Order --> Define Shipping Data for Plants
    Step 3: tick on column "One step" for the line of supplying, receiving plant, and PO type cross transport order
    IMG --> Materials Management --> Purchasing --> Purchase Order --> Set up Stock Transport Order --> Assign Document Type, One-Step Procudure, Underdelivery Tolerance
    Step 4: assign delivery type NLCC for PO type cross transport order
    IMG --> Materials Management --> Purchasing --> Purchase Order --> Set up Stock Transport Order --> Assign Delivery Type and Checking Rule
    These above steps are in MM module.
    Please help me,
    Thank you,
    Anh Duong

  • Automatic clearing of accounting documents

    We are having an issue with accounting documents for our credit card orders getting cleared automatically as the billing documents are created.  This looks
    like a standard SAP functionality.  The orders are created with credit card number and it gets authorized.  When the billing document is created, it posts the  document to accounting and it clears automatically.   Is there any user exit that I can use to not make the document clear automatically?  Which function module does this use to do the automatic clearing of the accounting document?  We also create Repair orders with credit card number in it, but not authorizing the credit card while order creation.  Because it does not authorize the credit card, the accounting document for Repair order does not get cleared automatically which is what we are trying to accomplish for our regular authorized credit card orders also.
    Thanks!

    Thanks Rafael.  But we want it to post to accounting, it is just the clearing part we are trying to avoid.

Maybe you are looking for

  • Can't uninstall or re-install Vista drivers (Boot Camp 2.1)

    I'm having problems with my MacBook Pro's bluetooth support in Vista under Boot Camp so I thought I'd try to re-install the Boot Camp 2.1 drivers. However, whenever I run the setup program, it just gives me a useless error message saying it encounter

  • Can't Drag and Drop with a Double Tap using Single Finger in Lion?

    I installed the Mac OS X Lion two days. But I can't drag and drop with a Double tap using Single Finger, which I used to do in Snow Leopard. If I choose Three Finger Move, then Swap Between Pages goes back to "Scroll left or right with Two Fingers" t

  • Can I get HD Quicktime video output via Windows 7

    How can I put this.  I have a fellow employee to states that it is impossible to produce HD quality QuickTime via via Windows 7.  Is this an accurate statement?

  • Check run does not create check register

    Hi, X report that is expected to be generated as a result of the check run being performed is the "Payment Summary" report.  Currently, this is not automatically printing.   To print same, the command "SP01" must be accessed, subsequent to the check

  • A mild question about table alignment

    I use a specific style for table anchor points, imaginatively called :anchor and defined as left justified. Sometimes I import tabbed text for a fairly narrow table, and convert it using a table style defined as left justified. How come the results (