Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Declarations →  Declaration Statements →  Data Types and Data Objects →  Special Declarations 

INFOTYPES

Other versions: 7.31 | 7.40 | 7.54

This statement should be used by specialists only.In-depth knowledge of the corresponding environment is essential.This environment is not part of ABAP and is not documented here.

Quick Reference

Syntax


INFOTYPES nnnn [NAME name] 
               [OCCURS n]
               [MODE N|P]
               [AS PERSON TABLE]
               [VALID FROM intlim1 TO intlim2].

Extras

1. ... NAME name

2. ... OCCURS n
3. ... MODE N|P
4. ... AS PERSON TABLE

5. ... VALID FROM intlim1 TO intlim2

Effect

Declares an internal table for HR info types, forbidden in classes. If the addition NAME is not specified, an internal table pnnnn or ppnnnn is created with the structure of the info type Pnnnn and a header. The name ppnnnn is used when the addition AS PERSON TABLE is specified, otherwise it is pnnnn.

If the addition MODE N is not specified, the statement INFOTYPES modifies the behavior of the special logical databases PAP, PCH, PNP, and PNPCE of the human resources component HR by default and is the prerequisite for it working correctly.

A four-digit numeric key of an info type of SAP ERP component human resources (HR) must be specified for nnnn . Each info type is represented in the HR component by a special structure called Pnnnn in ABAP Dictionary. Each info type contains the character-like components BEGDA and ENDDA.


Notes

  • The internal table created by the statement INFOTYPES can also be declared using the following (obsolete) statement sequence but is then ignored by the special logical databases.
DATA BEGIN OF {pnnnn|ppnnnn|name} OCCURS { 10 | n }.
  INCLUDE TYPE pnnnn.
DATA END OF {pnnnn|ppnnnn|name}
     VALID BETWEEN {begda|intlim1} AND {endda|intlim2}.

  • No internal tables with header lines can be declared in classes. For this reason, the statement INFOTYPES is forbidden here.
  • In executable programs that are associated with the special logical databases PAP, PCH, PNP, and PNPCE of the human resources component, the statement INFOTYPES is still required and should only be used here.
  • PNPCE is by far the most important of the logical databases PAP, PCH, PNP, and PNPCE. The logical data type PAP is hardly used anymore.
  • Info types make it possible for an HR application to handle employee-related data effectively. The special statement PROVIDE is used for this.
  • To ensure that the statement works with the logical databases correctly, it must be executed in the global declaration part and before the first operational statements of an executable program.
  • The properties of the special logical databases determined by the statement INFOTYPES allow themselves to be changed using defined macros while the program is executed. For the logical database PNPCE, these are the macros PNP_SET_INFTY_MODE_BY_NAME and PNP_SET_INFTY_MODE_BY_NUMBER for changing the mode and RP_SET_DATA_INTERVAL, RP_SET_DATA_INTERVAL_INFTY, and RP_SET_DATA_INTERVAL_ALL for setting the validity period.

Addition 1

... NAME name

Effect

Using the addition NAME, a name of up to 20 characters can be specified that is then used for the table instead of pnnnn or ppnnnn.

Addition 2

... OCCURS n

Effect

If the addition OCCURS is not specified, the default memory requirements of the internal table are set to ten rows (see the addition INITIAL SIZE of the statement TYPES - TABLE OF). The addition OCCURS can be used to specify a numeric literal or a numeric constant n to determine a different initial memory requirement.

Addition 3

... MODE N|P

Addition 4

... AS PERSON TABLE

Effect

These additions modify the behavior of the special logical databases PAP, PCH, PNP, and PNPCE of the human resources component. AS PERSON TABLE and MODE P, on the other hand, only modify the logical database PNPCE.

If the addition MODE N is not specified, the properties of the internal table are stored in an internal system table accessed in this logical database. If the statement INFOTYPES is executed without the addition MODE N in an executable program that is associated with one of these logical databases, the behavior is as follows:

  • The logical database PAP fills the internal table for the event GET applicant.
  • The logical database PCH fills the internal table for the event GET object.
  • The logical database PNP fills the internal table for the event GET pernr.
  • The behavior of the logical database PNPCE can also be controlled using the additions AS PERSON TABLE and MODE P:
  • If one of these additions is not specified, the table is filled with the event GET pernr. Only those data records are provided that fall in the specified evaluation period on the selection screen (this is a difference to the logical database PNP, which provides all data records by default). Alternatively, the macros RP_SET_DATA_INTERVAL, RP_SET_DATA_INTERVAL_INFTY, and RP_SET_DATA_INTERVAL_ALL defined in the logical database can be used to specify the data records that are to be provided.
  • If only the addition AS PERSON TABLE is specified, the internal table is filled with the event GET group. All data records of all personnel numbers are provided that are in the included structure ALL_PERNRS of the structure group and for which there is authorization. Only those data records are provided which fall in the evaluation time period on the selection screen. Alternatively, the macros RP_SET_DATA_INTERVAL, RP_SET_DATA_INTERVAL_INFTY, and RP_SET_DATA_INTERVAL_ALL defined in the logical database can be used to specify the data records that are to be provided.
  • If only the addition AS PERSON TABLE together with MODE P is specified, the internal table is filled with the event GET person. All data records of all personnel numbers are provided that are in the included structure ALL_PERNRS of the structure person. No authorization check is executed and all existing data records are displayed in every case irrespective of how the evaluation period was set on the selection screen. Using the macros RP_SET_DATA_INTERVAL, RP_SET_DATA_INTERVAL_INFTY, and RP_SET_DATA_INTERVAL_ALL does not have any influence.

If the addition MODE N is specified, the table is not associated with the logical databases and is not filled with the GET events.


Note

For more information, see the documentation about the logical databases and particularly the PNPCE documentation.

Addition 5

... VALID FROM intlim1 TO intlim2

Effect

If the addition VALID FROM is not specified, the components BEGDA and ENDDA of the info type Pnnnn are set implicitly as the interval boundaries for the obsolete form of the statement PROVIDE. If the addition VALID FROM is specified, other flat character-like components intlim1 and intlim2 of the info type can be set as implicit interval boundaries.