<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RH_DIR_ORG_STRUC_GET in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/rh-dir-org-struc-get/m-p/3350483#M803654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below code shows how RH_PM_GET_STRUCTURE is used. You pass it an Organisation&lt;/P&gt;&lt;P&gt;Unit(OBJID) and it will retrieve all the units below it in the org. tree (including idividual personnel). Also&lt;/P&gt;&lt;P&gt;'RH_DIR_ORG_STRUC_GET' is an alternative but seems to be much slower.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OBJECT_TAB table stores all the objects within the org structure zorg_unit (including all sub levels).&lt;/P&gt;&lt;P&gt;The key for these objects is stored within the 'OTYPE' field. Therefor if you loop through the table you can&lt;/P&gt;&lt;P&gt;retrive the objects you require.&lt;/P&gt;&lt;P&gt;	i.e. The following code will loop around all the personnel numbers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Loops around personnel numbers within Org. Unit.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   LOOP AT objec_tab where otype = 'P'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Processing....&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: objec_tab like objec occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data: zorg_unit   type p0001-orgeh.&lt;/P&gt;&lt;P&gt;data: t_org_tab like rhldapp occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'RH_PM_GET_STRUCTURE'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            plvar           = '01'   "p0000-plvar&lt;/P&gt;&lt;P&gt;            otype           = 'O'  "0001-otype&lt;/P&gt;&lt;P&gt;            objid           = zorg_unit&lt;/P&gt;&lt;P&gt;            begda           = pn-begda&lt;/P&gt;&lt;P&gt;            endda           = pn-endda&lt;/P&gt;&lt;P&gt;            status          = '1'&lt;/P&gt;&lt;P&gt;            wegid           = 'SBESX'&lt;/P&gt;&lt;P&gt;            77aw_int        = ' '&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            objec_tab       = objec_tab&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            not_found       = 1&lt;/P&gt;&lt;P&gt;            ppway_not_found = 2&lt;/P&gt;&lt;P&gt;            others          = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************&lt;/P&gt;&lt;P&gt;Alternative, but very slow*&lt;/P&gt;&lt;P&gt;***************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   call function 'RH_DIR_ORG_STRUC_GET'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             act_orgunit     = zorg_unit&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             act_plvar       = '01'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             act_date        = pn-begda&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        tables&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             org_units       = t_org_tab&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        exceptions&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             no_active_plvar = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             others          = 2.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jan 2008 10:05:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-29T10:05:31Z</dc:date>
    <item>
      <title>RH_DIR_ORG_STRUC_GET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rh-dir-org-struc-get/m-p/3350482#M803653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any function module similar to RH_DIR_ORG_STRUC_GET, which will provide the information of all the sub-ordinate pernrs if the pernr of the chief is given.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not a function module is there a way to retrieve all the sub-ordinate perns of a supervisor pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Revanth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 09:50:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rh-dir-org-struc-get/m-p/3350482#M803653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-29T09:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: RH_DIR_ORG_STRUC_GET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rh-dir-org-struc-get/m-p/3350483#M803654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below code shows how RH_PM_GET_STRUCTURE is used. You pass it an Organisation&lt;/P&gt;&lt;P&gt;Unit(OBJID) and it will retrieve all the units below it in the org. tree (including idividual personnel). Also&lt;/P&gt;&lt;P&gt;'RH_DIR_ORG_STRUC_GET' is an alternative but seems to be much slower.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OBJECT_TAB table stores all the objects within the org structure zorg_unit (including all sub levels).&lt;/P&gt;&lt;P&gt;The key for these objects is stored within the 'OTYPE' field. Therefor if you loop through the table you can&lt;/P&gt;&lt;P&gt;retrive the objects you require.&lt;/P&gt;&lt;P&gt;	i.e. The following code will loop around all the personnel numbers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Loops around personnel numbers within Org. Unit.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   LOOP AT objec_tab where otype = 'P'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Processing....&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: objec_tab like objec occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data: zorg_unit   type p0001-orgeh.&lt;/P&gt;&lt;P&gt;data: t_org_tab like rhldapp occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'RH_PM_GET_STRUCTURE'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            plvar           = '01'   "p0000-plvar&lt;/P&gt;&lt;P&gt;            otype           = 'O'  "0001-otype&lt;/P&gt;&lt;P&gt;            objid           = zorg_unit&lt;/P&gt;&lt;P&gt;            begda           = pn-begda&lt;/P&gt;&lt;P&gt;            endda           = pn-endda&lt;/P&gt;&lt;P&gt;            status          = '1'&lt;/P&gt;&lt;P&gt;            wegid           = 'SBESX'&lt;/P&gt;&lt;P&gt;            77aw_int        = ' '&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            objec_tab       = objec_tab&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            not_found       = 1&lt;/P&gt;&lt;P&gt;            ppway_not_found = 2&lt;/P&gt;&lt;P&gt;            others          = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************&lt;/P&gt;&lt;P&gt;Alternative, but very slow*&lt;/P&gt;&lt;P&gt;***************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   call function 'RH_DIR_ORG_STRUC_GET'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             act_orgunit     = zorg_unit&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             act_plvar       = '01'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             act_date        = pn-begda&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        tables&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             org_units       = t_org_tab&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        exceptions&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             no_active_plvar = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             others          = 2.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 10:05:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rh-dir-org-struc-get/m-p/3350483#M803654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-29T10:05:31Z</dc:date>
    </item>
  </channel>
</rss>

