Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How can I get all org. units that a BP belongs to?

Hello,

I use in my reports this function module to get all BPs that belong to an org.unit (provided in lv_plogi-objid below):

    CALL FUNCTION 'RH_STRUC_GET'
      EXPORTING
        act_otype      = 'O'
        act_objid      = lv_plogi-objid
        act_wegid      = 'OO-S-BP' "or DISPO_BP
      TABLES
        result_objec   = gt_objects
      EXCEPTIONS
        no_plvar_found = 1
        no_entry_found = 2
        OTHERS         = 3.

But I don't know any function module to go the other way around: get all org. units that a given BP belongs to. Maybe it is the same function, but with a different value for parameter act_wegid?

Do you have any ideas?

Thanks!

Calin Barbat


replied

A simple selection on table BUT050 should do it. You can check the relation type and/or combine it with BUT000 to see the business partner type. Also there's class CL_AGS_WORK_BP_INFO which has some useful methods, e.g. GET_BUPA_TEAM which delivers the assigned teams (organisations) of a business partners.

Regards, Richard

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question