SAP Logical Databases are special ABAP programs that read data from database tables. We can use logical database in a executable program by just specifying the name of the logical database in the program attributes. When you run your executable program, the logical database program will also run simultaneously with it. SAP has provided logical database for all categories.
In Human Resources (HR), the following logical databases can be used as a data source for HR InfoSets:

  • PAP
  • PCH
  • Structure
  • Selection
  • Database Program

The structure of a logical database determines the database tables which it can access. It adopts the hierarchy of the database tables defined by their foreign key relationships. This also controls the sequence in which the tables are accessed.

Every logical database has its own selection screen. Every executable program can use the selections defined in the logical database and it can add its own specific selections.The selection screen 1st displays the selection of the logical database followed by the selection of the calling program.
The logical database provides several selection criteria. These are divided into the following three groups:

  • Person selection
  • Sorting the person selection
  • Data selection

Database Program:
The database program of a logical database is a container for special subroutines, in which the data is read from the database tables. These subroutines are called by the reporting processor in the runtime environment in a predefined sequence.
The most important functions of the logical database are:

  • Data Retrieval
    Using only a single get pernr statement in our executable program, the logical database can extract the data for an employee one at a time which we can use for further processing.
  • Data Selection
    The logical database has its own selection screen. Depending upon the selection criteria given in the logical database selection screen, it will extract the data. For ex if we want to extract all the employees from a particular payroll area, just specify that payroll area in the logical database selection screen and it will read all the employees in that payroll area. No need to write any extra code.
  • Authorization
    The logical database executes an authorization check for personnel data. It checks whether the master record of the user who starts the report contains the authorizations for the data that is to be read in the report. A distinction is made between a person and a data authorization. The system first checks whether the user has an authorization for the employee in accordance with the criteria of organizational assignment. Employees for which the user has no authorization are not evaluated. The system then checks whether the user is authorized to process the infotypes of the specified report.

Need Help:
In case you need assistance in SAP Logical Database, please contact us. Please send us your questions, comments or assistance request, and our team would be glad to assist you.

Please send us your questions, comments or assistance, and our team would be glad to assist you.

By Gopichand Panghate. (on behalf of SAP Consulting Team)

SAP :: Streamlined

We offer variety of services including SAP ECC ,SAP HR,SAP BW,SAP CRM, SAP SCM,SAP BPM, Business Objects, SAP ABAP DevelopmentSAP BASIS and SAP NetWeaver consulting. We have expertise in providing implementation,development, SAP Migration and SAP support services to SAP customers across diverse industries at a global level.
Have a question on SAP? Write to our SAP Architect.

(We promise a no-obligation consulting reply)