on 09-11-2014 1:34 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
At the core of that method, one finds:
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
act_otype = 'CP'
act_objid = lv_personid
act_wegid = 'CP-S-O'
act_plvar = l_plvar
act_tflag = space
act_vflag = space
authority_check = space
TABLES
result_tab = lt_result_tab
EXCEPTIONS
no_plvar_found = 0
no_entry_found = 0
OTHERS = 0.
The only problem that remains, is how to get the central person lv_personid from a known BP.
Thanks!
Calin
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.