<?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: om reporting? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/om-reporting/m-p/3855583#M926816</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use this FM to find the manager of a orgunit -HRCM_ORGUNIT_MANAGER_GET&lt;/P&gt;&lt;P&gt;and this one to get all the orgunits a manger is assigned to  - HRCM_GET_ORGUNITS_FOR_MANAGER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 May 2008 21:37:37 GMT</pubDate>
    <dc:creator>amit_khare</dc:creator>
    <dc:date>2008-05-21T21:37:37Z</dc:date>
    <item>
      <title>om reporting?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/om-reporting/m-p/3855581#M926814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want details about How to find out manager position in om reporting?&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;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 20:14:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/om-reporting/m-p/3855581#M926814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T20:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: om reporting?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/om-reporting/m-p/3855582#M926815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do it this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But there is obviously better way to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pass position of the Employee&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FUNCTION z_get_manager.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(FI_PLANS) TYPE  PLANS OPTIONAL
*"  EXPORTING
*"     VALUE(FE_NACHN) TYPE  NACHN
*"     VALUE(FE_VORNA) TYPE  VORNA
*"     VALUE(FE_PERNR) TYPE  PERSNO
*"  EXCEPTIONS
*"      NO_REPORT_TO
*"      NO_POSITION_HOLDER
*"      NO_NAME_FOUND
*"----------------------------------------------------------------------
  DATA :  lv_sobid  LIKE hrp1001-sobid,
          lv_pernr  LIKE hrp1001-sobid.


* 1) Get report-to position.
  SELECT SINGLE sobid  FROM hrp1001 INTO lv_sobid WHERE
                              otype EQ 'S'            AND
                              objid EQ fi_plans       AND
                              plvar EQ '01'           AND
                              relat EQ '002'          AND
                              rsign EQ 'A'            AND
                              sclas EQ 'S'            AND
                              begda LE sy-datum       AND
                              endda GE sy-datum.
  IF sy-subrc NE 0.
    RAISE no_report_to.
  ENDIF.

* 2) Get position holder (Manager ID)
  SELECT SINGLE sobid  FROM hrp1001 INTO lv_pernr WHERE
                           otype EQ 'S'            AND
                           objid EQ lv_sobid       AND
                           plvar EQ '01'           AND
                           relat EQ '008'          AND
                           rsign EQ 'A'            AND
                           sclas EQ 'P'            AND
                           begda LE sy-datum       AND
                           endda GE sy-datum.
  IF sy-subrc NE 0.
    RAISE no_position_holder.
  ENDIF.

fe_pernr = lv_pernr.

* 3) Get Manager First Name and Last Name.
  SELECT SINGLE vorna nachn FROM pa0002 INTO (fe_vorna, fe_nachn) WHERE
                               pernr EQ fe_pernr  AND
                               begda LE sy-datum  AND
                                endda GE sy-datum.
  IF sy-subrc NE 0.
    RAISE no_name_found.
  ENDIF.

ENDFUNCTION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Recommended way would be use SAP standard function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RH_GET_STRUCTURE&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many other ways too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 21:06:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/om-reporting/m-p/3855582#M926815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T21:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: om reporting?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/om-reporting/m-p/3855583#M926816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use this FM to find the manager of a orgunit -HRCM_ORGUNIT_MANAGER_GET&lt;/P&gt;&lt;P&gt;and this one to get all the orgunits a manger is assigned to  - HRCM_GET_ORGUNITS_FOR_MANAGER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 21:37:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/om-reporting/m-p/3855583#M926816</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2008-05-21T21:37:37Z</dc:date>
    </item>
  </channel>
</rss>

