SAP Function BAPI_ACC_DOCUMENT_POST - Accounting: Posting

Parameter Reference Type Length Default Optional Text
CONTRACTHEADER BAPIACCAHD u 86 X Additional Contract Accounts Recievable and Payable Header Line
CUSTOMERCPD BAPIACPA09 u 383 X One-time customer
DOCUMENTHEADER BAPIACHE09 u 251 Header

Parameter Reference Type Length Text
OBJ_KEY BAPIACHE09-OBJ_KEY C 20 Reference key
OBJ_SYS BAPIACHE09-OBJ_SYS C 10 Logical system of source document
OBJ_TYPE BAPIACHE09-OBJ_TYPE C 5 Reference procedure

Parameter Reference Length Optional Text
ACCOUNTGL BAPIACGL09 918 X G/L account item
ACCOUNTPAYABLE BAPIACAP09 436 X Vendor Item
ACCOUNTRECEIVABLE BAPIACAR09 547 X Customer Item
ACCOUNTTAX BAPIACTX09 79 X Tax item
ACCOUNTWT BAPIACWT09 160 X Withholding tax information for FI Interface
CONTRACTITEM BAPIACCAIT 266 X Additional Contract Accounts Recieviable and Payable Document Line Item
CRITERIA BAPIACKEC9 58 X CO-PA Account Assignment Characteristics
CURRENCYAMOUNT BAPIACCR09 90 Currency Items
EXTENSION1 BAPIACEXTC 1000 X Container for 'Customer Exit' Parameter
EXTENSION2 BAPIPAREX 990 X Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
PAYMENTCARD BAPIACPC09 212 X Payment Card Information
REALESTATE BAPIACRE09 91 X Real Estate Account Assignment Data
RETURN BAPIRET2 548 Return parameter
VALUEFIELD BAPIACKEV9 76 X CO-PA Account Assignment Value Fields

Functionality
Using this method you can create a posing in accounting for certainbusiness transactions.
Possible (Business Transactions):

  • Postings that generally only affect the general ledger. (RFBU)

  • Billing: For billing in Sales and Distribution, accounting is supplied
  • with the relevant billing data. (SD00)Billing Document
    • Accounting can use the data of a logistics system that result from an
    • Invoice Receipt. (RMRP)
      • Goods Movement are triggered by transactions
      • in Sales and Distribution or by inventory postings. Within logistics,they lead to a change in the warehouse stocks of Inventory Management. This results in a posting inaccounting. This is why accounting is supplied with the relevant datafrom logistics. (RMWA)

        Example

        • Billing document:

        • By selling goods in accordance with targets, revenue is generated. Therevenue is posted in billing and forwarded to accounting.
          • Invoice receipt:

          • Raw materials are purchased in accordance with targets. The invoicereceipt is posted in a logistics system. The data from the rawmaterials is forwarded to accounting.
            • Goods Movment:

            • The use of raw materials leads to a change in stock in inventorymanagment. The posting of raw material consumption is forwarded toaccounting.
              • G/L Account Posting:

              • Provision posting for an expected warranty service. This can refer toacquisitions or retirements belonging to stocks that are not insubledger accounting relevant to inventory management. This isparticularly the case if such materials are not displayed asvendor/customer, materials, loans etc. or cannot be displayed in thisway. This can also refer to write-ups or depreciation that containhigher aggregations of values than are maintained in a correspondingsubledger that is relevant to inventory management.
                The conversion of foreign currencies for receivables/payables due tolarge exchange rate changes that should not lead to an update of theaccounts payable or accounts receivable accounting. A similartransaction can arise for the revaluation of raw materials if thisrevaluation takes place at a correspondingly aggreagated level.
                Reclassification of inventory of P&L statement accounts that are onlyused for reconcilliation purposes in the general ledger (thisrearranges values for balance sheet items).
                Balance reclassifications of stocks to receivables with differentreturn times.

                Notes

                • If the parameter CurrencyAmount is filled with the currency fields, a
                • complete document check including characteristics and value componentsof profitability analysis (CO-PA). Otherwise, the account assignmentobjects are checked.
                  • Messages are returned in the parameter Return. In the parameter
                  • documentation you can find the return values and their meaning.

                    Further information
                    You can find further information in the SAP Library under "Financials-> Accounting - General (AC) -> Interfaces to Accounting (AC)".
                    INCLUDE ACC_AWTYP_AWKEY_AWSYS OBJECT DOKU ID TX
                    INCLUDE ACC_AWTYP_AWKEY_AWSYS OBJECT DOKU ID TX
                    INCLUDE ACC_AWTYP_AWKEY_AWSYS OBJECT DOKU ID TX

                    Description
                    In this parameter fields are transferred that only affect the contractaccounts receivable (FI-CA).
                    By filling this field, the sender controls the FI-CA open itemaccounting instead of accounts receivable accounting.

                    Parameter documentation

                    Description
                    Parameters for the transfer of document header data.
                    The following fields must be filled:

                    • OBJ_TYPE Sender identification

                    • OBJ_KEY Reference number of source document

                    • OBJ_SYS Logical system of source document

                    • COMP_CODE Company code

                    • PSTNG_DATE Posting date

                    • BUS_ACT,,,,Business transaction

                    • USERNAME Document creator
                    • Default
                      The field COMPO_ACC must remain empty for a generalposting. If an SAP component is transferred in this field, a postingwill only be made in this component. This function is only used forposting subsequently.
                      INCLUDE ACC_AWTYP_AWKEY_AWSYS OBJECT DOKU ID TX


                      INCLUDE ACC_BAPI_ACCOUNTGL OBJECT DOKU ID TX
                      INCLUDE ACC_BAPI_ACCOUNTPAYABLE OBJECT DOKU ID TX
                      INCLUDE ACC_BAPI_ACCOUNTRECEIVABLE OBJECT DOKU ID TX

                      Description
                      Parameters for the transfer or tax lines.
                      The following fields must be filled:

                      • ITEMNO_ACC,,,,Item number

                      • TAX_CODE,,,,Tax code

                      • COND_KEY,,,,Condition type

                      • If the Jusistiction Code is active, these fields must also be filled.
                        The currency fields are not contained in this parameter. They must betransferred in the parameter Currency Amount for the different currencytypes or currencies. A connection is created to the correspondingdocument line item via the item number ITEMNO_ACC which must be uniquefor all line items.

                        Description
                        In this parameter fields are transferred that are concerned with anaccounting document not including the contract accounts receivable andpayable (FI-CA) at the item level.
                        Link to debitor line:
                        The item is also transferred to the debitor line (ACCOUNTRECEIVABLE)and must therefore contain the same item number (ITEMNO_ACC).
                        INCLUDE ACC_BAPI_CRITERIA OBJECT DOKU ID TX
                        INCLUDE ACC_BAPI_CURRENCYAMOUNT OBJECT DOKU ID TX

                        Description
                        This exit can be used to edit the accounting document before it istransferred to the accounting components for the update.
                        For this, BTE technology (Business TransactionEvents) is used.

                        Description
                        This enhancement structure can be used to transfer additional fields.
                        There are four fields available for each data record (VALUEPART1 - 4),which each contain 240 characters. A defined ABAP dictionary structurecan be transferred in the field STRUCTURE, on the basis of which thefield contents are read.
                        The accounting document can be supplemented and changed in animplemented BAdI (ACC_DOCUMENT) before theactive accounting component is called.

                        Default
                        The class CL_EXM_IM_ACC_DOCUMENT is available as exampleimplementation. Here, for each data record of the parameter that istransferred the ABAP dictionary structure is checked and the content ofthe fields VALUEPART1 to -4 is set in the structure. If the structurethat is transferred contains a field POSNR, the associated lines of theaccounting document are updated using the contents of the enhancement.

                        Description
                        In this parameter data for credit card payment can be transferred.
                        Link to debitor line:
                        The item is also transferred to the debitor line (ACCOUNTRECEIVABLE)and must therefore contain the same item number (ITEMNO_ACC).

                        Description
                        This parameter can be used to transfer account assignments for RealEstate Management.
                        The current line represents an addition to the accounting document lineitems (ACCOUNTGL, ACCOUNTRECEIVABLE, ACCOUNTPAYABLE). The line inparameter REALESTATE must be connected to the document line item(ITEMNO_ACC) using the line number.
                        INCLUDE ACC_BAPI_RETURN OBJECT DOKU ID TX
                        INCLUDE ACC_BAPI_VALUEFIELD OBJECT DOKU ID TX

1622448Error FAGL_POST_SERVICE 014 when parking w/ acctg interface
1241247BAPI does not update External Tax System
1539041BAPI_ACC_DOCUMENT_POST: Incorrect line item schema
1578618Error F5 800 for postings using BAPI
1546106No distribution of postings split in FI using ALE
1533673BAPI_ACC_DOCUMENT_POST with asset lines: Error AA486
1538291BAPI_ACC_DOCUMENT_POST: Incorrect assignment of tax data
643232General BAPIs do not generate asset line items
1521108Posting split with Note 1353125 not for net document types
1024468Error log in accounting IDOCS
1246803Vendor net procedure using BAPI_ACC_DOCUMENT_POST
1447027Cross-company code: BAPI does not write any external tax
1223773IDoc BAPI BADI_TAX1_XTXIT_SET line by line tax does not work
1415524Printing VAT protocol - /BGLOCS/FI_VATPROTOCOL
1415526Cancellation of FI Sales documents - /BGLOCS/VATREPORT07
1393645FI validations in BAPI_ACC_DOCUMENT_POST
1079979Document number from incorrect number range for AWTYP=BKPFF
1318938BAPI: tax data in ACCTX for Accounting Interface
769308Error KI235 when posting to cost object
1249265FF711 in BAPI with several documents and jurisdiction codes
1232273BAPI_ACC_DOCUMENT_POST: VATDATE not transferred
1233805Error message RW 016 in transaction FBRA
1085328Net procedure w/ BAPI and AWTYP BKPFF
1083289Switch off pricing call during FI posting for warranty
1026399Error in advance tax return in input tax adjustment doc
1040798BAPI_ACC_DOCUMENT_POST: Error message F5 800
926421Document number from incorrect number range
794974Problems with cross-company code transactions
884246No FI document with BAPI postings with BKPFF
784598CRM rebate settlement: Tax-transfer
713549Reversal: Message_Type_X
577565Change of AC document from RE via BAdI
716243Reconstructing: Incompletely updated down payment chains
660591Error RW621 after implementation of Note 561175
487722Using EXTENSION1 for accounting BAPIs
427156CRM billing document: tax transfer
424374PI 2001.1 required for FS-AM general ledger connection