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: 

Problems with BAPI_USER_GETLIST

Former Member
0 Kudos

Hi there,

i try to use the BAPI_USER_GETLIST

if i use the following expression i get a correct resultlist with my user, firstname 'Dirk'.

ls_selection_exp-parameter = 'USERNAME'.
      ls_selection_exp-option = 'EQ'.
      ls_selection_exp-low = 'C512....'.

if i use the next expression the list is empty.

ls_selection_exp-parameter = 'ADDRESS'.
      ls_selection_exp-field = 'FIRSTNAME'.
      ls_selection_exp-option = 'EQ'.
      ls_selection_exp-low = 'Dirk'.

thx for help

Dirk

3 REPLIES 3

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

I check the field FIRSTNAME of structure BAPIADDR3. The field is case-sensitive.

Can you please run BAPI_USER_GET_DETAIL with your user-id ''C512...." & check what is the value in ADDRESS-FIRSTNAME?

Put the same value in BAPI_USER_GETLIST & recheck.

BR,

Suhas

Former Member
0 Kudos

Hi Suhas,

thx u gave me the straight tip, with search parameter 'DIRK' it works.

confusing is that the bapi returns 'Dirk'

thx a lot

Dirk

0 Kudos

I got the catch.

If you check the code for BAPI_USER_GETLIST, you will find that when you use ADDRESS-FIRSTNAME combination, it fetches the data from the DB view USER_ADDRS based on field MC_NAMEFIR. But the underlying domain is not case-sensitive may be this is cause.

I check the dynamic WHERE clause, something like this is generated:

USER_ADDRS~MC_NAMEFIR EQ 'Suhash'

BR,

Suhas