SAP Function Modules

BAPI_ADDREMPSG_REQUEST SAP Function module - Create locked employee address record - Singapore







BAPI_ADDREMPSG_REQUEST 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_ADDREMPSG_REQUEST into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: PADR_SG
Released Date: 11.02.2000
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_ADDREMPSG_REQUEST - BAPI ADDREMPSG REQUEST





CALL FUNCTION 'BAPI_ADDREMPSG_REQUEST' "Create locked employee address record - Singapore
  EXPORTING
    inemployeenumber =          " bapip0006sg-employeeno  Personnel Number
    invaliditybegin =           " bapip0006sg-validbegin  Start date
    invalidityend =             " bapip0006sg-validend  End Date
    addresstype =               " bapip0006-subty  Subtype
*   coname =                    " bapip0006-name2  C/O name
*   streetandhouseno =          " bapip0006-stras  House number and street
*   scndaddressline =           " bapip0006-locat  2nd address line
*   city =                      " bapip0006-ort01  City
*   district =                  " bapip0006-ort02  District
*   postalcodecity =            " bapip0006-pstlz  Postal code
*   state = SPACE               " bapip0006-state  State
*   country =                   " bapip0006-land1  Country key
*   telephonenumber =           " bapip0006-telnr  Telephone number
*   commtype1 =                 " bapip0006sg-commtype1  Communication type 1
*   commnumber1 =               " bapip0006sg-commnumber1  Communication number 1
*   commtype2 =                 " bapip0006sg-commtype2  Communication type 2
*   commnumber2 =               " bapip0006sg-commnumber2  Communication number 1
*   commtype3 =                 " bapip0006sg-commtype3  Communication type 3
*   commnumber3 =               " bapip0006sg-commnumber3  Communication number 3
*   commtype4 =                 " bapip0006sg-commtype4  Communication type 4
*   commnumber4 =               " bapip0006sg-commnumber4  Communication number 4
*   street2 =                   " bapip0006sg-street2  Street 2
*   street3 =                   " bapip0006sg-street3  Street 3
*   nocommit =                  " bapi_stand-no_commit  COMMIT control at BAPI interface
*   blocknumber =               " bapip0006-bldng  Block Number
*   storey =                    " bapip0006-floor  Storey/Floor in building
*   unitnumber =                " bapip0006-hsnmr  Unit Number
*   streetcode =                " bapip0006-posta  Street Code
  IMPORTING
    return =                    " bapireturn1   Structure for return code
    employeenumber =            " bapip0006sg-employeeno  Personnel Number
    subtype =                   " bapip0006sg-subtype  Subtype
    objectid =                  " bapip0006sg-objectid  Object identification
    lockindicator =             " bapip0006sg-lockindic  Lock indicator for HR master record
    validitybegin =             " bapip0006sg-validbegin  Start date
    validityend =               " bapip0006sg-validend  End Date
    recordnumber =              " bapip0006sg-recordnr  Number of infotype record
    .  "  BAPI_ADDREMPSG_REQUEST

ABAP code example for Function Module BAPI_ADDREMPSG_REQUEST





The ABAP code below is a full code listing to execute function module BAPI_ADDREMPSG_REQUEST 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).

DATA:
ld_return  TYPE BAPIRETURN1 ,
ld_employeenumber  TYPE BAPIP0006SG-EMPLOYEENO ,
ld_subtype  TYPE BAPIP0006SG-SUBTYPE ,
ld_objectid  TYPE BAPIP0006SG-OBJECTID ,
ld_lockindicator  TYPE BAPIP0006SG-LOCKINDIC ,
ld_validitybegin  TYPE BAPIP0006SG-VALIDBEGIN ,
ld_validityend  TYPE BAPIP0006SG-VALIDEND ,
ld_recordnumber  TYPE BAPIP0006SG-RECORDNR .


DATA(ld_inemployeenumber) = Check type of data required

DATA(ld_invaliditybegin) = 20210129

DATA(ld_invalidityend) = 20210129

DATA(ld_addresstype) = some text here

DATA(ld_coname) = some text here

DATA(ld_streetandhouseno) = some text here

DATA(ld_scndaddressline) = some text here

DATA(ld_city) = some text here

DATA(ld_district) = some text here

DATA(ld_postalcodecity) = some text here

DATA(ld_state) = some text here

DATA(ld_country) = some text here

DATA(ld_telephonenumber) = some text here

DATA(ld_commtype1) = some text here

DATA(ld_commnumber1) = some text here

DATA(ld_commtype2) = some text here

DATA(ld_commnumber2) = some text here

DATA(ld_commtype3) = some text here

DATA(ld_commnumber3) = some text here

DATA(ld_commtype4) = some text here

DATA(ld_commnumber4) = some text here

DATA(ld_street2) = some text here

DATA(ld_street3) = some text here

DATA(ld_nocommit) = some text here

DATA(ld_blocknumber) = some text here

DATA(ld_storey) = some text here

DATA(ld_unitnumber) = some text here

DATA(ld_streetcode) = some text here . CALL FUNCTION 'BAPI_ADDREMPSG_REQUEST' EXPORTING inemployeenumber = ld_inemployeenumber invaliditybegin = ld_invaliditybegin invalidityend = ld_invalidityend addresstype = ld_addresstype * coname = ld_coname * streetandhouseno = ld_streetandhouseno * scndaddressline = ld_scndaddressline * city = ld_city * district = ld_district * postalcodecity = ld_postalcodecity * state = ld_state * country = ld_country * telephonenumber = ld_telephonenumber * commtype1 = ld_commtype1 * commnumber1 = ld_commnumber1 * commtype2 = ld_commtype2 * commnumber2 = ld_commnumber2 * commtype3 = ld_commtype3 * commnumber3 = ld_commnumber3 * commtype4 = ld_commtype4 * commnumber4 = ld_commnumber4 * street2 = ld_street2 * street3 = ld_street3 * nocommit = ld_nocommit * blocknumber = ld_blocknumber * storey = ld_storey * unitnumber = ld_unitnumber * streetcode = ld_streetcode IMPORTING return = ld_return employeenumber = ld_employeenumber subtype = ld_subtype objectid = ld_objectid lockindicator = ld_lockindicator validitybegin = ld_validitybegin validityend = ld_validityend recordnumber = ld_recordnumber . " BAPI_ADDREMPSG_REQUEST
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

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_return  TYPE BAPIRETURN1 ,
ld_inemployeenumber  TYPE BAPIP0006SG-EMPLOYEENO ,
ld_employeenumber  TYPE BAPIP0006SG-EMPLOYEENO ,
ld_invaliditybegin  TYPE BAPIP0006SG-VALIDBEGIN ,
ld_subtype  TYPE BAPIP0006SG-SUBTYPE ,
ld_invalidityend  TYPE BAPIP0006SG-VALIDEND ,
ld_objectid  TYPE BAPIP0006SG-OBJECTID ,
ld_addresstype  TYPE BAPIP0006-SUBTY ,
ld_lockindicator  TYPE BAPIP0006SG-LOCKINDIC ,
ld_coname  TYPE BAPIP0006-NAME2 ,
ld_validitybegin  TYPE BAPIP0006SG-VALIDBEGIN ,
ld_streetandhouseno  TYPE BAPIP0006-STRAS ,
ld_validityend  TYPE BAPIP0006SG-VALIDEND ,
ld_scndaddressline  TYPE BAPIP0006-LOCAT ,
ld_recordnumber  TYPE BAPIP0006SG-RECORDNR ,
ld_city  TYPE BAPIP0006-ORT01 ,
ld_district  TYPE BAPIP0006-ORT02 ,
ld_postalcodecity  TYPE BAPIP0006-PSTLZ ,
ld_state  TYPE BAPIP0006-STATE ,
ld_country  TYPE BAPIP0006-LAND1 ,
ld_telephonenumber  TYPE BAPIP0006-TELNR ,
ld_commtype1  TYPE BAPIP0006SG-COMMTYPE1 ,
ld_commnumber1  TYPE BAPIP0006SG-COMMNUMBER1 ,
ld_commtype2  TYPE BAPIP0006SG-COMMTYPE2 ,
ld_commnumber2  TYPE BAPIP0006SG-COMMNUMBER2 ,
ld_commtype3  TYPE BAPIP0006SG-COMMTYPE3 ,
ld_commnumber3  TYPE BAPIP0006SG-COMMNUMBER3 ,
ld_commtype4  TYPE BAPIP0006SG-COMMTYPE4 ,
ld_commnumber4  TYPE BAPIP0006SG-COMMNUMBER4 ,
ld_street2  TYPE BAPIP0006SG-STREET2 ,
ld_street3  TYPE BAPIP0006SG-STREET3 ,
ld_nocommit  TYPE BAPI_STAND-NO_COMMIT ,
ld_blocknumber  TYPE BAPIP0006-BLDNG ,
ld_storey  TYPE BAPIP0006-FLOOR ,
ld_unitnumber  TYPE BAPIP0006-HSNMR ,
ld_streetcode  TYPE BAPIP0006-POSTA .


ld_inemployeenumber = Check type of data required

ld_invaliditybegin = 20210129

ld_invalidityend = 20210129

ld_addresstype = some text here

ld_coname = some text here

ld_streetandhouseno = some text here

ld_scndaddressline = some text here

ld_city = some text here

ld_district = some text here

ld_postalcodecity = some text here

ld_state = some text here

ld_country = some text here

ld_telephonenumber = some text here

ld_commtype1 = some text here

ld_commnumber1 = some text here

ld_commtype2 = some text here

ld_commnumber2 = some text here

ld_commtype3 = some text here

ld_commnumber3 = some text here

ld_commtype4 = some text here

ld_commnumber4 = some text here

ld_street2 = some text here

ld_street3 = some text here

ld_nocommit = some text here

ld_blocknumber = some text here

ld_storey = some text here

ld_unitnumber = some text here

ld_streetcode = some text here

SAP Documentation for FM BAPI_ADDREMPSG_REQUEST


You can use this method to create a locked Addresses record (0006). ...See here for full SAP fm documentation

Contribute (Add Comments)

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_ADDREMPSG_REQUEST or its description.