‎2008 Jan 16 11:07 AM
I want to create a strucure with fields DIVISON ID and DIVISON NAME according to standard bapi " BAPI_USER_GET_DETAIL " where can i get that fields from which tables or structures ?
‎2008 Jan 16 11:12 AM
Hi
Hope this will help you.
reward pts if help.
You could use BAPI_USER_GET_DETAIL. Check example code:
REPORT ztest.
PARAMETERS: p_usr TYPE usr21-bname DEFAULT sy-uname OBLIGATORY.
DATA: i_bapiret2 TYPE TABLE OF bapiret2 WITH HEADER LINE,
wa_address TYPE bapiaddr3,
g_iderror(20) TYPE c.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = p_usr
IMPORTING
address = wa_address
TABLES
return = i_bapiret2.
IF i_bapiret2[] IS INITIAL.
MESSAGE s000(su) WITH wa_address-firstname
wa_address-lastname.
ELSE.
LOOP AT i_bapiret2 WHERE NOT id IS INITIAL.
CONCATENATE i_bapiret2-type
i_bapiret2-number
'(' i_bapiret2-id ')'
INTO g_iderror.
CONDENSE g_iderror.
CONDENSE i_bapiret2-message.
WRITE: /,g_iderror,
space,
i_bapiret2-message.
ENDLOOP.
ENDIF.
‎2008 Jan 16 1:19 PM