Skip to Content
0
Sep 10, 2011 at 07:04 AM

Employee's along with their Project managers?

19 Views

Hi all,

what is the query or logic how to retrieve the employees assigned to projects and thier respective project mangers?

or let me know any changes as to be made in below condition inorder to retrieve the emp along with their project managers?

IF it_pa0001 IS NOT INITIAL .

select otype objid rsign relat sobid from hrp1001 into corresponding fields of table it2_hrp101

for all entries in it_pa0001 where objid = it_pa0001-plans AND OTYPE = 'P' and rsign = 'A' and relat ='108' .

if sy-subrc = 0 .

LOOP AT it2_hrp101 INTO wa2_hrp101.

L_TABIX = SY-TABIX.

MOVE wa2_hrp101-SOBID TO wa2_hrp101-PSPNR.

MODIFY it2_hrp101 FROM wa2_hrp101 INDEX L_TABIX.

CLEAR: wa2_hrp101.

ENDLOOP.

endif .

"For all the employees get the corresponding project and the person responsible id and name .

if it2_hrp101 is not initial .

SELECT PSPNR POSID

FROM PRPS

INTO corresponding fields of table it_prps

FOR ALL ENTRIES IN it2_hrp101

WHERE PSPNR = it2_hrp101-PSPNR .

if sy-subrc = 0 .

select pspnr posid psphi vernr verna from prps

into corresponding fields of table it2_prps

for all entries in it_prps

where pspnr = it_prps-PSPNR .

endif .

endif.

ENDIF .

Thank you,

Edited by: Ishaan-Jatin on Sep 11, 2011 10:31 AM