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: 

Could you break the is puzzle for me

Former Member
0 Kudos

Hi guys,

Could someone please break this puzzle for me.

Suppose I have the Organizational unit number pa0001-orgeh.

Please explain in detail as to how did you break.

1. Find the position that manages the org unit the employee belongs to by using PA0001-ORGEH from the current infotype 0001. The 1st line manager’s position is the related object with a current ‘A012’ relationship to this org unit in SAP table HRP1001.

2. Find the 1st line manager by finding the related object id with a current ‘A008’ relationship to the managers position in step 1.

3. Find the home country of the manager by finding the current infotype 0001 of the related object in step 2. Using the current infotype 0001, select LAND1 from T500P where PERSA = PA0001-WERKS. Then select T005-INTCN3 which is the numeric ISO code where LAND1 = T500P-LAND1.

Thanks in advanse.

Abhi.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi again,

For point no 3.

a) First get pernr

select single * from pa0001

into mypa0001

where orgeh = pa0001-orgeh

b) get land1

select single * from t500P

into myt500p

where persa = mypa0001-werks.

c) get country

select single * from t005

into myt005

where land1 = m yt500p-land1.

regards,

amit m.

4 REPLIES 4

Former Member
0 Kudos

Guys could someone please reply to this....

Former Member
0 Kudos

Hi abhi,

the input is pa0001-orgeh.

1. for your 1st point

select single * from hrp1001

into itab_hrp1001

where otype = 'S'

and plvar = '01'

and rsign = 'A'

and relat = '012'

and begda <= sy-datum

and endda >= sy-datum

<b>AND SOBID = pa0001-orgeh</b>.

2. for your second point

select single * from hrp1001

into btab_hrp1001

where otype = 'O'

and plvar = '01'

and rsign = 'A'

and relat = '008'

and begda <= sy-datum

and endda >= sy-datum

AND OBJID = ITAB_HRP1001-

in btab_hrp1001-SOBID, u will get

the managers PERNR.

regards,

amit m.

Former Member
0 Kudos

But thats not complete..

Former Member
0 Kudos

Hi again,

For point no 3.

a) First get pernr

select single * from pa0001

into mypa0001

where orgeh = pa0001-orgeh

b) get land1

select single * from t500P

into myt500p

where persa = mypa0001-werks.

c) get country

select single * from t005

into myt005

where land1 = m yt500p-land1.

regards,

amit m.