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: 

User ID

Former Member
0 Kudos

Hi,

Is there any way by which you can get the user id from the country code?

I tried in SU01 but was unsuccessful.

Please provide a method by which I could get the user id for a specific country code?

Regards,

Gayathri

4 REPLIES 4

Former Member
0 Kudos

Check out the table USR05,USR02.

MAY BE IT IS USEFUL FOR U....

Former Member
0 Kudos

Hi

Try to use the BAPI BAPI_USER_GET_DETAIL

Anyway the address data should be in ADRC table, you can find the ID address in USR21 table:

So:

DATA T_ID_ADDRESS LIKE STANDARD TABLE OF USR21 WITH HEADER LINE.

DATA: T_ADRC LIKE STANDARD TABLE OF ADRC.

SELECT * FROM USER21 INTO TABLE T_ID_ADDRESS.

IF SY-SUBRC = 0.

SELECT * FROM ADRC INTO TABLE T_ADRC

FOR ALL ENTRIES IN T_ID_ADDRESS

WHERE ADDRNUMBER = T_ID_ADDRESS-ADDRNUMBER

AND COUNTRY = <LAND>.

LOOP AT T_ID_ADDRESS.

READ TABLE T_ADRC TRANSPORTING NO FIELDS

WITH KEY ADDRNUMBER = T_ID_ADDRESS-ADDRNUMBER.

IF SY-SUBRC <> 0.

DELETE T_ID_ADDRESS.

ELSE.

WRITE: / T_ID_ADDRESS-BNAME.

ENDIF.

ENDLOOP.

ENDLOOP.

ENDIF.

Max

Former Member
0 Kudos

chk this

USR03 where LAND1 is the country code

Former Member
0 Kudos

One country can have multiple user id's, how can you choose only one user id.

regards,

Ravi