This post will describe the Accounting Interface architecture.
Overview:
This post will describe the two functions most used in the accounting interface called by FI Bapis:
- FM AC_DOCUMENT_CREATE
- FM AC_DOCUMENT_POST
This post will provide a description about most commun BAPI: BAPI_ACC_DOCUMENT_POST.
FM AC_DOCUMENT_CREATE
Responsible for data derivation and validation, substitution and user-exits.
Interface
- T_ACCHD: Accounting document head
- T_ACCIT: Accounting document items
- T_ACCCR: Accounting document amounts/currency. Should follow the OB22 customizing
- T_ACCFI: One time vendor/customer
- T_ACCTX: Tax items
- T_ACCWT : Withholding tax items
All interfaces should be linked to ensure the integrity of information.
Events
- Check: basic derivation and validation (master data). Substitution in level 3 (complete document) is not called
- Close: final derivation and validation
- Split: NewGL document split
- Project Projection from ACC-structure to DB-structure
Substitution in level 3 (complete document) is not called because after event CHECK it is called other events (SPLIT and PROJECT) and it can cause inconsistences.
FM AC_DOCUMENT_POST
Interface
- I_AWTYP: Indicates the source application
- I_AWREF: Document number of source document
- I_AWORG : indicates company code/fiscal year
- I_AWSYS: Location of source document
BAPI BAPI_ACC_DOCUMENT_POST
- Check for CRM/RE reversal
- Mapping from BAPI-Structure to ACC-Interface structure
- Process BTE RWBAPI01 (EXTENSION1) and BAdI ACC_DOCUMENT (EXTENSION2)
- Call AC_DOCUMENT_CREATE
- In case of an error, process coding block validation
- Determine document number if OBJ_TYPE = BKPFF
- Call AC_DOCUMENT_POST
- Generate RETURN parameter
- Custom data:
– informed in parameter EXTENSION1 (this parameter must be supplied in order to execute the BTE RWBAPI01)
– informed in parameter EXTENSION2 (BAdI is always processed, even if EXTENSION2 is not supplied to BAPI)