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: 

How to get the users in R/3 using Bapi

Former Member
0 Kudos

Hi,

which bapi i need to run to get the users is SapR/3.

Regards,

Guru

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hai Guruvulu

Try with 'BAPI_USER_GET_DETAILS'.

data : username like SY-UNAME.

DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.

DATA: addsmtp LIKE bapiadsmtp OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

EXPORTING

username = username

TABLES

return = return

addsmtp = addsmtp.

Thanks & Regards

Sreenivasulu P

25 REPLIES 25

Former Member
0 Kudos

Use BAPI 'BAPI_USER_GETLIST' to get user list.

cheers,

Nilesh

Message was edited by: Nilesh Kshirsagar

Message was edited by: Nilesh Kshirsagar

0 Kudos

hi ,

can u tell me the import parameter for this bapi

regards

Guru

0 Kudos

use BAPI <b>'BAPI_USER_GETLIST'</b> for the same

Check this weblog to know the same

/people/john.astill/blog/2005/07/21/php-user-management-part-1

Regards,

Santosh

0 Kudos

hi,

error is function module doesnot exist

can u please tell me correct bapi

regards

Guru

0 Kudos
report abc.

data :it_users TYPE STANDARD TABLE OF bapiusname WITH HEADER LINE.

CALL FUNCTION 'BAPI_USER_GETLIST'
    TABLES
      userlist        = it_users[].

Former Member
0 Kudos

Hai Guruvulu

Try with 'BAPI_USER_GET_DETAILS'.

data : username like SY-UNAME.

DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.

DATA: addsmtp LIKE bapiadsmtp OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

EXPORTING

username = username

TABLES

return = return

addsmtp = addsmtp.

Thanks & Regards

Sreenivasulu P

Former Member
0 Kudos

Hi,

the parameters of the BAPI 'BAPI_USER_GETLIST' are as follows:

IMPORTING

*" VALUE(MAX_ROWS) TYPE BAPIUSMISC-BAPIMAXROW DEFAULT 0

*" VALUE(WITH_USERNAME) TYPE BAPIUSMISC-WITH_NAME DEFAULT SPACE

*" EXPORTING

*" VALUE(ROWS) TYPE BAPIUSMISC-BAPIROWS

*" TABLES

*" SELECTION_RANGE STRUCTURE BAPIUSSRGE OPTIONAL

*" SELECTION_EXP STRUCTURE BAPIUSSEXP OPTIONAL

*" USERLIST STRUCTURE BAPIUSNAME OPTIONAL

*" RETURN STRUCTURE BAPIRET2 OPTIONAL

Regards,

Tanveer.

<b>Please mark helpful answers</b>

Former Member
0 Kudos

Hi,

Import parameters are

1.MAX_ROWS -- You can set to 100 if you want max humdered records.

2. WITH_USRENAME - If yout set 'X' it will return all records with username / user details.

Cheers,

Nilesh

0 Kudos

hi

in my sap gui i don't have 'BAPI_USER_GETLIST'

can u please tell me how to get users in R/3.(i have only <b>getdetail</b>

is there any chance to change my authorisation profile

using sap gui or anyway

regards

Guru

0 Kudos

may be u can try this to set profile

PRGN_SET_USERPROF_ENQUEUE_FLAG

0 Kudos

HI,

Try using a custom rfc/fm which selects the data from usr01 table.

REgards,

Ravi

0 Kudos

Hi,

You cannot change your authorization profile untill and unless you have super user profile.

You need to ask Basis people to change your profile..

Cheers,

Nilesh

0 Kudos

hi,

<b>my urgent requirement is to get users in sap</b><u></u>

in my sapgui i have only BAPI_USER_DETAIL.

but i want to get all users in R/3

please help me

regards

Guru

0 Kudos
report ychatest.

data : begin of it_users occurs 0,
          bname like usr02-bname
       end of it_users.

select bname from usr02 into table it_users.

it_users will contain all the users list

Message was edited by: Chandrasekhar Jagarlamudi

0 Kudos

hi,

can u please tell me table name which contains all user details .i can see data form se16 .

i am a java programer how to run code that u have send

regards

Guru

0 Kudos

se16

give tablename as USR02

0 Kudos

hi,

i am a java programer i have to get data form sap only by calling function modules .but i have no BAPI_USER_GETLIST.

<i><b>Is there any chance to get users data</b></i>

regards

Guru

0 Kudos

chk this

TH_USER_LIST

0 Kudos

Hi,

yes you can get the list of users. you can use <b>RFC_READ_TABLE</b> and pass the table <b>USR02</b> to this RFC FM.

you will be able to fetch the data. this way you can get the users data.

Regards

vijay

0 Kudos

HI Guru,

use this FM

THDISPLAY_USER_LIST

Hope this helps,

Regards,

Vicky

0 Kudos

Guru,

Which version of R3 you are using?

Cheers

Nilesh

0 Kudos

hi

how to know version of R3

regards

Guru

0 Kudos

follow the menu system->status from any screen to get the details.

Regards

Raja

0 Kudos

if the BAPI is not available you can use the following FM

SO_USER_LIST_READ

Regards

Raja

former_member181962
Active Contributor
0 Kudos

SO_USER_LIST_READ_API1

SO_USER_LIST_READ any one of them can be useful to you.

They are already rfc enabled(Just like bapis)

Regards,

Ravi