Hierarchy

⤷

⤷

IMG Activity
ID | REFX_REEX_FI_BAPI | Change Document Data (BAdI) |
Transaction Code | S_PEN_05000410 | (empty) |
Created on | 20050623 | |
Customizing Attributes | REFX_REEX_FI_BAPI | Change Document Data |
Customizing Activity | REFX_REEX_FI_BAPI | Change Document Data |
Document
Document Class | SIMG | Hypertext: Object Class - Class to which a document belongs. |
Document Name | REEX_FI_BAPI |
Use
The REEX_FI_BAPI BAdI makes it possible to change document data before it is transferred to the Accounting Interface. To do this, implement the BAPIDOC_MODIFY method.
The BAdI is executed for all RE posting processes, such as periodic postings, input tax distribution, service charge settlement, sales-based settlement, and so on. However, it is not executed for pure FI postings (such as FB60, FB01, and so on), even if there is account assignment to real estate objects.
Caution: Only change non-critical data, such as payment data, dunning data, segment text, and so on. Never change critical data such as accounts or amounts.
Requirements
You want to change document data, for example in periodic postings.
Standard settings
Activities
Implement the BAPIDOC_MODIFY method of the BAdI using transaction SE19.
The parameters are:
ID_MODE: Mode of the posting run (E: update run, S: simulation)
ID_PROCEDURE: Procedure (such as REDP for customer receivables, RETP for G/L account transfers, RECP for vendor payables, and so on)
IS_RE_HEADER: Document header data of RE document
IT_RE_ITEM: Table of line item data of RE document
CS_BAPI_HEADER: Document header data
CT_BAPI_ITEMS_AR: Document line items of debit items (except amounts and RE data)
CT_BAPI_ITEMS_AP: Document line items of credit items (except amounts and RE data)
CT_BAPI_ITEMS_GL: Document line items of G/L account items (except amounts and RE data)
CT_BAPI_ITEMS_TAX: Tax lines
CT_BAPI_ITEMS_AMOUNT: Amount items
CT_BAPI_ITEMS_RE: Data of RE, such as contract number
CT_BAPI_ITEMS_WT: Withholding tax types and withholding tax codes for the corresponding items
Example
The following example describes how the BAdI can be used.
In contract maintenance for customer contracts, you defined payment method 'E' (bank debit). For credit memos, you want to replace this with 'U' (bank transfer), if the contract is already ended on the posting date.
In a loop over the debit items in table CT_BAPI_ITEMS_AR, you check if the credit memos have payment method E. After that, the end date of the contract is determined and compared with the posting date of the document. If the contract is ended, the payment method is changed to 'U.'
Refer to the sample code (Goto -> Sample Code -> Display).
Business Attributes
ASAP Roadmap ID | 153 | Design enhancements |
Mandatory / Optional | 3 | Nonrequired activity |
Critical / Non-Critical | 1 | Critical |
Country-Dependency | A | Valid for all countries |
Maintenance Objects
Maintenance object type | E | Business Add-In - Definition |
History
Last changed by/on | SAP | 20050623 |
SAP Release Created in | 600 |