Quantcast
Viewing all articles
Browse latest Browse all 8533

Re: How to retrieve position from an organisational unit?

Hello,

 

Please use 'SAP_SORG' evalutation path and also find sample code as below -

 

        otype = ls_actor-otype

         objid = ls_actor-objid .

 

         CALL FUNCTION 'RH_STRUC_GET'

           EXPORTING

             act_otype              = ls_actor-otype

             act_objid              = ls_actor-objid

             act_wegid              = 'SAP_SORG'

*           ACT_INT_FLAG           =

*           ACT_PLVAR              = ' '

             act_begda              = sy-datum

             act_endda              = sy-datum

*           ACT_TDEPTH             = 0

*           ACT_TFLAG              = 'X'

*           ACT_VFLAG              = 'X'

*           AUTHORITY_CHECK        = 'X'

*           TEXT_BUFFER_FILL       =

*           BUFFER_MODE            =

*         IMPORTING

*           ACT_PLVAR              =

           TABLES

             result_tab             = lt_actor_pos

           RESULT_OBJEC           = lt_result_objec

          RESULT_STRUC           = lt_result_struc

           EXCEPTIONS

             no_plvar_found         = 1

             no_entry_found         = 2

             OTHERS                 = 3.

 

         IF sy-subrc = 1 OR sy-subrc = 3.

           RAISE error_at_reading_om_data.

         ENDIF.

         APPEND LINES OF lt_actor_pos TO actor_tab.

       ENDIF.

Note: lt_actor_pos  => will return all postions and agent asigned to this org. lt_actor_struc => all org structure below this input org.

 

Hope this is helpful and let me know if anything.

 

Regards,
Arjun


Viewing all articles
Browse latest Browse all 8533

Trending Articles