cancel
Showing results for 
Search instead for 
Did you mean: 

FM for Head of Org Unit

Former Member
0 Kudos

Hi,

I am looking to find the Head of Organisation unit .

Is there any Function Module which will return the Head of Organisation unit .

Help will be appriciated .

Thanks,

SS

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

BBP_GET_ORGUNITS

CRM_LRP_GET_UPPER_ORGUNIT - to get upper org unit

RH_SEARCH_ORGUNIT - HR module to search orgunit

BBP_OM_DETERMINE_COMPANY

Regards,

Marcin Gajewski

Message was edited by:

Marcin Gajewski

Answers (3)

Answers (3)

Ramki
Active Contributor
0 Kudos

Hi

FM BBP_OM_STRUC_GET_MGR_FROM_ORG will return the head of the given org unit.

Best regards

Ramki

Former Member
0 Kudos

Hi

There are several Function modules which can do the job.

<u>E.g., Function module - BBP_OM_DETERMINE_COMPANY</u>

<b><u>Here is the sample code as well.</u></b>

        CALL FUNCTION 'BBP_OM_DETERMINE_COMPANY'
          EXPORTING
            i_user_id                   = is_import-uname
          IMPORTING
            e_partners                  = ls_ord_partner
          EXCEPTIONS
            no_company_found            = 1
            attribute_company_not_found = 2
            no_partner_function_found   = 3
            no_business_partner_found   = 4
            OTHERS                      = 5.
        IF sy-subrc EQ 0.
          MOVE-CORRESPONDING ls_ord_partner TO wa_partner.
          wa_partner-addr_type   = c_ad_org.
          wa_partner-addr_origin = c_addr_origin_master.
        ENDIF.

Here is the documenattaion as well.



FUNCTION -  BBP_OM_DETERMINE_COMPANY

Functionality

Determines the company (sold-to party) using

Username (sy-uname)
Organizational unit (for purchasing organization "0 50000050")

Business partner number (10 character number)
Business partner GUID
If several parameters are transferred to the function module, the system checks whether they belong to the same company. If they do not, the function module does not supply a result.


Parameters
I_USER_ID
I_ORGUNIT_ID
I_PARTNER
I_PARTNER_GUID
I_LOGSYS
E_ORGUNIT
E_PARTNERS
ET_COMPC

Exceptions
NO_COMPANY_FOUND
ATTRIBUTE_COMPANY_NOT_FOUND
NO_PARTNER_FUNCTION_FOUND
NO_BUSINESS_PARTNER_FOUND
NO_COCODE_FOUND
OBJECT_ID_NOT_FOUND
INTERNAL_ERROR

Function Group
BBP_OM

Hope this will help.

Please reward suitable points.

Regards

- Atul

pvanhoove
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

Check RH_ACT_LEADING_POSITION .

Rgds,

Pierre