‎2009 Feb 25 5:42 AM
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
‎2009 Feb 25 5:55 AM
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.
‎2009 Feb 25 5:52 AM
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
.
‎2009 Feb 25 5:55 AM
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.
‎2009 Feb 25 6:01 AM
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.
‎2009 Feb 25 6:29 AM
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 ..
‎2009 Feb 25 8:23 AM
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?
‎2009 Feb 25 8:26 AM
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.
‎2009 Feb 25 8:32 AM
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'
‎2009 Feb 25 8:32 AM