SAP BAPI_USER_GET_DETAIL Function Module for Read User Details
BAPI_USER_GET_DETAIL is a standard bapi user get detail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read User Details processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for bapi user get detail FM, simply by entering the name BAPI_USER_GET_DETAIL into the relevant SAP transaction such as SE37 or SE38.
Function Group: SU_USER
Program Name: SAPLSU_USER
Main Program: SAPLSU_USER
Appliation area: S
Release date: 10-Apr-2000
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function BAPI_USER_GET_DETAIL pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'BAPI_USER_GET_DETAIL'"Read User Details.
EXPORTING
USERNAME = "User Name
* CACHE_RESULTS = 'X' "Temporarily buffer results in work process
IMPORTING
LOGONDATA = "Structure with Logon Data
ISLOCKED = "User Lock
IDENTITY = "Person Assignment of an Identity
ADMINDATA = "User: Administration Data
DEFAULTS = "Structure with User Defaults
ADDRESS = "Address Data
COMPANY = "Company for Company Address
SNC = "Secure Network Communication Data
REF_USER = "User Name of the Reference User
ALIAS = "User Name Alias
UCLASS = "License-Related User Classification
LASTMODIFIED = "User: Last Change (Date and Time)
TABLES
* PARAMETER = "Table with User Parameters
* ADDRML = "Inhouse Mail BAPI Structure
* ADDX400 = "BAPI Structure X400 Addresses
* ADDRFC = "BAPI Structure RFC Addresses
* ADDPRT = "BAPI Structure Printer Addresses
* ADDSSF = "BAPI Structure SSF Addresses
* ADDURI = "BAPI Structure: URL, FTP, and so on
* ADDPAG = "BAPI Structure Pager Numbers
* ADDCOMREM = "BAPI Structure Communication Comments
* PARAMETER1 = "Replaces Parameter (Length 18 -> 40)
* GROUPS = "Transfer Structure for a List of User Groups
* PROFILES = "Profiles
* UCLASSSYS = "System-Specific License-Related User Classification
* EXTIDHEAD = "Header Data for External ID of a User
* EXTIDPART = "Part of a Long Field for the External ID of a User
* SYSTEMS = "BAPI Structure for CUA Target Systems
* ACTIVITYGROUPS = "Activity Groups
RETURN = "Return Structure
* ADDTEL = "BAPI Structure Telephone Numbers
* ADDFAX = "BAPI Structure Fax Numbers
* ADDTTX = "BAPI Structure Teletex Numbers
* ADDTLX = "BAPI Structure Telex Numbers
* ADDSMTP = "E-Mail Addresses BAPI Structure
IMPORTING Parameters details for BAPI_USER_GET_DETAIL
USERNAME - User Name
Data type: BAPIBNAME-BAPIBNAMEOptional: No
Call by Reference: No ( called with pass by value option)
CACHE_RESULTS - Temporarily buffer results in work process
Data type: FLAG_XDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_USER_GET_DETAIL
LOGONDATA - Structure with Logon Data
Data type: BAPILOGONDOptional: No
Call by Reference: No ( called with pass by value option)
ISLOCKED - User Lock
Data type: BAPISLOCKDOptional: No
Call by Reference: No ( called with pass by value option)
IDENTITY - Person Assignment of an Identity
Data type: BAPIIDENTITYOptional: No
Call by Reference: No ( called with pass by value option)
ADMINDATA - User: Administration Data
Data type: BAPIUSERADMINOptional: No
Call by Reference: No ( called with pass by value option)
DEFAULTS - Structure with User Defaults
Data type: BAPIDEFAULOptional: No
Call by Reference: No ( called with pass by value option)
ADDRESS - Address Data
Data type: BAPIADDR3Optional: No
Call by Reference: No ( called with pass by value option)
COMPANY - Company for Company Address
Data type: BAPIUSCOMPOptional: No
Call by Reference: No ( called with pass by value option)
SNC - Secure Network Communication Data
Data type: BAPISNCUOptional: No
Call by Reference: No ( called with pass by value option)
REF_USER - User Name of the Reference User
Data type: BAPIREFUSOptional: No
Call by Reference: No ( called with pass by value option)
ALIAS - User Name Alias
Data type: BAPIALIASOptional: No
Call by Reference: No ( called with pass by value option)
UCLASS - License-Related User Classification
Data type: BAPIUCLASSOptional: No
Call by Reference: No ( called with pass by value option)
LASTMODIFIED - User: Last Change (Date and Time)
Data type: BAPIMODDATOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_USER_GET_DETAIL
PARAMETER - Table with User Parameters
Data type: BAPIPARAMOptional: Yes
Call by Reference: No ( called with pass by value option)
ADDRML - Inhouse Mail BAPI Structure
Data type: BAPIADRMLOptional: Yes
Call by Reference: Yes
ADDX400 - BAPI Structure X400 Addresses
Data type: BAPIADX400Optional: Yes
Call by Reference: Yes
ADDRFC - BAPI Structure RFC Addresses
Data type: BAPIADRFCOptional: Yes
Call by Reference: Yes
ADDPRT - BAPI Structure Printer Addresses
Data type: BAPIADPRTOptional: Yes
Call by Reference: Yes
ADDSSF - BAPI Structure SSF Addresses
Data type: BAPIADSSFOptional: Yes
Call by Reference: Yes
ADDURI - BAPI Structure: URL, FTP, and so on
Data type: BAPIADURIOptional: Yes
Call by Reference: Yes
ADDPAG - BAPI Structure Pager Numbers
Data type: BAPIADPAGOptional: Yes
Call by Reference: Yes
ADDCOMREM - BAPI Structure Communication Comments
Data type: BAPICOMREMOptional: Yes
Call by Reference: Yes
PARAMETER1 - Replaces Parameter (Length 18 -> 40)
Data type: BAPIPARAM1Optional: Yes
Call by Reference: Yes
GROUPS - Transfer Structure for a List of User Groups
Data type: BAPIGROUPSOptional: Yes
Call by Reference: Yes
PROFILES - Profiles
Data type: BAPIPROFOptional: Yes
Call by Reference: No ( called with pass by value option)
UCLASSSYS - System-Specific License-Related User Classification
Data type: BAPIUCLASSSYSOptional: Yes
Call by Reference: Yes
EXTIDHEAD - Header Data for External ID of a User
Data type: BAPIUSEXTIDHEADOptional: Yes
Call by Reference: Yes
EXTIDPART - Part of a Long Field for the External ID of a User
Data type: BAPIUSEXTIDPARTOptional: Yes
Call by Reference: Yes
SYSTEMS - BAPI Structure for CUA Target Systems
Data type: BAPIRCVSYSOptional: Yes
Call by Reference: Yes
ACTIVITYGROUPS - Activity Groups
Data type: BAPIAGROptional: Yes
Call by Reference: No ( called with pass by value option)
RETURN - Return Structure
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
ADDTEL - BAPI Structure Telephone Numbers
Data type: BAPIADTELOptional: Yes
Call by Reference: No ( called with pass by value option)
ADDFAX - BAPI Structure Fax Numbers
Data type: BAPIADFAXOptional: Yes
Call by Reference: Yes
ADDTTX - BAPI Structure Teletex Numbers
Data type: BAPIADTTXOptional: Yes
Call by Reference: Yes
ADDTLX - BAPI Structure Telex Numbers
Data type: BAPIADTLXOptional: Yes
Call by Reference: Yes
ADDSMTP - E-Mail Addresses BAPI Structure
Data type: BAPIADSMTPOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_USER_GET_DETAIL Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_username | TYPE BAPIBNAME-BAPIBNAME, " | |||
lv_logondata | TYPE BAPILOGOND, " | |||
lt_parameter | TYPE STANDARD TABLE OF BAPIPARAM, " | |||
lt_addrml | TYPE STANDARD TABLE OF BAPIADRML, " | |||
lv_islocked | TYPE BAPISLOCKD, " | |||
lt_addx400 | TYPE STANDARD TABLE OF BAPIADX400, " | |||
lv_identity | TYPE BAPIIDENTITY, " | |||
lt_addrfc | TYPE STANDARD TABLE OF BAPIADRFC, " | |||
lv_admindata | TYPE BAPIUSERADMIN, " | |||
lt_addprt | TYPE STANDARD TABLE OF BAPIADPRT, " | |||
lt_addssf | TYPE STANDARD TABLE OF BAPIADSSF, " | |||
lt_adduri | TYPE STANDARD TABLE OF BAPIADURI, " | |||
lt_addpag | TYPE STANDARD TABLE OF BAPIADPAG, " | |||
lt_addcomrem | TYPE STANDARD TABLE OF BAPICOMREM, " | |||
lt_parameter1 | TYPE STANDARD TABLE OF BAPIPARAM1, " | |||
lt_groups | TYPE STANDARD TABLE OF BAPIGROUPS, " | |||
lv_defaults | TYPE BAPIDEFAUL, " | |||
lt_profiles | TYPE STANDARD TABLE OF BAPIPROF, " | |||
lv_cache_results | TYPE FLAG_X, " 'X' | |||
lt_uclasssys | TYPE STANDARD TABLE OF BAPIUCLASSSYS, " | |||
lt_extidhead | TYPE STANDARD TABLE OF BAPIUSEXTIDHEAD, " | |||
lt_extidpart | TYPE STANDARD TABLE OF BAPIUSEXTIDPART, " | |||
lt_systems | TYPE STANDARD TABLE OF BAPIRCVSYS, " | |||
lv_address | TYPE BAPIADDR3, " | |||
lt_activitygroups | TYPE STANDARD TABLE OF BAPIAGR, " | |||
lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
lv_company | TYPE BAPIUSCOMP, " | |||
lv_snc | TYPE BAPISNCU, " | |||
lt_addtel | TYPE STANDARD TABLE OF BAPIADTEL, " | |||
lt_addfax | TYPE STANDARD TABLE OF BAPIADFAX, " | |||
lv_ref_user | TYPE BAPIREFUS, " | |||
lv_alias | TYPE BAPIALIAS, " | |||
lt_addttx | TYPE STANDARD TABLE OF BAPIADTTX, " | |||
lt_addtlx | TYPE STANDARD TABLE OF BAPIADTLX, " | |||
lv_uclass | TYPE BAPIUCLASS, " | |||
lt_addsmtp | TYPE STANDARD TABLE OF BAPIADSMTP, " | |||
lv_lastmodified | TYPE BAPIMODDAT. " |
  CALL FUNCTION 'BAPI_USER_GET_DETAIL' "Read User Details |
EXPORTING | ||
USERNAME | = lv_username | |
CACHE_RESULTS | = lv_cache_results | |
IMPORTING | ||
LOGONDATA | = lv_logondata | |
ISLOCKED | = lv_islocked | |
IDENTITY | = lv_identity | |
ADMINDATA | = lv_admindata | |
DEFAULTS | = lv_defaults | |
ADDRESS | = lv_address | |
COMPANY | = lv_company | |
SNC | = lv_snc | |
REF_USER | = lv_ref_user | |
ALIAS | = lv_alias | |
UCLASS | = lv_uclass | |
LASTMODIFIED | = lv_lastmodified | |
TABLES | ||
PARAMETER | = lt_parameter | |
ADDRML | = lt_addrml | |
ADDX400 | = lt_addx400 | |
ADDRFC | = lt_addrfc | |
ADDPRT | = lt_addprt | |
ADDSSF | = lt_addssf | |
ADDURI | = lt_adduri | |
ADDPAG | = lt_addpag | |
ADDCOMREM | = lt_addcomrem | |
PARAMETER1 | = lt_parameter1 | |
GROUPS | = lt_groups | |
PROFILES | = lt_profiles | |
UCLASSSYS | = lt_uclasssys | |
EXTIDHEAD | = lt_extidhead | |
EXTIDPART | = lt_extidpart | |
SYSTEMS | = lt_systems | |
ACTIVITYGROUPS | = lt_activitygroups | |
RETURN | = lt_return | |
ADDTEL | = lt_addtel | |
ADDFAX | = lt_addfax | |
ADDTTX | = lt_addttx | |
ADDTLX | = lt_addtlx | |
ADDSMTP | = lt_addsmtp | |
. " BAPI_USER_GET_DETAIL |
ABAP code using 7.40 inline data declarations to call FM BAPI_USER_GET_DETAIL
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8."SELECT single BAPIBNAME FROM BAPIBNAME INTO @DATA(ld_username). | ||||
DATA(ld_cache_results) | = 'X'. | |||
Search for further information about these or an SAP related objects