BAPI_USER_CLONE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name BAPI_USER_CLONE into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
SU_USER
Released Date:
13.08.2003
Processing type: Remote-Enabled
CALL FUNCTION 'BAPI_USER_CLONE' "Create/Change Users (Only Usable by CUA Distribution)
EXPORTING
username = " bapibname User Name
method = " bapimethod Method to be Called
* logondata = " bapilogond Structure with Logon Data
* password = " bapipwd Password
* defaults = " bapidefaul Structure with User Defaults
* address = " bapiaddr3 Address Data
* company = " bapiuscomp Company for Company Address
* snc = " bapisncu Secure Network Communication - Data
* ref_user = " bapirefus Reference user for rights (Internet)
* alias = " bapialias User Name Alias
* uclass = " bapiuclass User Classification (License-Related)
* uclassx = " bapiuclassx Change Indicators for License-Related User Classification
* extidsx = " bapiusextidx Change Indicators for External IDs
* usattrx = " bapiusattrx Change Indicators for the Additional User Attributes
* add_fields = " bapiaddfld Additional USERCLONE IDoc Fields
* add_fieldsx = " bapiaddfldx Change Indicator for BAPIADDFLD (Various Additional Fields)
* TABLES
* parameter = " bapiparam Table with User Parameters
* profiles = " bapiprof Profiles
* activitygroups = " bapiagr Activity Groups
* return = " bapiret2 Return Structure
* addtel = " bapiadtel
* addfax = " bapiadfax
* addttx = " bapiadttx
* addtlx = " bapiadtlx
* addsmtp = " bapiadsmtp
* addrml = " bapiadrml
* addx400 = " bapiadx400
* addrfc = " bapiadrfc
* addprt = " bapiadprt
* addssf = " bapiadssf
* adduri = " bapiaduri
* addpag = " bapiadpag
* addcomrem = " bapicomrem
* groups = " bapigroups Transfer Structure for a List of User Groups
* applref = " bapiapref References to application objects for user
* persdata = " bapipers Personalization distribution exchange format
* parameter1 = " bapiparam1 Replaces parameter (length 18 -> 40)
* extidhead = " bapiusextidhead Header Data for External ID of a User
* extidpart = " bapiusextidpart Part of a Long Field for the External ID of a User
* usattr = " bapiusattrtab Additional User Attributes
. " BAPI_USER_CLONE
The ABAP code below is a full code listing to execute function module BAPI_USER_CLONE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| it_parameter | TYPE STANDARD TABLE OF BAPIPARAM,"TABLES PARAM |
| wa_parameter | LIKE LINE OF it_parameter , |
| it_profiles | TYPE STANDARD TABLE OF BAPIPROF,"TABLES PARAM |
| wa_profiles | LIKE LINE OF it_profiles , |
| it_activitygroups | TYPE STANDARD TABLE OF BAPIAGR,"TABLES PARAM |
| wa_activitygroups | LIKE LINE OF it_activitygroups , |
| it_return | TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM |
| wa_return | LIKE LINE OF it_return , |
| it_addtel | TYPE STANDARD TABLE OF BAPIADTEL,"TABLES PARAM |
| wa_addtel | LIKE LINE OF it_addtel , |
| it_addfax | TYPE STANDARD TABLE OF BAPIADFAX,"TABLES PARAM |
| wa_addfax | LIKE LINE OF it_addfax , |
| it_addttx | TYPE STANDARD TABLE OF BAPIADTTX,"TABLES PARAM |
| wa_addttx | LIKE LINE OF it_addttx , |
| it_addtlx | TYPE STANDARD TABLE OF BAPIADTLX,"TABLES PARAM |
| wa_addtlx | LIKE LINE OF it_addtlx , |
| it_addsmtp | TYPE STANDARD TABLE OF BAPIADSMTP,"TABLES PARAM |
| wa_addsmtp | LIKE LINE OF it_addsmtp , |
| it_addrml | TYPE STANDARD TABLE OF BAPIADRML,"TABLES PARAM |
| wa_addrml | LIKE LINE OF it_addrml , |
| it_addx400 | TYPE STANDARD TABLE OF BAPIADX400,"TABLES PARAM |
| wa_addx400 | LIKE LINE OF it_addx400 , |
| it_addrfc | TYPE STANDARD TABLE OF BAPIADRFC,"TABLES PARAM |
| wa_addrfc | LIKE LINE OF it_addrfc , |
| it_addprt | TYPE STANDARD TABLE OF BAPIADPRT,"TABLES PARAM |
| wa_addprt | LIKE LINE OF it_addprt , |
| it_addssf | TYPE STANDARD TABLE OF BAPIADSSF,"TABLES PARAM |
| wa_addssf | LIKE LINE OF it_addssf , |
| it_adduri | TYPE STANDARD TABLE OF BAPIADURI,"TABLES PARAM |
| wa_adduri | LIKE LINE OF it_adduri , |
| it_addpag | TYPE STANDARD TABLE OF BAPIADPAG,"TABLES PARAM |
| wa_addpag | LIKE LINE OF it_addpag , |
| it_addcomrem | TYPE STANDARD TABLE OF BAPICOMREM,"TABLES PARAM |
| wa_addcomrem | LIKE LINE OF it_addcomrem , |
| it_groups | TYPE STANDARD TABLE OF BAPIGROUPS,"TABLES PARAM |
| wa_groups | LIKE LINE OF it_groups , |
| it_applref | TYPE STANDARD TABLE OF BAPIAPREF,"TABLES PARAM |
| wa_applref | LIKE LINE OF it_applref , |
| it_persdata | TYPE STANDARD TABLE OF BAPIPERS,"TABLES PARAM |
| wa_persdata | LIKE LINE OF it_persdata , |
| it_parameter1 | TYPE STANDARD TABLE OF BAPIPARAM1,"TABLES PARAM |
| wa_parameter1 | LIKE LINE OF it_parameter1 , |
| it_extidhead | TYPE STANDARD TABLE OF BAPIUSEXTIDHEAD,"TABLES PARAM |
| wa_extidhead | LIKE LINE OF it_extidhead , |
| it_extidpart | TYPE STANDARD TABLE OF BAPIUSEXTIDPART,"TABLES PARAM |
| wa_extidpart | LIKE LINE OF it_extidpart , |
| it_usattr | TYPE STANDARD TABLE OF BAPIUSATTRTAB,"TABLES PARAM |
| wa_usattr | LIKE LINE OF it_usattr . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_username | TYPE BAPIBNAME , |
| it_parameter | TYPE STANDARD TABLE OF BAPIPARAM , |
| wa_parameter | LIKE LINE OF it_parameter, |
| ld_method | TYPE BAPIMETHOD , |
| it_profiles | TYPE STANDARD TABLE OF BAPIPROF , |
| wa_profiles | LIKE LINE OF it_profiles, |
| ld_logondata | TYPE BAPILOGOND , |
| it_activitygroups | TYPE STANDARD TABLE OF BAPIAGR , |
| wa_activitygroups | LIKE LINE OF it_activitygroups, |
| it_return | TYPE STANDARD TABLE OF BAPIRET2 , |
| wa_return | LIKE LINE OF it_return, |
| ld_password | TYPE BAPIPWD , |
| it_addtel | TYPE STANDARD TABLE OF BAPIADTEL , |
| wa_addtel | LIKE LINE OF it_addtel, |
| ld_defaults | TYPE BAPIDEFAUL , |
| it_addfax | TYPE STANDARD TABLE OF BAPIADFAX , |
| wa_addfax | LIKE LINE OF it_addfax, |
| ld_address | TYPE BAPIADDR3 , |
| it_addttx | TYPE STANDARD TABLE OF BAPIADTTX , |
| wa_addttx | LIKE LINE OF it_addttx, |
| ld_company | TYPE BAPIUSCOMP , |
| it_addtlx | TYPE STANDARD TABLE OF BAPIADTLX , |
| wa_addtlx | LIKE LINE OF it_addtlx, |
| ld_snc | TYPE BAPISNCU , |
| it_addsmtp | TYPE STANDARD TABLE OF BAPIADSMTP , |
| wa_addsmtp | LIKE LINE OF it_addsmtp, |
| ld_ref_user | TYPE BAPIREFUS , |
| it_addrml | TYPE STANDARD TABLE OF BAPIADRML , |
| wa_addrml | LIKE LINE OF it_addrml, |
| ld_alias | TYPE BAPIALIAS , |
| it_addx400 | TYPE STANDARD TABLE OF BAPIADX400 , |
| wa_addx400 | LIKE LINE OF it_addx400, |
| ld_uclass | TYPE BAPIUCLASS , |
| it_addrfc | TYPE STANDARD TABLE OF BAPIADRFC , |
| wa_addrfc | LIKE LINE OF it_addrfc, |
| ld_uclassx | TYPE BAPIUCLASSX , |
| ld_extidsx | TYPE BAPIUSEXTIDX , |
| it_addprt | TYPE STANDARD TABLE OF BAPIADPRT , |
| wa_addprt | LIKE LINE OF it_addprt, |
| ld_usattrx | TYPE BAPIUSATTRX , |
| it_addssf | TYPE STANDARD TABLE OF BAPIADSSF , |
| wa_addssf | LIKE LINE OF it_addssf, |
| ld_add_fields | TYPE BAPIADDFLD , |
| it_adduri | TYPE STANDARD TABLE OF BAPIADURI , |
| wa_adduri | LIKE LINE OF it_adduri, |
| ld_add_fieldsx | TYPE BAPIADDFLDX , |
| it_addpag | TYPE STANDARD TABLE OF BAPIADPAG , |
| wa_addpag | LIKE LINE OF it_addpag, |
| it_addcomrem | TYPE STANDARD TABLE OF BAPICOMREM , |
| wa_addcomrem | LIKE LINE OF it_addcomrem, |
| it_groups | TYPE STANDARD TABLE OF BAPIGROUPS , |
| wa_groups | LIKE LINE OF it_groups, |
| it_applref | TYPE STANDARD TABLE OF BAPIAPREF , |
| wa_applref | LIKE LINE OF it_applref, |
| it_persdata | TYPE STANDARD TABLE OF BAPIPERS , |
| wa_persdata | LIKE LINE OF it_persdata, |
| it_parameter1 | TYPE STANDARD TABLE OF BAPIPARAM1 , |
| wa_parameter1 | LIKE LINE OF it_parameter1, |
| it_extidhead | TYPE STANDARD TABLE OF BAPIUSEXTIDHEAD , |
| wa_extidhead | LIKE LINE OF it_extidhead, |
| it_extidpart | TYPE STANDARD TABLE OF BAPIUSEXTIDPART , |
| wa_extidpart | LIKE LINE OF it_extidpart, |
| it_usattr | TYPE STANDARD TABLE OF BAPIUSATTRTAB , |
| wa_usattr | LIKE LINE OF it_usattr. |
This method is purely technical. You need it to distribute users via
ALE.
...See here for full SAP fm documentation
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_USER_CLONE or its description.