Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Declarative statemnts →  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.

Short 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

Declaration of an internal table for HR info types, forbidden in classes. Without the NAME addition, 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.

So long as the MODE N addition is not specified, the statement INFOTYPES influences the bevaior of the special logical databases PAP, PCH, PNP, and PNPCE of the component human resources HR by default and is the prerequisite for it functioning correclty.

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 INFOTYPES statement can also be declared using the following (obsolete) statement sequence but then does not have any effect upon 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 connected 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 section and before the first operational statements of an executable program.
  • The properties of the special logical databases determined by the INFOTYPES statements 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, 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 NAME addition, you can specify a name of up to 20 characters which is then used for the table instead of pnnnn or ppnnnn.

Addition 2

... OCCURS n

Effect

Without the OCCURS addition, the default memory requirements of the internal table are set to ten rows (see addition INITIAL SIZE of the statement TYPES - TABLE OF). You can use the addition OCCURS 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

The additions affect the behavior of the special logical databases PAP, PCH, PNP, and PNPCE of the human resources component, where AS PERSON TABLE and MODE P only have an effect on the logical database PNPCE.

If the MODE N addition is not specified, the properties of the internal table are stored in an internal system table which is accessed in this logical database. If the statement INFOTYPES is executed without the addition MODE N in an executable program that is connected with one of these logical databases, then 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 additionally be controlled using the additions AS PERSON TABLE and MODE P:
  • Without one of these additions, 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 itnernal 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 MODE N addition is specified, the table is not connected with the logical databases and is not filled with the GET events.


Note

For more information see the documentation on the logical databases and particularly that of PNPCE.

Addition 5

... VALID FROM intlim1 TO intlim2

Effect

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