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 exclude the Transfered Terminated employee

former_member184119
Active Contributor
0 Kudos

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'.

HR_read_infotype.

begda = '01011800'.

endda = '31129999'.

tableS

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 .

exit.

endif.

Endloop.

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?

Regards

sas

i know people dont have enough time to think this alot

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

Ram.

2 REPLIES 2

Former Member
0 Kudos

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

Ram.

0 Kudos

my question is i want employees who are terminated in IT , if an employee is hired in IT and later he transfered to SALES and terminated then we need to exclude that i dont know how to do any light please?

Regards

sas