Ansicht
Dokumentation

REFX_REEX_FI_BAPI - Change Document Data (BAdI)

REFX_REEX_FI_BAPI - Change Document Data (BAdI)

RFUMSV00 - Advance Return for Tax on Sales/Purchases   CPI1466 during Backup  
This documentation is copyright by SAP AG.
SAP E-Book

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.

You want to change document data, for example in periodic postings.

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

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).

Notes for Developers






BAL_S_LOG - Application Log: Log header data   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 2607 Date: 20240523 Time: 195840     sap01-206 ( 42 ms )