Ansicht
Dokumentation

OHIX0703 - Define Additional Fields

OHIX0703 - Define Additional Fields

CPI1466 during Backup   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

You can make the following settings in this Customizing activity:

  • Define additional fields for use in the SAP Query and the Ad Hoc Query. (Additional fields are proposed when you create InfoSets. They are available in the SAP Query and the Ad Hoc Query once the InfoSets have been generated.)
  • Create customer-specific retrieval routines for standard additional fields.
  • Specify standard additional fields that should not be proposed when InfoSets are created.

General information on additional fields

Defining additional fields enables you to obtain derived information. Derived information is, for example, data on a person's age derived from the date of birth that is stored in the database. Additional fields make it possible to determine and display information that is not explicitly stored in a database using the data in the database fields.

The HR application offers you the added option of defining an additional field for multiple InfoSets.

The standard system delivers additional fields (hereafter referred to as standard additional fields) for a number of infotypes. These are contained in the structure Pnnnn_AF (nnnn = infotype number).

This structure is the one you use for customer-specific additional fields too. You enter your own fields in the substructure CI_Pnnnn_AF, which is contained in Pnnnn_AF.

The standard additional field option offers you the following advantages:

  • You can use your own retrieval routines for standard additional fields.

  • You can exclude standard additional fields from use.

There are three steps involved in setting up additional fields and the associated data retrieval routines:

  • Specification of additional fields

You specify additional fields by including them in the structure CI_Pnnnn_AF. This is a substructure of the structure Pnnnn_AF (nnnn = infotype number) that contains the standard fields for the pertinent infotype.

You must assign the additional field either to an appropriate data element or create a new data element especially for it. Once you have made the required changes, you must activate the structure.

  • Program function module for data retrieval

In this step, you program your own function module used for data retrieval for the additional fields. You can use existing function modules of the type RPAQ_GET_AFnnnn as a reference to copy from.

  • Release additional field for a query

Note

Since new additional fields are assigned to an infotype, it is only possible to use the new additional field in a query if the InfoSet contains this infotype.

The new additional field then appears as one of the fields for the infotype on the Change InfoSet screen. You can integrate the additional field in existing InfoSets using the function InfoSet --> other Functions --> Update HR Additional Fields.

Note

On the screen InfoSet you can choose Edit --> Change Infotype Selection to add more infotypes to the InfoSet or delete infotypes from the InfoSet. Remember to generate the InfoSet after doing so.

The standard system already contains a number of additional fields defined for infotypes. These additional fields are contained in the structure Pnnnn_AF.

SAP recommends that you use the standard entries to guide you when you create new additional fields.

  1. In the dialog box, choose Definition of additional fields in DDIC.
The ABAP Dictionary: Initial Screen appears.
  1. Create the structure CI_Pnnnn_AF (nnnn = infotype number) for the required infotype.
The Dictionary: Maintain Structure screen appears.
  1. Enter a short description.
  2. Choose the tab page Component.
  3. Enter an eight (8) digit field name for the new additional field in line with the DDIC naming conventions.
  4. Either create a new data element for the new additional field or assign it to an appropriate existing data element.
  5. Save your entries and then activate the structure.
  6. Return to the Create Activity screen and choose the field Create coding for additional field.
  7. The Function Builder: Initial Screen appears.
You are now on the initial screen for function module maintenance.
In order to create a function module, you must first define a function group. To do so, you have to go to function group administration.
  1. Choose Goto -> Function group administration-> Create group.
  2. Create a function group.
When you save the new function group, you return to the initial screen of the function builder.
  1. Program the function module that will be used for the additional field.
You should use the existing standard function module RPAQ_GET_AF_nnnn (nnnn = infotype number) as a reference to copy from.
The interface of the function module contains three parameters that have to be adjusted to the infotype. The other parameters are fixed and do not require adjustment. The three infotype-specific parameteres are:
- Third importing paramter C_ITnnnn (nnnn = infotype number): Adjust parameter name and typing to suit infotype
- Exporting paramter AF_VALUES: Adjust typing to infotype
- Fourth table parameter ITnnnnn: (nnnn = infotype number): Adjust parameter name and typing to suit infotype
If there is already a standard function module for the infotype available, you can use it as a reference from which to copy. This ensure that you define the interface correctly and eliminates the need for adjustment.
  1. Save your entries.
  2. Go to the activity "Determine data retrieval routines and standard add'l fields".
  3. Choose New entries.
Under Table name enter the name of the structure Pnnnn_AF. Under Field name enter the name of the additional field and under + the name of the function module for value retrieval.
  1. Save your entries.

Specify standard additional fields that should not be proposed when InfoSets are created.

If you want to specify that a standard additional field is not to be proposed when an InfoSet is created, you must complete the fields 'Table name' with the name of the structure Pnnnn_AF, and 'Field name' with the name of the additional field, and leave the function module field blank.






General Data in Customer Master   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 7674 Date: 20240607 Time: 222305     sap01-206 ( 104 ms )