2006 Mar 13 2:43 PM
Hello All,
Im looking for a functionmodule to get org unit shortname. (HR-OM)
I'm using HR_READ_FOREIGN_OBJECT_TEXT to get position shortname. can i somehow use this FM to get org unit shortname as well? or is there another fm that i can use?
CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'
EXPORTING
OTYPE = 'S'
OBJID = p0001-plans
BEGDA = pn-begda
ENDDA = pn-endda
IMPORTING
OBJECT_TEXT = ls_stext
EXCEPTIONS
NOTHING_FOUND = 1
WRONG_OBJECTTYPE = 2
MISSING_COSTCENTER_DATA = 3
MISSING_OBJECT_ID = 4
OTHERS = 5.
Thanks
Claes
2006 Mar 13 2:47 PM
CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'
EXPORTING
OTYPE = 'S'
OBJID = p0001-plans
BEGDA = pn-begda
ENDDA = pn-endda
IMPORTING
OBJECT_TEXT = ls_stext
<b> SHORT_TEXT = ls_short_text</b>
EXCEPTIONS
NOTHING_FOUND = 1
WRONG_OBJECTTYPE = 2
MISSING_COSTCENTER_DATA = 3
MISSING_OBJECT_ID = 4
OTHERS = 5.
make the highlighted change.
2006 Mar 13 3:02 PM
Thank you for the fast reply.
But don't i get the position short name then?
/Claes
2006 Mar 13 3:13 PM
2006 Mar 13 3:16 PM
Hi Claes,
Yes you were right.. I didn't notice.
In case you want to get the org unit short text, then you should use the same Function module by passing the objid ,otype = 'O' etc for the org unit to get the text for the org unit.
In other words this function module gives the text for one object(The object can be anything person, job, position, org unit etc).
so, get the relation between the position and the org unit it belongs to.
For that org unit , use this fm again.
Regards,
Ravi