Application Development and Automation 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: 
Read only

Function hrp1001

Former Member
0 Likes
1,306

I want to retrieve data for objtype = 1F for my ALV for a particular position...i dont understand what this is as ia m new to hr sap

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,105

object type Contains a one- or two-character code that represents different types of objects, for example, 'S' for position, 'Q' for qualification and 'E' for business event.

in HR there is module org management...

in this the base are the objects..

we create a org structure..like org unit,position ,job etc..so all have their unique object type.

8 REPLIES 8
Read only

Former Member
0 Likes
1,105

Use FM RH_STRUC_GET to get the details ..

call function 'RH_STRUC_GET'

exporting

act_otype = 'S' <-- pass the position(S)

act_objid = gv_objid <-- pass the position which is given to you

act_wegid = '' <-- U need to pass the Evaluation path corresponding to 1F and S

*check in table T778A for evaluation paths ....

  • ACT_INT_FLAG =

act_plvar = gv_plvar

  • act_begda = pchobeg

  • act_endda = pchoend

  • ACT_TDEPTH = 0

  • ACT_TFLAG = 'X'

  • ACT_VFLAG = 'X'

  • AUTHORITY_CHECK = 'X'

  • TEXT_BUFFER_FILL =

  • BUFFER_MODE =

  • IMPORTING

  • ACT_PLVAR =

tables

result_tab = gt_results

result_objec = gt_objects

result_struc = gt_structs

exceptions

no_plvar_found = 1

no_entry_found = 2

others = 3

.

Read only

Former Member
0 Likes
1,106

object type Contains a one- or two-character code that represents different types of objects, for example, 'S' for position, 'Q' for qualification and 'E' for business event.

in HR there is module org management...

in this the base are the objects..

we create a org structure..like org unit,position ,job etc..so all have their unique object type.

Read only

Former Member
0 Likes
1,105

so basically the function will help for a particular pernr also ?

One more doubt.. Is this query right to check if a particular -pernr is a manager specify a flag 'X' in the ALV report...

SELECT SINGLE SOBID FROM hrp1001 INTO cheif_sobid

WHERE plvar = c_current 01

AND otype = c_position s

AND objid = wa_final-plans

AND rsign = c_bottom_up a

AND relat = c_manages 012

AND sclas = c_jobgrp 'O'

AND begda <= pn-endda

AND endda >= pn-begda.

IF sy-subrc = 0.

wa_final-chief = 'X'.

ENDIF.

Read only

0 Likes
1,105

If U want to pass pernr then the conditions will change ...

Pernr is nothing but a person .. which is shown as 'P' ..

U can use the code to check if a person is a manager ..

Read only

Former Member
0 Likes
1,105

What i meant is that i have pernr and i have position now i want to find the function of this pernr so what should i do?

Read only

0 Likes
1,105

first get the position for this pernr ..

select sobid into v_sobid

from hrp1001

where OTYPE = 'P' and

OBJID = p_pernr and<-- pass pernr here

PLVAR = '01' and

RSIGN = 'B' and

RELAT = '008' and

SCLAS = 'S'.

now use this position in v_sobid.

Read only

Former Member
0 Likes
1,105

So what u mean to say is to get the position of the pernr first and then check if it corresponds to being a manger and then give it a flag 'X'

Read only

0 Likes
1,105

Yes ...