Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to exclude the Transfered Terminated employee

Hi all ,

I need to fix a bug in the report which displaying all the Hired , Rehired , Transfered employees data of only IT department in the 13th months window period .

so what currently the report is doing is ....

Report is defined with PCH logical database .

Upon the selection screen they are inputting the Root org unit 500000 with Evaluation Path Pers-o.

and selecting date range ALL.

Logic is currently pulling all the persons belongs to that root org units.present and past.

Here 2 conditions are using that 1) although if an employee is hired in IT and Transfered out of IT within 13th months Client requires that data.

2) Although if an employee is transfered of IT and then terminated then they dont want his data.

satisying the first condition i am written logic but to satisfy the second condition i am not getting the logic could any one please.....

logic to pull up the employees data who are Hired within 13 months window perid and now transfered to other sales department.

Get Objec.

If Objec-otype = 'P'.


begda = '01011800'.

endda = '31129999'.


p0001.->Now p0001 is filled by all the org units.

delete adjacent p0001 comparing orgunits

Read infotype 41 based on Terminations , Hiring , Rehiring.

loop at p0001.

Now pass this org unit to Rh_Struc_Get.

with evaluation path o-o to get the top hirarchy into RESULTS_TAB.

now loop at resutls_tab.

read table pchojid with low = resutls_tab-objid.

if sy-subrc = 0.

Flag =1 .




So the above loop will check if any of the org unit belongs to the IT department previosuly...

tehn it will flag1 , if flag when then only it will process for fianl itab,.

Now my problem how to check if an employee is terminated in sales...what logic need to be embed herer... any one any clue?



i know people dont have enough time to think this alot

Edited by: saslove sap on Apr 24, 2009 8:12 AM


hi ,

In table PA0001 (HR Master Record: Infotype 0001 (Org. Assignment) ) ,

field PERSG - will decide whether Employee is active or terminated.

Values of PERSG are based on Customization again..

Say if PERSG is

1 Active

2 Retiree/pensioner

3 Early retiree

4 Interns

5 Terminated

6 Inactive employee


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question