SAP ABAP IMG Activity REFX_RERA_DOC (Change RE Document Before Posting)
Hierarchy
EA-FIN (Software Component) EA-FIN
   RE-FX (Application Component) Flexible Real Estate Management
     RE_CA_CU (Package) RE: Customizing (IMG) and Area Menu
IMG Activity
ID REFX_RERA_DOC Change RE Document Before Posting  
Transaction Code S_PEN_05000406   (empty) 
Created on 20050623    
Customizing Attributes REFX_RERA_DOC   Implement Enhancements (BAdI) 
Customizing Activity REFX_RERA_DOC   Implement Enhancements (BAdI) 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name RERA_DOC    

Use

Using this BAdI, you can change document data of an RE document before the FI document data is created, meaning that it is also before the data is transferred to the Accounting Interface.

You can use the following methods:

  • BEFORE_POST
  • BEFORE_POST_EXTERNAL
  • AFTER_POST
  • BEFORE_REVERSE
  • AFTER_REVERSE

Using the BEFORE methods, you can change or check the data before it is posted or reversed. Using the AFTER methods, you can react to the posting or reversal and, for example, send your own messages or update your own tables.

The BAdI is executed for all RE posting processes, such as:

  • Periodic posting
  • Input tax distribution
  • Service charge settlement
  • Sales-based settlement

However, the BAdI is not executed for pure FI postings (such as, FB60, FB01), even if there is account assignment to real estate objects.

Important: 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

Standard settings

Activities

Create a BAdI implementation and implement the methods you require for your enhancement. Then activate the BAdI implementation.

The following parameters are available for the methods BEFORE_POST and BEFORE_REVERSE:

  • ID_PROCESSMODE: Mode of the process (simulation/update run)
  • CS_HEADER: Document header data (can be changed)
  • CT_ITEM: Line item data (can be changed)
  • CT_WT_ITEM: Withholding tax data for line items (withholding tax type and withholding tax code)
  • CT_MESSAGE: Messages (can be changed)

If you insert an error message in CT_MESSAGE, then the document is not posted. In this way, you can prevent the posting using your own checks, if you wish.

The following parameters are available for the BEFORE_POST_EXTERNAL method:

  • ID_PROCESSMODE: Mode of the process (simulation/update run)
  • CS_HEADER: Document header data (can be changed)
  • CT_ITEM_RE_DOC: Line item data of RE document
  • CT_ITEM_EX_DOC: Line item data of external document (can be changed)
  • CT_WT_ITEM: Withholding tax data for line items (withholding tax type and withholding tax code)
  • CT_MESSAGE: Messages (can be changed)

If you insert an error message in CT_MESSAGE, then the document is not posted. In this way, you can prevent the posting using your own checks, if you wish.

Method BEFORE_POST_EXTERNAL can be used, for example, to summarize the items of external document CT_ITEM_EX_DOC according to specified criteria. However, in that case, it is important to adjust the item references in the unchanged RE document CT_ITEM_RE_DOC accordingly.

The following parameters are available for the AFTER_POST method:

  • ID_PROCESSMODE: Mode of the process (simulation/update run)
  • IS_HEADER: Document header data (no changes allowed)
  • IT_ITEM: Line item data (no changes allowed)
  • IT_WT_ITEM: Withholding tax data for line items (no changes allowed)
  • CT_MESSAGE: Messages (can be changed)

Once the posting is made, changes are no longer allowed. However, you can add your own messages to CT_MESSAGE.

The following parameters are available for the AFTER_REVERSE method:

  • ID_PROCESSMODE: Mode of the process (simulation/update run)
  • ID_REVERSAL_REF: Reference key of the reversal document (no changes allowed)
  • ID_LOGSYSTEM: Logical system (no changes allowed)
  • IS_HEADER: Document header data (no changes allowed)
  • IT_ITEM: Line item data (no changes allowed)
  • IT_WT_ITEM: Withholding tax data for line items (no changes allowed)
  • CT_MESSAGE: Messages (can be changed)

The data in IS_HEADER, IT_ITEM and IT_WT_ITEM relates to the original document that was reversed.

Example

As an example, you write a reference of your choice in the EXTREF1, EXTREF2 or EXTREF3 field. The contents of these fields is transferred, when an FI document is posted, to the BSEG-XREF1, XREF2, or XREF3 fields, where the contents are then available to other processes. This procedure is used, for example, in Switzerland for the ISR (inpayment slip with reference) reference.

Also refer to the sample code of the BEFORE_POST method. Choose Goto -> Sample Code -> Display.

Note:

The system runs through this BAdI before document summarization. In this way, changes to the line items are taken into account during the summarization.

The GENDATA field of the item table is not considered during summarization and is not transferred to the document. It is a purely technical field, which is suitable for transporting data to the BAdI REEX_FI_BAPI.

See also

For information on using BAdIs, see this documentation.

Notes for Developers

Business Attributes
ASAP Roadmap ID 153   Design enhancements 
Mandatory / Optional 3   Nonrequired activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20110802 
SAP Release Created in 600