Application Development and Automation 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: 
Read only

BAPI_USER_GET_DETAIL ?

Former Member
0 Likes
14,477

Hi Guys ,

When i am using this BAPI for getting the LAST NAME and FIRST NAME ki using ADDRESS i am not getting the values.whats the problem is i am Getting an error Here is the FM.

" Function parameter "ADDRESS" is unknown."

DATA: L_IT_RETURN type Table of BAPIRET2,

L_IT_RETURN1 type BAPIADDR3,

i_Tel type table of BAPIADTEL.

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

EXPORTING

USERNAME = sy-UNAME

  • IMPORTING

  • LOGONDATA =

  • DEFAULTS =

ADDRESS = L_IT_RETURN1

  • COMPANY =

  • SNC =

  • REF_USER =

  • ALIAS =

  • UCLASS =

  • LASTMODIFIED =

  • ISLOCKED =

TABLES

  • PARAMETER =

  • PROFILES =

  • ACTIVITYGROUPS =

RETURN = L_IT_RETURN

ADDTEL = i_Tel

  • ADDFAX =

  • ADDTTX =

  • ADDTLX =

  • ADDSMTP =

  • ADDRML =

  • ADDX400 =

  • ADDRFC =

  • ADDPRT =

  • ADDSSF =

  • ADDURI =

  • ADDPAG =

  • ADDCOMREM =

  • PARAMETER1 =

  • GROUPS =

  • UCLASSSYS =

  • EXTIDHEAD =

  • EXTIDPART =

  • SYSTEMS =.

Can anybody tell me how to overcome thuis problem.

Thanks,

Gopi.

Hi Guys ,

When i am using this BAPI for getting the LAST NAME and FIRST NAME ki using ADDRESS i am not getting the values.whats the problem is i am Getting an error Here is the FM.

" Function parameter "ADDRESS" is unknown."

DATA: L_IT_RETURN type Table of BAPIRET2,

L_IT_RETURN1 type BAPIADDR3,

i_Tel type table of BAPIADTEL.

CALL FUNCTION 'BAPI_USER_GET_DETAIL'

EXPORTING

USERNAME = sy-UNAME

  • IMPORTING

  • LOGONDATA =

  • DEFAULTS =

ADDRESS = L_IT_RETURN1

  • COMPANY =

  • SNC =

  • REF_USER =

  • ALIAS =

  • UCLASS =

  • LASTMODIFIED =

  • ISLOCKED =

TABLES

  • PARAMETER =

  • PROFILES =

  • ACTIVITYGROUPS =

RETURN = L_IT_RETURN

ADDTEL = i_Tel

  • ADDFAX =

  • ADDTTX =

  • ADDTLX =

  • ADDSMTP =

  • ADDRML =

  • ADDX400 =

  • ADDRFC =

  • ADDPRT =

  • ADDSSF =

  • ADDURI =

  • ADDPAG =

  • ADDCOMREM =

  • PARAMETER1 =

  • GROUPS =

  • UCLASSSYS =

  • EXTIDHEAD =

  • EXTIDPART =

  • SYSTEMS =.

Can anybody tell me how to overcome thuis problem.

Thanks,

Gopi.

6 REPLIES 6
Read only

Former Member
0 Likes
7,273

Hi,

Please uncomment this line.


...
  IMPORTING                      "Change here
* LOGONDATA =
* DEFAULTS =
ADDRESS = L_IT_RETURN1
...

Also you can use FM SUSR_USER_ADDRESS_READ.

Regards,

Ferry Lianto

Read only

0 Likes
7,273

Hi Ferry,

Thanks for ur reply

But what i need is i have to get the FIRST NAME and LAST NAME from the USER Profile.

I have to give sy-UNAME as i/p and get the User First NAme and LASt NAME as o/p.

Please respond.

Thanks,

Gopi .

Read only

Former Member
0 Likes
7,273

You've commented out the period at the end. Put in a period.

Rob

Read only

Former Member
7,273

Uncomment * IMPORTING in the BAPI call.

Address is the importing parameter and you commented out Importing.

Read only

former_member194669
Active Contributor
0 Likes
7,273

Hi,

Address willl come in the importing patamer


    call function 'BAPI_USER_GET_DETAIL'
      exporting
        username = i_user-bapibname
      importing
        address  = wa_address
      tables
        return   = i_return.

Read only

Former Member
0 Likes
7,273

Hi,

Please try this.


DATA:  F_USERNAME    TYPE BAPIBNAME-BAPIBNAME,
       S_ADDRESS     TYPE BAPIADDR3,
       TAB_RETURN    TYPE BAPIRET2 OCCURS 1.
                         
F_USERNAME = SY-UNAME.
                                            
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
  EXPORTING
    USERNAME = F_USERNAME
  IMPORTING
    ADDRESS  = S_ADDRESS
  TABLES
    RETURN   = TAB_RETURN.
                                         
WRITE: S_ADDRESS-FIRSTNAME, S_ADDRESS-LASTNAME.

Regards,

Ferry Lianto