Ansicht
Dokumentation

OHBX2020 - Enhancement: Create New Text Variables

OHBX2020 - Enhancement: Create New Text Variables

General Material Data   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.
SAP E-Book

In this step, you can create additional text variables for applicant correspondence.

Activities

If you want to use this customer enhancement, you must do the following:

  1. Create a structure with the required database fields in the Data Dictionary.
The database fields that you want to use as text variables must generally be of the type CHAR or NUMC.
Please note that you may not use underscores (_) in the structure for technical reasons.
  1. Create a new module pool named ZPAP3CUS.
SAP delivers a template for your module pool ZPAP3CUS, named MPAP3CUS. The structure T500P is included in this module pool. The system reads the personnel area to which the applicant is assigned from this table. The Organizational Assignment infotype (0001) must therefore be declared as tables P0001 in the module pool. When you use these routines, the addresses of the personnel areas are available.
  1. Declare the new structure with the ABAP keyword tables in the module pool. This ensures that the main programs SAPMPAP3 and RPAPRT05 can also access the data.
  2. If you use Microsoft Word for Windows for data processing, you must create a routine named fill_customer_structure in the module pool ZPAP3CUS. In this routine, you must call the routine add_customer_structure(rpaprt05) for each new structure. This makes the structure available in Microsoft Word for Windows.
Example:
If you want to use the structure ZZZZZ, your routine should be as follows:
form fill_customer_structure.
  perform add_customer_structure (rpaprt05) using 'ZZZZZ'.
endform.
  1. For the data to be retrieved at runtime, you must create a routine named fill_customer_data in module pool ZPAP3CUS. This routine is called by program SAPMPAP3 and program RPAPRT05 before a text is output.

Recommendation

  • If you read fields of a type other than NUMCor CHAR from the database, you must convert them using ABAP (for example, "write to g" and so on).
  • You must declare any data you require from the main programs SAPMPAP3 and RPAPRT05 as tables.

The prerequisite for this is that the data in the main programs is also declared as tables.

  • Error handling functions are built into both data processing programs.
If a field of type NUMC is initial (empty) or if a field of type CHAR has the value '$ERROR', both programs issue an error message. This allows you to control error handling of your database fields in the routine fill_customer_data more specifically.






PERFORM Short Reference   General Material Data  
This documentation is copyright by SAP AG.

Length: 3928 Date: 20240523 Time: 175908     sap01-206 ( 62 ms )