SAP ABAP IMG Activity REFXRECPYH (Implement Enhancements (BAdI))
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 REFXRECPYH Implement Enhancements (BAdI)  
Transaction Code S_ALN_01000787   (empty) 
Created on 20020129    
Customizing Attributes REFXRECPYH   Implement Enhancements (BAdI) 
Customizing Activity REFXRECPYH   Implement Enhancements (BAdI) 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name RECP_OI    

Use

When you create a document for an office application, the system transfers certain application data from the SAP System to the office application. This application data is output in the specified areas of the template (merge fields).

SAP's standard delivery includes a wide range of application data for output in your office document. Use method CHANGE_DOC_DATA to change application data before transferring it to your office application.

If you require any of the following, you should implement the Business Add-In.

  1. You require additional data that is not included in the SAP standard delivery (for instance, data from customer-specific tables).
  2. You wish to change standard data (for instance, modify certain texts).
  3. You wish to reformat standard data (for instance, number of decimal places).

If you have already enhanced the CI includes of the master data tables in order to define user fields without modifying the code, you do not need to implement the Business Add-In. The data from the CI includes is automatically transferred to your office application.

You can limit the selection of templates using the method CHANGE_TEMPLATE_RANGE. In doing to you can have read access to the data of the object.

Requirements

Standard settings

Correspondence using an office application is supported for the following object types:

  • Architectural object
  • Business entity
  • Land
  • Building
  • Rental object
  • Real estate contract

The Business Add-In supports enhancements for all the above object types and provides a common interface. When you implement a Business Add-In, choose the filter attribute corresponding to the particular object type. For instance, to change the contract data to be transferred, choose object type IS (real estate contract) as the filter attribute.

Multiple implementation of the Business Add-In in the same system is possible, which means that the data to be transferred can be changed by partner add-ons or your own enhancements.

Activities

Each of the above object types has exactly one DDIC structure whose data is transferred to the office application. The names of these structures are displayed in the IMG activity Correspondence -> Office Application (Single Print) ->Basic Settings and Document Templates in the Data Transfer Structure field.

To implement an enhancement, carry out the following steps:

  1. Add the additional fields you want to the transfer structure using an APPEND (see requirement 1 or 3).
    Start transaction SE11 and display the required structure. Choose menu path Goto -> Append Structure... and enter the new fields. Activate the structure.
  2. Implement the Business Add-In. Assign the required values to the fields in method CHANGE_DOC_DATA. Activate the Business Add-In implementation.
    For more information on Business Add-Ins, choose Goto -> Online Handbook in the BAdI Builder or choose @0S@ in the toolbar.
  3. Use the new fields in the template for the office document you wish to create. Open the required template in the detail view of the IMG activity Basic Settings and Document Templates.
    To include field ZMYFIELD in a Microsoft Word template, position your cursor on the appropriate place in the document and choose Insert -> Field -> Category: Mail Merge -> Field Name: Merge Field. In the MERGEFIELD input field, enter the field name ZMYFIELD and confirm. Save the template.

Note on data format:
The application data is output in the office document as displayed in the SAP System. This is particularly relevant for the display of dates and figures, which you can modify with transaction User Settings.
For technical reasons, the formatting options for the merge field of Microsoft Word are not available.
If you require another format, add another field of type CHAR to the structure and specify the value explicitly in method CHANGE_DOC_DATA (for instance using the ABAP statement WRITE ... TO ...).

Note that a maximum of 4096 fields per document can be transferred to the office application (standard fields and fields added with APPEND).

Example

See BAdI Builder under Goto -> Sample Code -> Display. Doubleclick method name CHANGE_DOC_DATA.

Notes for Developers

Business Attributes
ASAP Roadmap ID 153   Design enhancements 
Mandatory / Optional 1   Mandatory 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  20050519 
SAP Release Created in 110