How to Read Infotype Data Using Standard Classes and Methods

  • by Rehan Zaidi, Senior SAP Technical Consultant
  • December 7, 2015
Fetching data based on certain selection criteria remains an important requirement for SAP developers. Learn about the various scenarios that can arise and the coding for accessing the employee data from SAP standard and custom infotypes.
Learning Objectives

After reading this article, you will:

  • Understand the steps required in reading data from both standard and custom infotypes
  • See the difference between the coding used for a single record access and that for fetching a set of records from an infotype table
  • Know how to read long text stored for a particular infotype record
Key Concept
In ABAP objects, global interfaces are defined using transaction code SE24. Standard classes can implement these interfaces. Any methods that are contained within the implemented interface can be called using the objects of these classes.

Accessing data from various infotypes is an essential requirement for SAP ERP HCM developers. This is typically needed in report programs that HCM users may ask for in order to view data from one or more employee infotypes. SAP provides a number of useful classes and methods for this purpose. Due to the ease and reliability with which data from standard and custom infotypes can be read into ABAP programs, knowledge of this topic is essential for SAP developers. Additionally, using this object-oriented approach is recommended over other techniques, such as use of function modules or obsolete forms of IMPORT statements.

ABAP classes and methods are available for both reading and changing the data residing in infotypes. A detailed discussion of ABAP objects is beyond the scope of this article. For more on classes and objects in ABAP, refer to the following link:

I provide an overview of the classes and interfaces available for reading infotype data in custom programs. In the first section I cover the steps required to read one or more records from an infotype table. Next, I show how you can use the standard methods for reading a single infotype record for various validity date criteria. Finally, I show how to fetch the long text stored via simple and easy steps for a given infotype record.

The primary audience for this article is SAP HR developers and users. I provide coding examples and necessary screenprints to illustrate my points. Readers can easily adapt the coding examples used in this article to suit their requirements.

Rehan Zaidi

Rehan Zaidi is a consultant for several international SAP clients (both on-site and remotely) on a wide range of SAP technical and functional requirements, and also provides writing and documentation services for their SAP- and ABAP-related products. He started working with SAP in 1999 and writing about his experiences in 2001. Rehan has written several articles for both SAP Professional Journal and HR Expert, and also has a number of popular SAP- and ABAP-related books to his credit.

See more by this author


No comments have been submitted on this article. 

Please log in to post a comment.

To learn more about subscription access to premium content, click here.