‎2008 Jan 16 9:34 PM
Hi All!
This FM doesn't provides return code 4
instead of the correctly Sap-Usernames.
Do y have an idea why ?
regards
sas
FUNCTION GET_SAP_USR.
*"----
""Local Interface:
*" IMPORTING
*" VALUE(LASTNAME) TYPE NAME_LAST
*" EXPORTING
*" VALUE(BENUTZER) TYPE USER_ADDR-BNAME
*" VALUE(RC) TYPE SYSUBRC
*"----
select single BNAME from user_addr
into BENUTZER where NAME_LAST = LASTNAME.
rc = sy-subrc.
ENDFUNCTION.
‎2008 Jan 16 9:39 PM
Make sure that you pass the name to the FM in upper and lower case.
rob
‎2008 Jan 16 9:39 PM
Make sure that you pass the name to the FM in upper and lower case.
rob
‎2008 Jan 16 9:40 PM
Instead of use
data : i_user1 like bapibname.
data : wa_address1 like bapiaddr3.
data : i_return1 like bapiret2 occurs 0 with header line.
clear : wa_address1.
move v_sapusername to i_user1-bapibname.
call function 'BAPI_USER_GET_DETAIL'
exporting
username = i_user1-bapibname
importing
address = wa_address1
tables
return = i_return1.
a®
‎2008 Jan 16 9:46 PM
Hi thank you for your hints.
Is my FM correctly as far as ?
regards
sas
‎2008 Jan 16 9:49 PM
I could not able find this fm GET_SAP_USR in my system . I am using Netweaver 7 version.
Whether is this a custom fm?
a®
‎2008 Jan 16 9:48 PM
Hi,
Check the below BAPIs.It could be helpful to you.
BAPI_USER_GETLIST
BAPI_USER_GET_DETAIL
Cheers,
Hakim
‎2008 Jan 16 9:59 PM
Hi!
Yes it is created by myself.
USER_ADDR is a view maybe it is allowed only
make a select statemant to its first column BNAME
istead of the others like FIRST_NAME etc.
I get still RC 4
regards
sas