Show TOC

Define Additional Fields

You can make the following settings in this Customizing activity:

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 functional areas.

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.

In addition, you have the option of excluding standard additional fields when functional areas are created. (This also excludes them from use generally. You can use your own retrieval routines for standard additional fields if required.

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

(These three steps correspond to the Customizing activities you can call from the following Customizing nodes.):

1. 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 functional group (i.e. infotype).

In the ABAP Dictionary you have to 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 in the ABAP Dictionary, you must activate the structure.

2. Program function module for data procurement

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.

3. Assign additional field to an infotype and a function module

You assign the additional field to an infotype and enter the name of the function module.

Note

Since new additional fields are assigned to an infotype, it is only possible to use the new additional field in a Query if a functional area has been created for this infotype.

The new additional field then appears as one of the fields for the infotype on the Change Functional Area <Name> screen and is assigned to the pertinent functional group by default.

Note

When you define an additional field in this way, you cannot later include it in another existing functional area.

Standard Settings

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

Recommendation

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

Activities

1. In the dialog box, choose Definition of additional fields in DDIC.
The ABAP Dictionary: Initial Screen appears.
2. Create the structure CI_Pnnnn_AF (nnnn = infotype number) for the required infotype.
The ABAP Dictionary: Table/Structure: Display Fields screen appears.
3. Choose Table -> Change and then Edit -> New fields.
4. Enter an eight (8) digit field name for the new additional field in line with the DDIC naming conventions.
5. Either create a new data element for the new additional field or assign it to an appropriate existing data element.
6. Save your entries and then activate the data element and the structure.
7. Return to the Create Activity screen and choose the field Create coding for additional field.
8. The ABAP Editor: 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.
9. Choose Goto -> Function group administration-> Create group.
10. Create a function group.
When you save the new function group, you return to the initial screen for function module editing.
11. 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.
12. Save your entries.
13. Go to the activity "Determine data retrieval routines and standard add'l fields".
14. 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.
15. Assign the additional field to an infotype. Please note that an additional field may be assigned to one infotype only.
16. Save your entries.

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

If you want to specify that a standard additional field is not to be proposed when a functional area is created, you must complete the fields 'Table name' and 'Field name' and leave the '+' field blank in the activity "Determine data retrieval routines and standard add'l fields".

Further Notes

The ABAP Query in the standard system already contains a number of tables and additional fields in the structures Pnnnn_AF.