cancel
Showing results for 
Search instead for 
Did you mean: 

How to get immediate manager from the org. hierarchy - any FM or Table

Former Member
0 Kudos

Dear All,

Is there any way of getting immediate manager name in the org. hierarchy? Can you please suggest any FM or table from where we can derive the immediate manager?

Best wishes,

Atanu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Check out the Business Object BUS4101. Test it by giving an userid in the Instance and see the runtime values of the BO.

you might find some useful information in the various attributes of the business object.

Regards,

PR.

Former Member
0 Kudos

Thanks Pathanjali for your information. I was basically looking for some FM or table from where I can find out relevant data. Anyway thanks for the info. I was looking for BUS2201.

Best wishes,

Atanu

Former Member
0 Kudos

Try these:

BBP_OM_STRUC_GET_USER_FROM_POS

SWX_GET_MANAGER

Regards,

PR.

Former Member
0 Kudos

Thanks Pathanjali. I am still not able to get the values to be populated in the FM. It is throwing NOT_FOUND exception. Can anyone please help me in getting correct sets of data?

Any suggestion from anyone please?

Best wishes,

Atanu

Former Member
0 Kudos

Hi,

You can get the manager (maintained in the org structure) for any user using the FM SWX_GET_MANAGER .

See the foll thread on how to use the FM SWX_GET_MANAGER .

Former Member
0 Kudos

Disha,

The thread link you have mentioned doesnt give details on how to use the FM..

Can you please post the correct link.

Thanks...

Regards,

PR.

Former Member
0 Kudos

Hi Disha,

It will be great if you provide us with proper link so that we can find out the useability od SWX_GET_MANAGER FM.

Best wishes,

Atanu

Former Member
0 Kudos

Hi,

Sorry for the wrong link.

The foll sample code should help:

DATA : ls_ac_container type swcont,

lt_ac_container TYPE TABLE OF swcont,

lt_approver TYPE TABLE OF swhactor.

lv_creator TYPE swp_agent.

CONCATENATE 'US' <User Id> INTO lv_creator.

clear ls_ac_container.

MOVE : 'ORG_OBJECT' TO ls_ac_container-element ,

'000000' TO ls_ac_container-tab_index ,

'014' TO ls_ac_container-elemlength ,

'C' TO ls_ac_container-type ,

lv_creator TO ls_ac_container-value .

APPEND ls_ac_container to lt_ac_container.

REFRESH lt_approver.

CALL FUNCTION 'SWX_GET_MANAGER'

TABLES

actor_tab = lt_approver

ac_container = lt_ac_container

EXCEPTIONS

nobody_found = 1

OTHERS = 2.

Former Member
0 Kudos

Hi Disha,

Just wonderful. It has worked. I have given you full points.

Best wishes,

Atanu

Former Member
0 Kudos

Dear All,

The function module SWX_GET_MANAGER is not working through BAdI when a shopping cart is created. I was trying to get the manager name of the user who has created the shopping cart. Please can anyone help me on this?

Best wishes,

Atanu

Answers (0)