Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Example of BAPI use

Former Member
0 Kudos

Hi

I need help while I can not find the ecample of use BAPI SWX_GET_MANAGER. Where I need to loocking for?

Bogdan

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Bogdan,

I could not find any BAPI but yes a Function Module exist with the name SWX_GET_MANAGER.

Rememeber BAPI name starts with BAPI_*

This is a function module which can used within methods/"role determination FMs", called in workflows / tasks to get the Manager of a user.

e.g. if you will pass the your information , it will select your manager's information from the organisational structure.

This is used to derive the role / manager for approval workflows. e.g Leave Approval.

I hope it's clear.

Thanks,

Ram

Message was edited by: Ram Manohar Tiwari

7 REPLIES 7

athavanraja
Active Contributor
0 Kudos

do a where used list and find out how it is used.

my search resulted in this FM being used in one include

"MWS20000081HO01"

Regards

Raja

0 Kudos

Hi Raja

Would u like to explain mi that more detail? I am unfortunately novice in SAP:(

Thanks

Bogdan

0 Kudos

the documentation for this FM is not available.

To find out how it is used.

go to transaction se 38

enter program name "MWS20000081HO01" and click display and within that look for this FM where is it used and see how the program uses this FM. That should give you a pointer.

Regards

Raja

Former Member
0 Kudos

Hi Bogdan,

I could not find any BAPI but yes a Function Module exist with the name SWX_GET_MANAGER.

Rememeber BAPI name starts with BAPI_*

This is a function module which can used within methods/"role determination FMs", called in workflows / tasks to get the Manager of a user.

e.g. if you will pass the your information , it will select your manager's information from the organisational structure.

This is used to derive the role / manager for approval workflows. e.g Leave Approval.

I hope it's clear.

Thanks,

Ram

Message was edited by: Ram Manohar Tiwari

0 Kudos

Hi Ram

Thanks for your answer.

I try to use this function

data: wa_actor like swhactor,
      it_actor like table of swhactor,
      wa_cont like swcont,
      it_cont like table of swcont.

clear it_actor.
clear it_cont.
wa_actor-otype = otype. "that is set to US or P
wa_actor-objid = pernr. "that is set to personal number  or uname
append wa_actor to it_actor.

CALL FUNCTION 'SWX_GET_MANAGER'
  TABLES
    ACTOR_TAB          = it_actor
    AC_CONTAINER       = it_cont
* EXCEPTIONS
*   NOBODY_FOUND       = 1
*   OTHERS             = 2

.

but the result is always message: 'There is no chief pisition for .' That is possible wrong input but i dont know why should I the parameters senden.

regards

Bogdan

Message was edited by: Bogdan Rokosa

Former Member
0 Kudos

I have the solution:)

I have tried parameter via result table send - that was my error

Thanks everybody.

Bogdan

Message was edited by: Bogdan Rokosa

0 Kudos

Hi Bogdan,

You are getting 'No chief position' because there seems to be no Organization structure. Org structures are defined using transaction <b>PPOMA.</b>

Thanks and Warm Regards.

Pras Durafe