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

SAP Function Module for retrieving Relationships

Former Member
0 Likes
1,881

Hi,

Can someone tell me the name of the SAP Function Module, to retrieve the relationship details between any two objects in the organization structure along with the Additional data associated with the relation.

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
1,108

Hello Developer

I am usually using the following function module to read to OM:

*   SAP_SORG (OrgStructure with assigned orgunits)
    REFRESH: lt_struc.
    CALL FUNCTION 'RHPH_STRUCTURE_READ'
      EXPORTING
        plvar             = '01'            " active Planvar.
        otype             = 'O'             " OrgUnit
        objid             = ld_objid  " Toplevel-Node
        wegid             = 'SAP_SORG'
        begda             = iw_begda
        endda             = iw_endda
        pup_info          = 'X'
        with_stext        = 'X'
        tdepth            = 0               " alle Sub-Levels
      TABLES
        stru_tab          = lt_struc
      EXCEPTIONS
        catalogue_problem = 1
        root_not_found    = 2
        wegid_not_found   = 3.

The parameter <b>WEGID</b> is the crucial on which determines the objects that are read from the OM. To understand the evaluation path (WEGID) better have a look at transaction <b>PPST</b>.

If you require an RFC-enabled function module then you can use <b>RH_RFC_STRUC_GET_MULTIPLE</b>.

Regards

Uwe

3 REPLIES 3
Read only

Former Member
0 Likes
1,108

Is this HR req. if so use the FM RH_STRUC_GET

Read only

0 Likes
1,108

Try HR_ECM_READ_INFOTYPE_1001.

~Suresh

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,109

Hello Developer

I am usually using the following function module to read to OM:

*   SAP_SORG (OrgStructure with assigned orgunits)
    REFRESH: lt_struc.
    CALL FUNCTION 'RHPH_STRUCTURE_READ'
      EXPORTING
        plvar             = '01'            " active Planvar.
        otype             = 'O'             " OrgUnit
        objid             = ld_objid  " Toplevel-Node
        wegid             = 'SAP_SORG'
        begda             = iw_begda
        endda             = iw_endda
        pup_info          = 'X'
        with_stext        = 'X'
        tdepth            = 0               " alle Sub-Levels
      TABLES
        stru_tab          = lt_struc
      EXCEPTIONS
        catalogue_problem = 1
        root_not_found    = 2
        wegid_not_found   = 3.

The parameter <b>WEGID</b> is the crucial on which determines the objects that are read from the OM. To understand the evaluation path (WEGID) better have a look at transaction <b>PPST</b>.

If you require an RFC-enabled function module then you can use <b>RH_RFC_STRUC_GET_MULTIPLE</b>.

Regards

Uwe