Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to fetch the from different HrR tables

Former Member
0 Kudos

This is a simple query of employee number, name, location and phone number based on selection criteria of Personnel Area (P0001-WERKS), Employee Status (P0000-STAT2) and Key date(P0001-begda) is parameter.

The following Data need to be fetch:

Employee Number(P0709-PERSON_TXT)

Employee Name(P0002-NACHN,VORNA,MIDNM)

Primary Location (SAP Business Area, P0001-GSBER)

Location Description (SAP Business Area Text)

Location Main Phone Number (where P0006-COM0X "Work", return AREAX and TELNX to produce formatted number, ex: 305-882-5300).

Please help me out.

5 REPLIES 5

Former Member
0 Kudos

HI,

Look into the tables and try to find out the Relation ship among the Fields.

Each table is Associated with Another with some fields.

Then Use HR_READ_INFOTYPE FM to Fetch the Data.

Regards

Sumit Agarwal

Former Member
0 Kudos

Use GET PERNR.

and retrive data from different infotypes by select single query and also provide the where condition as :

WHERE pernr = pernr-pernr

AND sprps = space

AND endda >= sy-datum

AND begda <= sy-datum.

0 Kudos

Can you please tell me the syntax for how to get the data from diferent tables with single select statment as per selection criteria

Former Member
0 Kudos

go with all entries

milusai
Participant
0 Kudos

Use ldb PNPCE in program attributes.

define infotypes ; 0000, 0002 , ..... (which u require)

use Get Peras(Node) in Start-of-selection.

then

retrive the data using macros

RP_PROVIDE_FROM_LAST P0000 space pn-begda pn-endda.

ur P<NNNN> structure will be filled with the required data.

Regards,

Milind