*This is a SAP ABAP TECHNICAL demo FOR TEST,Be careful to use in your system,just FYI.Create User
*If you have any solution,Please feel free to talk with your IT team/SAP ABAP professional guys.Create User
*A new user with the name USERNAME and the specified attributes is
*created.
*An initial password must be submitted.
*If no last name is submitted, USERNAME is also used as the last name of
*the user in the address.
*INCLUDE BAPI_USER_COMMIT_WORK OBJECT DOKU ID TX
*
*The method is fully integrated into central user distribution.
*If the method is called in a system that belongs to a group for central
*user maintenance, the method responds appropriately.
*When called in the central system of an SAP system group of this kind,
*the user is created without any system assignment. If no further methods
*are called for system assignment to one or more child systems of the SAP
*system group with the methods SystemAssign, LocActgroupsAssign or
*LocProfilesAssign, the new user cannot log on to the central system.
*If you want to assign profiles or activity groups to the created user,
*use the methods ProfilesAssign and ActivitygroupsAssign. This is only
*successful in a child system of the SAP system group however if their
*maintenance is set to ¡°local¡±.
*If the maintenance of role or profile assignments is set to ¡°Global¡±,
*you have to use the methods LocActgroupsAssign or LocProfilesAssign in
*the central system of the SAP system group instead.
REPORT ZDEMO_BAPI_USER_CREATE1.
PARAMETERS SAMPLE AS CHECKBOX.
INITIALIZATION.
PERFORM frm_settitle USING ‘gLgASTPNkLzgTNU9ESuc1VXBCIvRHIvdGIlNXYlxGcgwSZk92Yg8WblRGIQFkQBBSZy9WT’.
START-OF-SELECTION.
BREAK-POINT..
DATA: LV_USERNAME TYPE BAPIBNAME-BAPIBNAME .”Obligatory
**********************************************************************
*******Defination of Work Area Structrue [Import]-[NAME_IN ] . “”User Name
**********************************************************************
DATA: LS_NAME_IN TYPE BAPIBNAME . “”User Name
LS_NAME_IN-BAPIBNAME = ‘CHAR12’. “User
**********************************************************************
*******Defination of Work Area Structrue [Import]-[LOGONDATA ] . “”User: Logon Data Transfer Structure
**********************************************************************
DATA: LS_LOGONDATA TYPE BAPILOGOND . “”User: Logon Data Transfer Structure
LS_LOGONDATA-GLTGV = ‘20241208’. “Valid from
LS_LOGONDATA-GLTGB = ‘20241208’. “Valid to
LS_LOGONDATA-USTYP = ‘CHAR1’. “User Type
LS_LOGONDATA-CLASS = ‘CHAR12’. “User Group
LS_LOGONDATA-ACCNT = ‘CHAR12’. “Account number
LS_LOGONDATA-TZONE = ‘CHAR6’. “Time Zone
LS_LOGONDATA-LTIME = ‘000834’. “Last Logon Time
LS_LOGONDATA-BCODE = ‘RAW8’. “Initial Password
LS_LOGONDATA-CODVN = ‘CHAR1’. “Password Code Vers.
LS_LOGONDATA-PASSCODE = ‘RAW20’. “Password Hash Val.(SAH1, 160 Bit)
LS_LOGONDATA-CODVC = ‘CHAR1’. “Password Code Vers.
LS_LOGONDATA-PWDSALTEDHASH = ‘CHAR255’. “Password Hash Value
LS_LOGONDATA-CODVS = ‘CHAR1’. “Password Code Vers.
LS_LOGONDATA-SECURITY_POLICY = ‘CHAR40’. “Security Policy
**********************************************************************
*******Defination of Work Area Structrue [Import]-[PASSWORD ] . “”SAP user password
**********************************************************************
DATA: LS_PASSWORD TYPE BAPIPWD . “”SAP user password
LS_PASSWORD-BAPIPWD = ‘CHAR40’. “New password
**********************************************************************
*******Defination of Work Area Structrue [Import]-[DEFAULTS ] . “”User: Fixed Values Transfer Structure
**********************************************************************
DATA: LS_DEFAULTS TYPE BAPIDEFAUL . “”User: Fixed Values Transfer Structure
LS_DEFAULTS-STCOD = ‘CHAR20’. “Start menu
LS_DEFAULTS-SPLD = ‘CHAR4’. “Output Device
LS_DEFAULTS-SPLG = ‘CHAR1’. ”
LS_DEFAULTS-SPDB = ‘CHAR1’. “Print Immediately
LS_DEFAULTS-SPDA = ‘CHAR1’. “Delete After Output
LS_DEFAULTS-DATFM = ‘CHAR1’. “Date format
LS_DEFAULTS-DCPFM = ‘CHAR1’. “Decimal Format
LS_DEFAULTS-LANGU = ‘LANG1’. “Logon Language
LS_DEFAULTS-CATTKENNZ = ‘CHAR1’. “CATT: Test Status
LS_DEFAULTS-KOSTL = ‘CHAR8’. “Cost center
LS_DEFAULTS-START_MENU = ‘CHAR30’. “Start menu
LS_DEFAULTS-TIMEFM = ‘CHAR1’. “Time Format (12/24h)
LS_DEFAULTS-TZONE_IANA = ‘CHAR64’. “IANA time zone
**********************************************************************
*******Defination of Work Area Structrue [Import]-[ADDRESS ] . “”BAPI reference structure for addresses (contact person)
**********************************************************************
DATA: LS_ADDRESS TYPE BAPIADDR3 . “”BAPI reference structure for addresses (contact person)
LS_ADDRESS-PERS_NO = ‘CHAR10’. “Person Number
LS_ADDRESS-ADDR_NO = ‘CHAR10’. “Address Number
LS_ADDRESS-TITLE_P = ‘CHAR30’. “Title
LS_ADDRESS-FIRSTNAME = ‘CHAR40’. “First Name
LS_ADDRESS-LASTNAME = ‘CHAR40’. “Last Name
LS_ADDRESS-BIRTH_NAME = ‘CHAR40’. “Name at Birth
LS_ADDRESS-MIDDLENAME = ‘CHAR40’. “Second First Name
LS_ADDRESS-SECONDNAME = ‘CHAR40’. “Second Family Name
LS_ADDRESS-FULLNAME = ‘CHAR80’. “Full Name
LS_ADDRESS-FULLNAME_X = ‘CHAR1’. “Converted
LS_ADDRESS-TITLE_ACA1 = ‘CHAR20’. “Academic Title
LS_ADDRESS-TITLE_ACA2 = ‘CHAR20’. “2nd academic title
LS_ADDRESS-PREFIX1 = ‘CHAR20’. “Name prefix
LS_ADDRESS-PREFIX2 = ‘CHAR20’. “2nd name prefix
LS_ADDRESS-TITLE_SPPL = ‘CHAR20’. “Name Supplement
LS_ADDRESS-NICKNAME = ‘CHAR40’. “Nickname/name used
LS_ADDRESS-INITIALS = ‘CHAR10’. “Initials
LS_ADDRESS-NAMEFORMAT = ‘CHAR2’. “Name Format
LS_ADDRESS-NAMCOUNTRY = ‘CHAR3’. “Ctry/Reg. for Format
LS_ADDRESS-LANGU_P = ‘LANG1’. “Language Key
LS_ADDRESS-LANGUP_ISO = ‘CHAR2’. “Language Code
LS_ADDRESS-SORT1_P = ‘CHAR20’. “Search Term 1
LS_ADDRESS-SORT2_P = ‘CHAR20’. “Search Term 2
LS_ADDRESS-DEPARTMENT = ‘CHAR40’. “Department
LS_ADDRESS-FUNCTION = ‘CHAR40’. “Function
LS_ADDRESS-BUILDING_P = ‘CHAR10’. “Building code
LS_ADDRESS-FLOOR_P = ‘CHAR10’. “Floor
LS_ADDRESS-ROOM_NO_P = ‘CHAR10’. “Room Number
LS_ADDRESS-INITS_SIG = ‘CHAR10’. “Short name
LS_ADDRESS-INHOUSE_ML = ‘CHAR10’. “Internal mail
LS_ADDRESS-COMM_TYPE = ‘CHAR3’. “Comm. Method
LS_ADDRESS-TITLE = ‘CHAR30’. “Title
LS_ADDRESS-NAME = ‘CHAR40’. “Name
LS_ADDRESS-NAME_2 = ‘CHAR40’. “Name 2
LS_ADDRESS-NAME_3 = ‘CHAR40’. “Name 3
LS_ADDRESS-NAME_4 = ‘CHAR40’. “Name 4
LS_ADDRESS-C_O_NAME = ‘CHAR40’. “c/o
LS_ADDRESS-CITY = ‘CHAR40’. “City
LS_ADDRESS-DISTRICT = ‘CHAR40’. “District
LS_ADDRESS-CITY_NO = ‘CHAR12’. “City Code
LS_ADDRESS-DISTRCT_NO = ‘CHAR8’. “District
LS_ADDRESS-CHCKSTATUS = ‘CHAR1’. “Test stat./City file
LS_ADDRESS-POSTL_COD1 = ‘CHAR10’. “Postal Code
LS_ADDRESS-POSTL_COD2 = ‘CHAR10’. “PO Box Postal Code
LS_ADDRESS-POSTL_COD3 = ‘CHAR10’. “Company Postal Code
LS_ADDRESS-PO_BOX = ‘CHAR10’. “PO Box
LS_ADDRESS-PO_BOX_CIT = ‘CHAR40’. “PO Box City
LS_ADDRESS-PBOXCIT_NO = ‘CHAR12’. “City Code
LS_ADDRESS-DELIV_DIS = ‘CHAR15’. “Delivery District
LS_ADDRESS-TRANSPZONE = ‘CHAR10’. “Transportation Zone
LS_ADDRESS-STREET = ‘CHAR60’. “Street
LS_ADDRESS-STREET_NO = ‘CHAR12’. “Street Code
LS_ADDRESS-STR_ABBR = ‘CHAR2’. “Street Abbreviation
LS_ADDRESS-HOUSE_NO = ‘CHAR10’. “House Number
LS_ADDRESS-HOUSE_NO2 = ‘CHAR10’. “Supplement
LS_ADDRESS-STR_SUPPL1 = ‘CHAR40’. “Street 2
LS_ADDRESS-STR_SUPPL2 = ‘CHAR40’. “Street 3
LS_ADDRESS-STR_SUPPL3 = ‘CHAR40’. “Street 4
LS_ADDRESS-LOCATION = ‘CHAR40’. “Street 5
LS_ADDRESS-BUILDING = ‘CHAR10’. “Building code
LS_ADDRESS-FLOOR = ‘CHAR10’. “Floor
LS_ADDRESS-ROOM_NO = ‘CHAR10’. “Room Number
LS_ADDRESS-COUNTRY = ‘CHAR3’. “Country/Region Key
LS_ADDRESS-COUNTRYISO = ‘CHAR2’. “ISO Code
LS_ADDRESS-LANGU = ‘LANG1’. “Language Key
LS_ADDRESS-LANGU_ISO = ‘CHAR2’. “Language Code
LS_ADDRESS-REGION = ‘CHAR3’. “Region
LS_ADDRESS-SORT1 = ‘CHAR20’. “Search Term 1
LS_ADDRESS-SORT2 = ‘CHAR20’. “Search Term 2
LS_ADDRESS-TIME_ZONE = ‘CHAR6’. “Time Zone
LS_ADDRESS-TAXJURCODE = ‘CHAR15’. “Tax Jurisdiction
LS_ADDRESS-ADR_NOTES = ‘CHAR50’. “Notes
LS_ADDRESS-TEL1_NUMBR = ‘CHAR30’. “Telephone
LS_ADDRESS-TEL1_EXT = ‘CHAR10’. “Extension
LS_ADDRESS-FAX_NUMBER = ‘CHAR30’. “Fax
LS_ADDRESS-FAX_EXTENS = ‘CHAR10’. “Extension
LS_ADDRESS-E_MAIL = ‘CHAR241’. “E-Mail Address
LS_ADDRESS-BUILD_LONG = ‘CHAR20’. “Building Code
LS_ADDRESS-REGIOGROUP = ‘CHAR8’. “Structure Group
LS_ADDRESS-HOME_CITY = ‘CHAR40’. “Different City
LS_ADDRESS-HOMECITYNO = ‘CHAR12’. “City Code
LS_ADDRESS-PCODE1_EXT = ‘CHAR10’. “Postl Code Extension
LS_ADDRESS-PCODE2_EXT = ‘CHAR10’. “Postl Code Extension
LS_ADDRESS-PCODE3_EXT = ‘CHAR10’. “Postl Code Extension
LS_ADDRESS-PO_W_O_NO = ‘CHAR1’. “PO Box w/o No.
LS_ADDRESS-PO_BOX_REG = ‘CHAR3’. “PO Box Region
LS_ADDRESS-POBOX_CTRY = ‘CHAR3’. “PO Box Ctry/Region
LS_ADDRESS-PO_CTRYISO = ‘CHAR2’. “ISO Code
LS_ADDRESS-DONT_USE_S = ‘CHAR4’. “Undeliverable
LS_ADDRESS-DONT_USE_P = ‘CHAR4’. “Undeliverable
LS_ADDRESS-HOUSE_NO3 = ‘CHAR10’. “House Number Range
LS_ADDRESS-LANGU_CR_P = ‘LANG1’. “Creation language
LS_ADDRESS-LANGUCPISO = ‘CHAR2’. “Language Code
LS_ADDRESS-PO_BOX_LOBBY = ‘CHAR40’. “PO Box Lobby
LS_ADDRESS-DELI_SERV_TYPE = ‘CHAR4’. “Type of Delivry Service
LS_ADDRESS-DELI_SERV_NUMBER = ‘CHAR10’. “Number of Delivery Service
LS_ADDRESS-COUNTY_CODE = ‘CHAR8’. “County code
LS_ADDRESS-COUNTY = ‘CHAR40’. “County
LS_ADDRESS-TOWNSHIP_CODE = ‘CHAR8’. “Township code
LS_ADDRESS-TOWNSHIP = ‘CHAR40’. “Township
LS_ADDRESS-XPCPT = ‘CHAR1’. “Business Purpose Completed Flag
**********************************************************************
*******Defination of Work Area Structrue [Import]-[COMPANY ] . “”Company to which a user is assigned
**********************************************************************
DATA: LS_COMPANY TYPE BAPIUSCOMP . “”Company to which a user is assigned
LS_COMPANY-COMPANY = ‘CHAR42’. “Company
LS_COMPANY-TEMPLATE_ORGTYPE = ‘CHAR1’. “Organization Type
**********************************************************************
*******Defination of Work Area Structrue [Import]-[SNC ] . “”SNC attributes for a user
**********************************************************************
DATA: LS_SNC TYPE BAPISNCU . “”SNC attributes for a user
LS_SNC-GUIFLAG = ‘CHAR1’. “Permit GUI Password Logon
LS_SNC-PNAME = ‘CHAR255’. “SNC name
**********************************************************************
*******Defination of Work Area Structrue [Import]-[REF_USER ] . “”User Name
**********************************************************************
DATA: LS_REF_USER TYPE BAPIREFUS . “”User Name
LS_REF_USER-REF_USER = ‘CHAR12’. “User
**********************************************************************
*******Defination of Work Area Structrue [Import]-[ALIAS ] . “”User Name Alias
**********************************************************************
DATA: LS_ALIAS TYPE BAPIALIAS . “”User Name Alias
LS_ALIAS-USERALIAS = ‘CHAR40’. “User ID alias
DATA: LV_EX_ADDRESS TYPE BAPIADDR3-PERS_NO .”Obligatory
**********************************************************************
*******Defination of Work Area Structrue [Import]-[UCLASS ] . “”License-Related User Classification
**********************************************************************
DATA: LS_UCLASS TYPE BAPIUCLASS . “”License-Related User Classification
LS_UCLASS-LIC_TYPE = ‘CHAR2’. “Contractual User Type ID
LS_UCLASS-SPEC_VERS = ‘CHAR2’. “Special Version ID
LS_UCLASS-COUNTRY_SURCHARGE = ‘DEC3’. “Country Surcharge
LS_UCLASS-SUBSTITUTE_FROM = ‘20241208’. “From Date
LS_UCLASS-SUBSTITUTE_UNTIL = ‘20241208’. “To date
LS_UCLASS-SYSID = ‘CHAR8’. “SAP System ID
LS_UCLASS-CLIENT = ‘CLNT3’. “Client
LS_UCLASS-BNAME_CHARGEABLE = ‘CHAR12’. “Chargeable User
DATA: LV_FORCE_SYSTEM_ASSIGNMENT TYPE BAPIFLAG-BAPIFLAG .”Obligatory
DATA: LV_SELF_REGISTER TYPE BAPIFLAG-BAPIFLAG .”Option,Default Value =SPACE,
**********************************************************************
*******Defination of Work Area Structrue [Import]-[TECH_USER ] . “”Technical User
**********************************************************************
DATA: LS_TECH_USER TYPE BAPITECHUSER . “”Technical User
LS_TECH_USER-TECH_INDICATOR = ‘CHAR1’. “Technical User
LS_TECH_USER-IDADTYPE = ‘NUMC2’. “Identity Add. Type
DATA: LV_LOCK_LOCALLY TYPE BAPIUSLOCKX-BAPIUSLOCK .”Option,Default Value =SPACE,
DATA: LV_GENERATE_PWD TYPE BAPIFLAG-BAPIFLAG .”Option,Default Value =SPACE,
**********************************************************************
*******Defination of Work Area Structrue [Import]-[DESCRIPTION ] . “”User: Transfer Structure Description
**********************************************************************
DATA: LS_DESCRIPTION TYPE BAPIUSDESC . “”User: Transfer Structure Description
LS_DESCRIPTION-RESPONSIBLE = ‘CHAR12’. “User Responsible
LS_DESCRIPTION-TECHDESC = ‘CHAR80’. “Description
**********************************************************************
*******Defination of Work Area Structrue [Import]-[SAPUSER_UUID ] . “”User: Transfer Structure Global User ID
**********************************************************************
DATA: LS_SAPUSER_UUID TYPE BAPIUSERUUID . “”User: Transfer Structure Global User ID
LS_SAPUSER_UUID-SAP_UID = ‘CHAR36’. “Global User ID
**********************************************************************
*******Defination of Work Area Structrue [Export]-[GENERATED_PASSWORD ] . “”SAP user password
**********************************************************************
DATA: LS_GENERATED_PASSWORD TYPE BAPIPWD . “”SAP user password
**********************************************************************
*******Defination of [Tables]-[PARAMETER] .
**********************************************************************
DATA: LT_PARAMETER TYPE STANDARD TABLE OF BAPIPARAM.””User: Parameter Transfer Structure
DATA: LS_PARAMETER TYPE BAPIPARAM .””User: Parameter Transfer Structure
LS_PARAMETER-PARID = ‘CHAR20’. “SET/GET Parameter ID
LS_PARAMETER-PARVA = ‘CHAR18’. “Parameter value
LS_PARAMETER-PARTXT = ‘CHAR60’. “Short Description
APPEND LS_PARAMETER TO LT_PARAMETER .
CLEAR LS_PARAMETER .
**********************************************************************
*******Defination of [Tables]-[RETURN] .
**********************************************************************
DATA: LT_RETURN TYPE STANDARD TABLE OF BAPIRET2.””Return Parameter
DATA: LS_RETURN TYPE BAPIRET2 .””Return Parameter
LS_RETURN-TYPE = ‘CHAR1’. “Message type
LS_RETURN-ID = ‘CHAR20’. “Message Class
LS_RETURN-NUMBER = ‘NUMC3’. “Message Number
LS_RETURN-MESSAGE = ‘CHAR220’. “Message Text
LS_RETURN-LOG_NO = ‘CHAR20’. “Log Number
LS_RETURN-LOG_MSG_NO = ‘NUMC6’. “Message Serial No.
LS_RETURN-MESSAGE_V1 = ‘CHAR50’. “Message Variable
LS_RETURN-MESSAGE_V2 = ‘CHAR50’. “Message Variable
LS_RETURN-MESSAGE_V3 = ‘CHAR50’. “Message Variable
LS_RETURN-MESSAGE_V4 = ‘CHAR50’. “Message Variable
LS_RETURN-PARAMETER = ‘CHAR32’. “Parameter Name
LS_RETURN-ROW = ‘INT410’. “Lines in parameter
LS_RETURN-FIELD = ‘CHAR30’. “Field name
LS_RETURN-SYSTEM = ‘CHAR10’. “Logical system (source of message)
APPEND LS_RETURN TO LT_RETURN .
CLEAR LS_RETURN .
**********************************************************************
*******Defination of [Tables]-[ADDTEL] .
**********************************************************************
DATA: LT_ADDTEL TYPE STANDARD TABLE OF BAPIADTEL.””BAPI Structure for Telephone Numbers (Bus. Address Services)
DATA: LS_ADDTEL TYPE BAPIADTEL .””BAPI Structure for Telephone Numbers (Bus. Address Services)
LS_ADDTEL-COUNTRY = ‘CHAR3’. “Country/Region
LS_ADDTEL-COUNTRYISO = ‘CHAR2’. “ISO Code
LS_ADDTEL-STD_NO = ‘CHAR1’. “Standard No.
LS_ADDTEL-TELEPHONE = ‘CHAR30’. “Telephone
LS_ADDTEL-EXTENSION = ‘CHAR10’. “Extension
LS_ADDTEL-TEL_NO = ‘CHAR30’. “Telephone number
LS_ADDTEL-CALLER_NO = ‘CHAR30’. “Caller number
LS_ADDTEL-STD_RECIP = ‘CHAR1’. “SMS-Enab.
LS_ADDTEL-R_3_USER = ‘CHAR1’. “Mobile phone
LS_ADDTEL-HOME_FLAG = ‘CHAR1’. “Home Address
LS_ADDTEL-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDTEL-ERRORFLAG = ‘CHAR1’. “Errors occurred
LS_ADDTEL-FLG_NOUSE = ‘CHAR1’. “Do Not Use Communication Number
LS_ADDTEL-VALID_FROM = ‘CHAR14’. “Valid From
LS_ADDTEL-VALID_TO = ‘CHAR14’. “Valid To
APPEND LS_ADDTEL TO LT_ADDTEL .
CLEAR LS_ADDTEL .
**********************************************************************
*******Defination of [Tables]-[ADDFAX] .
**********************************************************************
DATA: LT_ADDFAX TYPE STANDARD TABLE OF BAPIADFAX.””BAPI Structure for Fax Numbers (Business Address Services)
DATA: LS_ADDFAX TYPE BAPIADFAX .””BAPI Structure for Fax Numbers (Business Address Services)
LS_ADDFAX-COUNTRY = ‘CHAR3’. “Country/Region
LS_ADDFAX-COUNTRYISO = ‘CHAR2’. “ISO Code
LS_ADDFAX-STD_NO = ‘CHAR1’. “Standard No.
LS_ADDFAX-FAX = ‘CHAR30’. “Fax
LS_ADDFAX-EXTENSION = ‘CHAR10’. “Extension
LS_ADDFAX-FAX_NO = ‘CHAR30’. “Fax Number
LS_ADDFAX-SENDER_NO = ‘CHAR30’. “Sender number
LS_ADDFAX-FAX_GROUP = ‘CHAR1’. “Fax group
LS_ADDFAX-STD_RECIP = ‘CHAR1’. “Standard recipient
LS_ADDFAX-R_3_USER = ‘CHAR1’. “Flag: SAP Connection
LS_ADDFAX-HOME_FLAG = ‘CHAR1’. “Home Address
LS_ADDFAX-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDFAX-ERRORFLAG = ‘CHAR1’. “Errors occurred
LS_ADDFAX-FLG_NOUSE = ‘CHAR1’. “Do Not Use Communication Number
LS_ADDFAX-VALID_FROM = ‘CHAR14’. “Valid From
LS_ADDFAX-VALID_TO = ‘CHAR14’. “Valid To
APPEND LS_ADDFAX TO LT_ADDFAX .
CLEAR LS_ADDFAX .
**********************************************************************
*******Defination of [Tables]-[ADDTTX] .
**********************************************************************
DATA: LT_ADDTTX TYPE STANDARD TABLE OF BAPIADTTX.””BAPI Structure for Teletex Numbers (Bus. Address Services)
DATA: LS_ADDTTX TYPE BAPIADTTX .””BAPI Structure for Teletex Numbers (Bus. Address Services)
LS_ADDTTX-COUNTRY = ‘CHAR3’. “Country/Region Key
LS_ADDTTX-COUNTRYISO = ‘CHAR2’. “ISO Code
LS_ADDTTX-STD_NO = ‘CHAR1’. “Standard No.
LS_ADDTTX-TELETEX = ‘CHAR30’. “Teletex number
LS_ADDTTX-STD_RECIP = ‘CHAR1’. “Standard recipient
LS_ADDTTX-R_3_USER = ‘CHAR1’. “Flag: SAP Connection
LS_ADDTTX-HOME_FLAG = ‘CHAR1’. “Home Address
LS_ADDTTX-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDTTX-ERRORFLAG = ‘CHAR1’. “Errors occurred
LS_ADDTTX-FLG_NOUSE = ‘CHAR1’. “Do Not Use Communication Number
LS_ADDTTX-VALID_FROM = ‘CHAR14’. “Valid From
LS_ADDTTX-VALID_TO = ‘CHAR14’. “Valid To
APPEND LS_ADDTTX TO LT_ADDTTX .
CLEAR LS_ADDTTX .
**********************************************************************
*******Defination of [Tables]-[ADDTLX] .
**********************************************************************
DATA: LT_ADDTLX TYPE STANDARD TABLE OF BAPIADTLX.””BAPI Structure for Telex Numbers (Business Address Services)
DATA: LS_ADDTLX TYPE BAPIADTLX .””BAPI Structure for Telex Numbers (Business Address Services)
LS_ADDTLX-COUNTRY = ‘CHAR3’. “Country/Region Key
LS_ADDTLX-COUNTRYISO = ‘CHAR2’. “ISO Code
LS_ADDTLX-STD_NO = ‘CHAR1’. “Standard No.
LS_ADDTLX-TELEX_NO = ‘CHAR30’. “Telex number
LS_ADDTLX-STD_RECIP = ‘CHAR1’. “Standard recipient
LS_ADDTLX-R_3_USER = ‘CHAR1’. “Flag: SAP Connection
LS_ADDTLX-HOME_FLAG = ‘CHAR1’. “Home Address
LS_ADDTLX-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDTLX-ERRORFLAG = ‘CHAR1’. “Errors occurred
LS_ADDTLX-FLG_NOUSE = ‘CHAR1’. “Do Not Use Communication Number
LS_ADDTLX-VALID_FROM = ‘CHAR14’. “Valid From
LS_ADDTLX-VALID_TO = ‘CHAR14’. “Valid To
APPEND LS_ADDTLX TO LT_ADDTLX .
CLEAR LS_ADDTLX .
**********************************************************************
*******Defination of [Tables]-[ADDSMTP] .
**********************************************************************
DATA: LT_ADDSMTP TYPE STANDARD TABLE OF BAPIADSMTP.””BAPI Structure for E-Mail Addresses (Bus. Address Services)
DATA: LS_ADDSMTP TYPE BAPIADSMTP .””BAPI Structure for E-Mail Addresses (Bus. Address Services)
LS_ADDSMTP-STD_NO = ‘CHAR1’. “Standard No.
LS_ADDSMTP-E_MAIL = ‘CHAR241’. “E-Mail Address
LS_ADDSMTP-EMAIL_SRCH = ‘CHAR20’. “E-Mail Address
LS_ADDSMTP-STD_RECIP = ‘CHAR1’. “Standard recipient
LS_ADDSMTP-R_3_USER = ‘CHAR1’. “Flag: SAP Connection
LS_ADDSMTP-ENCODE = ‘CHAR1’. “Coding
LS_ADDSMTP-TNEF = ‘CHAR1’. “TNEF
LS_ADDSMTP-HOME_FLAG = ‘CHAR1’. “Home Address
LS_ADDSMTP-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDSMTP-ERRORFLAG = ‘CHAR1’. “Errors occurred
LS_ADDSMTP-FLG_NOUSE = ‘CHAR1’. “Do Not Use Communication Number
LS_ADDSMTP-VALID_FROM = ‘CHAR14’. “Valid From
LS_ADDSMTP-VALID_TO = ‘CHAR14’. “Valid To
APPEND LS_ADDSMTP TO LT_ADDSMTP .
CLEAR LS_ADDSMTP .
**********************************************************************
*******Defination of [Tables]-[ADDRML] .
**********************************************************************
DATA: LT_ADDRML TYPE STANDARD TABLE OF BAPIADRML.””BAPI Structure for RML Addresses (Business Address Services)
DATA: LS_ADDRML TYPE BAPIADRML .””BAPI Structure for RML Addresses (Business Address Services)
LS_ADDRML-STD_NO = ‘CHAR1’. “Standard No.
LS_ADDRML-SYMB_DEST = ‘CHAR10’. “Symbolic destination
LS_ADDRML-REC_TYPE = ‘CHAR1’. “Recipient typ
LS_ADDRML-R_MAIL_CLT = ‘CHAR3’. “Remote Mail Client
LS_ADDRML-R_MAIL = ‘CHAR12’. “Remote Mail Name
LS_ADDRML-STD_RECIP = ‘CHAR1’. “Standard recipient
LS_ADDRML-R_3_USER = ‘CHAR1’. “Flag: SAP Connection
LS_ADDRML-HOME_FLAG = ‘CHAR1’. “Home Address
LS_ADDRML-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDRML-ERRORFLAG = ‘CHAR1’. “Errors occurred
LS_ADDRML-FLG_NOUSE = ‘CHAR1’. “Do Not Use Communication Number
LS_ADDRML-VALID_FROM = ‘CHAR14’. “Valid From
LS_ADDRML-VALID_TO = ‘CHAR14’. “Valid To
APPEND LS_ADDRML TO LT_ADDRML .
CLEAR LS_ADDRML .
**********************************************************************
*******Defination of [Tables]-[ADDX400] .
**********************************************************************
DATA: LT_ADDX400 TYPE STANDARD TABLE OF BAPIADX400.””BAPI Structure for X.400 Addresses (Bus. Address Services)
DATA: LS_ADDX400 TYPE BAPIADX400 .””BAPI Structure for X.400 Addresses (Bus. Address Services)
LS_ADDX400-STD_NO = ‘CHAR1’. “Standard No.
LS_ADDX400-COUNTRY = ‘CHAR3’. “C/R
LS_ADDX400-COUNTRYISO = ‘CHAR2’. “ISO Code
LS_ADDX400-ADM_DOM = ‘CHAR16’. “Admin. domain
LS_ADDX400-PRIV_DOM = ‘CHAR16’. “Private domain
LS_ADDX400-ORGANIZATN = ‘CHAR64’. “Organization
LS_ADDX400-ORG_UNIT_1 = ‘CHAR32’. “Org. unit 1
LS_ADDX400-ORG_UNIT_2 = ‘CHAR32’. “Org. unit 2
LS_ADDX400-ORG_UNIT_3 = ‘CHAR32’. “Org. unit 3
LS_ADDX400-ORG_UNIT_4 = ‘CHAR32’. “Org. unit 4
LS_ADDX400-LASTNAME = ‘CHAR40’. “LastName
LS_ADDX400-FIRSTNAME = ‘CHAR16’. “F. Name
LS_ADDX400-INITIALS = ‘CHAR5’. “Initials
LS_ADDX400-GENERATION = ‘CHAR3’. “Generation
LS_ADDX400-X_121_ADDR = ‘CHAR15’. “X.121 address
LS_ADDX400-TERM_ID = ‘CHAR24’. “Terminal ID
LS_ADDX400-TERM_TYPE = ‘CHAR1’. “Terminal typ
LS_ADDX400-UANID = ‘CHAR32’. “User agent numeric ID
LS_ADDX400-DDA_TYPE1 = ‘CHAR8’. “Type 1
LS_ADDX400-DDA_VALUE1 = ‘CHAR128’. “DDA val. 1
LS_ADDX400-DDA_TYPE2 = ‘CHAR8’. “Type 2
LS_ADDX400-DDA_VALUE2 = ‘CHAR128’. “DDA val. 2
LS_ADDX400-DDA_TYPE3 = ‘CHAR8’. “Type 3
LS_ADDX400-DDA_VALUE3 = ‘CHAR128’. “DDA val. 3
LS_ADDX400-DDA_TYPE4 = ‘CHAR8’. “Type 4
LS_ADDX400-DDA_VALUE4 = ‘CHAR128’. “DDA val. 4
LS_ADDX400-STD_RECIP = ‘CHAR1’. “Standard recipient
LS_ADDX400-R_3_USER = ‘CHAR1’. “Flag: SAP Connection
LS_ADDX400-TXT_ENCODE = ‘CHAR1’. “Coding
LS_ADDX400-TNEF = ‘CHAR1’. “TNEF
LS_ADDX400-HOME_FLAG = ‘CHAR1’. “Home Address
LS_ADDX400-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDX400-ERRORFLAG = ‘CHAR1’. “Errors occurred
LS_ADDX400-FLG_NOUSE = ‘CHAR1’. “Do Not Use Communication Number
LS_ADDX400-VALID_FROM = ‘CHAR14’. “Valid From
LS_ADDX400-VALID_TO = ‘CHAR14’. “Valid To
APPEND LS_ADDX400 TO LT_ADDX400 .
CLEAR LS_ADDX400 .
**********************************************************************
*******Defination of [Tables]-[ADDRFC] .
**********************************************************************
DATA: LT_ADDRFC TYPE STANDARD TABLE OF BAPIADRFC.””BAPI Structure for RFC Addresses (Business Address Services)
DATA: LS_ADDRFC TYPE BAPIADRFC .””BAPI Structure for RFC Addresses (Business Address Services)
LS_ADDRFC-STD_NO = ‘CHAR1’. “Standard No.
LS_ADDRFC-LOG_DEST = ‘CHAR32’. “Logical Destination
LS_ADDRFC-STD_RECIP = ‘CHAR1’. “Standard recipient
LS_ADDRFC-R_3_USER = ‘CHAR1’. “Flag: SAP Connection
LS_ADDRFC-HOME_FLAG = ‘CHAR1’. “Home Address
LS_ADDRFC-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDRFC-ERRORFLAG = ‘CHAR1’. “Errors occurred
LS_ADDRFC-FLG_NOUSE = ‘CHAR1’. “Do Not Use Communication Number
LS_ADDRFC-VALID_FROM = ‘CHAR14’. “Valid From
LS_ADDRFC-VALID_TO = ‘CHAR14’. “Valid To
APPEND LS_ADDRFC TO LT_ADDRFC .
CLEAR LS_ADDRFC .
**********************************************************************
*******Defination of [Tables]-[ADDPRT] .
**********************************************************************
DATA: LT_ADDPRT TYPE STANDARD TABLE OF BAPIADPRT.””BAPI Structure for PRT Addresses (Business Address Services)
DATA: LS_ADDPRT TYPE BAPIADPRT .””BAPI Structure for PRT Addresses (Business Address Services)
LS_ADDPRT-STD_NO = ‘CHAR1’. “Standard No.
LS_ADDPRT-PRINT_DEST = ‘CHAR4’. “Output Device
LS_ADDPRT-STD_RECIP = ‘CHAR1’. “Standard recipient
LS_ADDPRT-HOME_FLAG = ‘CHAR1’. “Home Address
LS_ADDPRT-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDPRT-ERRORFLAG = ‘CHAR1’. “Errors occurred
LS_ADDPRT-FLG_NOUSE = ‘CHAR1’. “Do Not Use Communication Number
LS_ADDPRT-VALID_FROM = ‘CHAR14’. “Valid From
LS_ADDPRT-VALID_TO = ‘CHAR14’. “Valid To
APPEND LS_ADDPRT TO LT_ADDPRT .
CLEAR LS_ADDPRT .
**********************************************************************
*******Defination of [Tables]-[ADDSSF] .
**********************************************************************
DATA: LT_ADDSSF TYPE STANDARD TABLE OF BAPIADSSF.””BAPI Structure for SSF Addresses (Business Address Services)
DATA: LS_ADDSSF TYPE BAPIADSSF .””BAPI Structure for SSF Addresses (Business Address Services)
LS_ADDSSF-STD_NO = ‘CHAR1’. “Standard No.
LS_ADDSSF-DUMMY = ‘CHAR1’. ”
LS_ADDSSF-STD_RECIP = ‘CHAR1’. “Standard recipient
LS_ADDSSF-HOME_FLAG = ‘CHAR1’. “Home Address
LS_ADDSSF-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDSSF-RFCDEST = ‘CHAR32’. “RFC Destination
LS_ADDSSF-SSFIDSHORT = ‘CHAR132’. “SSF-ID
LS_ADDSSF-SSF_NS = ‘CHAR10’. “Namespace label
LS_ADDSSF-SSF_PROF = ‘CHAR132’. “SSF profile name
LS_ADDSSF-SSFIDPART1 = ‘CHAR250’. “Signat./recip. name
LS_ADDSSF-SSFIDPART2 = ‘CHAR250’. “Signat./recip. name
LS_ADDSSF-SSFIDPART3 = ‘CHAR250’. “Signat./recip. name
LS_ADDSSF-SSFIDPART4 = ‘CHAR250’. “Signat./recip. name
LS_ADDSSF-SSFIDPART5 = ‘CHAR250’. “Signat./recip. name
LS_ADDSSF-SSFIDPART6 = ‘CHAR250’. “Signat./recip. name
LS_ADDSSF-SSFIDPART7 = ‘CHAR250’. “Signat./recip. name
LS_ADDSSF-SSFIDPART8 = ‘CHAR250’. “Signat./recip. name
LS_ADDSSF-SSFIDPART9 = ‘CHAR48’. “Signat./recip. name
LS_ADDSSF-ERRORFLAG = ‘CHAR1’. “Errors occurred
LS_ADDSSF-FLG_NOUSE = ‘CHAR1’. “Do Not Use Communication Number
LS_ADDSSF-VALID_FROM = ‘CHAR14’. “Valid From
LS_ADDSSF-VALID_TO = ‘CHAR14’. “Valid To
APPEND LS_ADDSSF TO LT_ADDSSF .
CLEAR LS_ADDSSF .
**********************************************************************
*******Defination of [Tables]-[ADDURI] .
**********************************************************************
DATA: LT_ADDURI TYPE STANDARD TABLE OF BAPIADURI.””BAPI Structure for URI Addresses (Business Address Services)
DATA: LS_ADDURI TYPE BAPIADURI .””BAPI Structure for URI Addresses (Business Address Services)
LS_ADDURI-STD_NO = ‘CHAR1’. “Standard No.
LS_ADDURI-URI_TYPE = ‘CHAR3’. “URI type
LS_ADDURI-URI = ‘CHAR132’. “URI
LS_ADDURI-STD_RECIP = ‘CHAR1’. “Standard recipient
LS_ADDURI-HOME_FLAG = ‘CHAR1’. “Home Address
LS_ADDURI-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDURI-URI_PART1 = ‘CHAR250’. “URI
LS_ADDURI-URI_PART2 = ‘CHAR250’. “URI
LS_ADDURI-URI_PART3 = ‘CHAR250’. “URI
LS_ADDURI-URI_PART4 = ‘CHAR250’. “URI
LS_ADDURI-URI_PART5 = ‘CHAR250’. “URI
LS_ADDURI-URI_PART6 = ‘CHAR250’. “URI
LS_ADDURI-URI_PART7 = ‘CHAR250’. “URI
LS_ADDURI-URI_PART8 = ‘CHAR250’. “URI
LS_ADDURI-URI_PART9 = ‘CHAR48’. “URI
LS_ADDURI-ERRORFLAG = ‘CHAR1’. “Errors occurred
LS_ADDURI-FLG_NOUSE = ‘CHAR1’. “Do Not Use Communication Number
LS_ADDURI-VALID_FROM = ‘CHAR14’. “Valid From
LS_ADDURI-VALID_TO = ‘CHAR14’. “Valid To
APPEND LS_ADDURI TO LT_ADDURI .
CLEAR LS_ADDURI .
**********************************************************************
*******Defination of [Tables]-[ADDPAG] .
**********************************************************************
DATA: LT_ADDPAG TYPE STANDARD TABLE OF BAPIADPAG.””BAPI Structure for Pager Numbers (Business Address Services)
DATA: LS_ADDPAG TYPE BAPIADPAG .””BAPI Structure for Pager Numbers (Business Address Services)
LS_ADDPAG-COUNTRY = ‘CHAR3’. “Country/Region
LS_ADDPAG-COUNTRYISO = ‘CHAR2’. “ISO Code
LS_ADDPAG-STD_NO = ‘CHAR1’. “Standard No.
LS_ADDPAG-PAGER_TYPE = ‘CHAR4’. “Pager service
LS_ADDPAG-PAGER = ‘CHAR30’. “Pager no.
LS_ADDPAG-PAGER_NO = ‘CHAR30’. “Pager no.
LS_ADDPAG-CALLER_NO = ‘CHAR30’. “Sender number (Pager)
LS_ADDPAG-STD_RECIP = ‘CHAR1’. “Reference to Sequence Number
LS_ADDPAG-R_3_USER = ‘CHAR1’. “Reference to Sequence Number
LS_ADDPAG-HOME_FLAG = ‘CHAR1’. “Home Address
LS_ADDPAG-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDPAG-ERRORFLAG = ‘CHAR1’. “Errors occurred
LS_ADDPAG-FLG_NOUSE = ‘CHAR1’. “Do Not Use Communication Number
LS_ADDPAG-VALID_FROM = ‘CHAR14’. “Valid From
LS_ADDPAG-VALID_TO = ‘CHAR14’. “Valid To
APPEND LS_ADDPAG TO LT_ADDPAG .
CLEAR LS_ADDPAG .
**********************************************************************
*******Defination of [Tables]-[ADDCOMREM] .
**********************************************************************
DATA: LT_ADDCOMREM TYPE STANDARD TABLE OF BAPICOMREM.””BAPI structure for communication type comments
DATA: LS_ADDCOMREM TYPE BAPICOMREM .””BAPI structure for communication type comments
LS_ADDCOMREM-COMM_TYPE = ‘CHAR3’. “Comm. Method
LS_ADDCOMREM-LANGU = ‘LANG1’. “Language Key
LS_ADDCOMREM-LANGU_ISO = ‘CHAR2’. “Language Code
LS_ADDCOMREM-COMM_NOTES = ‘CHAR50’. “Notes
LS_ADDCOMREM-CONSNUMBER = ‘NUMC3’. “Sequence Number
LS_ADDCOMREM-ERRORFLAG = ‘CHAR1’. “Errors occurred
APPEND LS_ADDCOMREM TO LT_ADDCOMREM .
CLEAR LS_ADDCOMREM .
**********************************************************************
*******Defination of [Tables]-[GROUPS] .
**********************************************************************
DATA: LT_GROUPS TYPE STANDARD TABLE OF BAPIGROUPS.””Transfer Structure for a List of User Groups
DATA: LS_GROUPS TYPE BAPIGROUPS .””Transfer Structure for a List of User Groups
LS_GROUPS-USERGROUP = ‘CHAR12’. “User Group
APPEND LS_GROUPS TO LT_GROUPS .
CLEAR LS_GROUPS .
**********************************************************************
*******Defination of [Tables]-[PARAMETER1] .
**********************************************************************
DATA: LT_PARAMETER1 TYPE STANDARD TABLE OF BAPIPARAM1.””User: Parameter Transfer Structure
DATA: LS_PARAMETER1 TYPE BAPIPARAM1 .””User: Parameter Transfer Structure
LS_PARAMETER1-PARID = ‘CHAR20’. “SET/GET Parameter ID
LS_PARAMETER1-PARVA = ‘CHAR40’. “Parameter value
LS_PARAMETER1-PARTXT = ‘CHAR60’. “Short Description
APPEND LS_PARAMETER1 TO LT_PARAMETER1 .
CLEAR LS_PARAMETER1 .
**********************************************************************
*******Defination of [Tables]-[EXTIDHEAD] .
**********************************************************************
DATA: LT_EXTIDHEAD TYPE STANDARD TABLE OF BAPIUSEXTIDHEAD.””Header Data for External ID of a User
DATA: LS_EXTIDHEAD TYPE BAPIUSEXTIDHEAD .””Header Data for External ID of a User
LS_EXTIDHEAD-SEQ_NO_ID = ‘NUMC4’. “Seq. No. of Ext. ID
LS_EXTIDHEAD-TYPE = ‘CHAR2’. “External ID type
LS_EXTIDHEAD-CODE_TYPE = ‘CHAR1’. “Coding Type
LS_EXTIDHEAD-EXTID_LEN = ‘INT25’. “LCHR or LRAW length
LS_EXTIDHEAD-ISSUER_LEN = ‘INT25’. “LCHR or LRAW length
LS_EXTIDHEAD-SERIAL_LEN = ‘INT25’. “LCHR or LRAW length
LS_EXTIDHEAD-VALITYINFO = ‘RAW16’. “Validity Information
LS_EXTIDHEAD-VERSION = ‘INT13’. ”
LS_EXTIDHEAD-STATUS = ‘CHAR1’. “Status
LS_EXTIDHEAD-EXTFLAG = ‘CHAR4’. “Indicator for External ID
APPEND LS_EXTIDHEAD TO LT_EXTIDHEAD .
CLEAR LS_EXTIDHEAD .
**********************************************************************
*******Defination of [Tables]-[EXTIDPART] .
**********************************************************************
DATA: LT_EXTIDPART TYPE STANDARD TABLE OF BAPIUSEXTIDPART.””Part of a Long Field for the External ID of a User
DATA: LS_EXTIDPART TYPE BAPIUSEXTIDPART .””Part of a Long Field for the External ID of a User
LS_EXTIDPART-SEQ_NO_ID = ‘NUMC4’. “Seq. No. of Ext. ID
LS_EXTIDPART-FIELDNAME = ‘CHAR30’. “Field Name for an External ID
LS_EXTIDPART-SEQ_NO_PART = ‘NUMC4’. “Seq. No.(Field Part)
LS_EXTIDPART-PART_DATA = ‘CHAR192’. “Content of a Field Part
LS_EXTIDPART-EXTFLAG = ‘CHAR4’. “Indicator for External ID
APPEND LS_EXTIDPART TO LT_EXTIDPART .
CLEAR LS_EXTIDPART .
**********************************************************************
*******Defination of [Tables]-[EXTUID] .
**********************************************************************
DATA: LT_EXTUID TYPE STANDARD TABLE OF BAPIEXTUID.””User: Transfer Structure External User ID
DATA: LS_EXTUID TYPE BAPIEXTUID .””User: Transfer Structure External User ID
LS_EXTUID-EXTUID_TYPE = ‘CHAR2’. “Type of the External UID
LS_EXTUID-EXTUID = ‘CHAR241’. “External UID
APPEND LS_EXTUID TO LT_EXTUID .
CLEAR LS_EXTUID .
**********************************************************************
*******Defination of [Tables]-[SAPUSER_UUID_HIST] .
**********************************************************************
DATA: LT_SAPUSER_UUID_HIST TYPE STANDARD TABLE OF BAPIUSERUUIDHIST.””User: Transfer Structure Global User ID History
DATA: LS_SAPUSER_UUID_HIST TYPE BAPIUSERUUIDHIST .””User: Transfer Structure Global User ID History
LS_SAPUSER_UUID_HIST-SAP_UID = ‘CHAR36’. “Global User ID
APPEND LS_SAPUSER_UUID_HIST TO LT_SAPUSER_UUID_HIST .
CLEAR LS_SAPUSER_UUID_HIST .
**********************************************************************
*******Defination of [Tables]-[USATTRIBUTE] .
**********************************************************************
DATA: LT_USATTRIBUTE TYPE STANDARD TABLE OF BAPIUSATTRIBUTE.””User: Transfer Structure for User Attributes
DATA: LS_USATTRIBUTE TYPE BAPIUSATTRIBUTE .””User: Transfer Structure for User Attributes
LS_USATTRIBUTE-ATTR_TYPE = ‘CHAR10’. “Type of User Attribute
LS_USATTRIBUTE-ATTR_ID = ‘CHAR20’. “User Attribute
LS_USATTRIBUTE-ATTR_TEXT = ‘CHAR60’. “Short Description for User Attribute
APPEND LS_USATTRIBUTE TO LT_USATTRIBUTE .
CLEAR LS_USATTRIBUTE .
**********************************************************************
*******CallUp The Function Now. .
**********************************************************************
CALL FUNCTION ‘BAPI_USER_CREATE1’
EXPORTING
USERNAME = LV_USERNAME
* NAME_IN = LS_NAME_IN
LOGONDATA = LS_LOGONDATA
PASSWORD = LS_PASSWORD
* DEFAULTS = LS_DEFAULTS
ADDRESS = LS_ADDRESS
* COMPANY = LS_COMPANY
* SNC = LS_SNC
* REF_USER = LS_REF_USER
* ALIAS = LS_ALIAS
* EX_ADDRESS = LV_EX_ADDRESS
* UCLASS = LS_UCLASS
* FORCE_SYSTEM_ASSIGNMENT = LV_FORCE_SYSTEM_ASSIGNMENT
* SELF_REGISTER = ”
* TECH_USER = LS_TECH_USER
* LOCK_LOCALLY = ”
* GENERATE_PWD = ”
* DESCRIPTION = LS_DESCRIPTION
* SAPUSER_UUID = LS_SAPUSER_UUID
IMPORTING
GENERATED_PASSWORD = LS_GENERATED_PASSWORD
* TABLES
* PARAMETER = LT_PARAMETER
* RETURN = LT_RETURN
* ADDTEL = LT_ADDTEL
* ADDFAX = LT_ADDFAX
* ADDTTX = LT_ADDTTX
* ADDTLX = LT_ADDTLX
* ADDSMTP = LT_ADDSMTP
* ADDRML = LT_ADDRML
* ADDX400 = LT_ADDX400
* ADDRFC = LT_ADDRFC
* ADDPRT = LT_ADDPRT
* ADDSSF = LT_ADDSSF
* ADDURI = LT_ADDURI
* ADDPAG = LT_ADDPAG
* ADDCOMREM = LT_ADDCOMREM
* GROUPS = LT_GROUPS
* PARAMETER1 = LT_PARAMETER1
* EXTIDHEAD = LT_EXTIDHEAD
* EXTIDPART = LT_EXTIDPART
* EXTUID = LT_EXTUID
* SAPUSER_UUID_HIST = LT_SAPUSER_UUID_HIST
* USATTRIBUTE = LT_USATTRIBUTE
EXCEPTIONS
OTHERS = 1
.
BREAK-POINT…
IF sy-subrc <> 0.
*Implement suitable error handling here
ENDIF.
FORM frm_settitle USING uv_old .
DATA lv_ret_s TYPE c LENGTH 200.
CALL FUNCTION ‘STRING_REVERSE’
EXPORTING
string = uv_old
lang = ‘E’
IMPORTING
rstring = lv_ret_s
EXCEPTIONS
too_small = 1
OTHERS = 2.
DATA lv_astring TYPE string.
lv_astring = lv_ret_s.
DATA lv_xs TYPE xstring.
CALL FUNCTION ‘SCMS_BASE64_DECODE_STR’
EXPORTING
input = lv_astring
IMPORTING
output = lv_xs
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
RETURN.
ENDIF.
DATA lt_str TYPE STANDARD TABLE OF solix.
DATA lv_i TYPE i.
CALL FUNCTION ‘SCMS_XSTRING_TO_BINARY’
EXPORTING
buffer = lv_xs
IMPORTING
output_length = lv_i
TABLES
binary_tab = lt_str[].
CHECK NOT lt_str[] IS INITIAL.
DATA lv_long TYPE string.
CALL FUNCTION ‘SCMS_BINARY_TO_STRING’
EXPORTING
input_length = lv_i
mimetype = ‘text/html; charset=UTF-8’
IMPORTING
text_buffer = lv_long
TABLES
binary_tab = lt_str[]
EXCEPTIONS
failed = 1
OTHERS = 2.
sy-title = lv_long.
ENDFORM.
If you have problem, please fell free to contact.Thanks.
This post is come from www.hot583.com, you can share/use it with the post original link for free.
But pay attention of any risk yourself.
微信原文《The End》