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: 

HR repoting

former_member187457
Active Contributor
0 Kudos

Hi all i am first time working on HR report .....

my requirment are as follows

1.Last Name of Immediate Supervisor/Manager

Use PA0001-ORGEH as OBJID to read HRP1001with OTYPE 'O'. Find related object HRP1001-SOBID where SCLAS='S' and RSIGN='B' and RELAT='012'. Use SOBID as OBJID to read table HRP1001 with OTYPE='S'. Find related object HRP1001-SOBID where SCLAS='P' and RSIGN='A' and RELAT='008'. Use SOBID to output PA002-NACHN.

2.JOB_DESC

Use PA0001-PLANS as OBJID to read HRP1001with OTYPE 'S'. Find related object HRP1001-SOBID where SCLAS='C' and RSIGN='B' and RELAT='007'. Use SOBID as OBJID to read table HRP1000 with OTYPE='C'. HRP1000-STEXT is Job Desc.

i am unable to write the query...

Remember no 'SELECT' query..

plz help me

Thnx

Rohit

2 REPLIES 2

Former Member
0 Kudos

First of if this is just a query, you should the standard Ad-hoc query tool and use PNP logical database.

Sample code for you requirement would be

1. Create a program with PNP logical data and sent an appropriate report category (HR).

tables : pernr.

infotypes : 0000,

0001,

0002.

  • Define your internal table to capture the data

start-of-selection.

get pernr.

RP_PROVIDE_FROM_LAST P0000 SPACE PNPBEGDA PNPENDDA.

IF PNP-SW-FOUND = 0.

CLEAR TAB1.

REJECT.

ELSE.

ITAB-PERNR = P0000-PERNR.

  • You can copy the other fields also

ENDIF.

RP_PROVIDE_FROM_LAST P0001 SPACE PNPBEGDA PNPENDDA.

IF PNP-SW-FOUND = 0.

CLEAR TAB1.

REJECT.

ELSE.

ITAB-PERNR = P0001-PERNR.

  • You can copy the other fields also

ENDIF.

RP_PROVIDE_FROM_LAST P0002 SPACE PNPBEGDA PNPENDDA.

IF PNP-SW-FOUND = 0.

CLEAR TAB1.

REJECT.

ELSE.

ITAB-PERNR = P0002-PERNR.

  • You can copy the other fields also

ENDIF.

append itab.

former_member187457
Active Contributor
0 Kudos

thnx