SAP BAPI_ADDREMPHK_CHANGE Function Module for Change Employee Address (Hong Kong)
BAPI_ADDREMPHK_CHANGE is a standard bapi addremphk change SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Change Employee Address (Hong Kong) 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 addremphk change FM, simply by entering the name BAPI_ADDREMPHK_CHANGE into the relevant SAP transaction such as SE37 or SE38.
Function Group: PADR_HK
Program Name: SAPLPADR_HK
Main Program:
Appliation area: P
Release date: 05-Apr-2000
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_ADDREMPHK_CHANGE 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_ADDREMPHK_CHANGE'"Change Employee Address (Hong Kong).
EXPORTING
EMPLOYEENUMBER = "Personnel number
* SCNDADDRESSLINE = "2nd address line
* CITY = "City
* DISTRICTCODE = "District code
* STATE = "Area
* COUNTRY = "Country key
* TELEPHONENUMBER = "Telephone number
* DISTRICT = "District
* POSTALCODECITY = "Postal Code
* COMMTYPE1 = "Commuication type 1
* COMMNUMBER1 = "Commuication number 1
SUBTYPE = "Subtype
* COMMTYPE2 = "Commuication type 2
* COMMNUMBER2 = "Commuication number 2
* COMMTYPE3 = "Commuication type 3
* COMMNUMBER3 = "Commuication number 3
* COMMTYPE4 = "Commuication type 4
* COMMNUMBER4 = "Commuication number 4
* COMMTYPE5 = "Commuication type 5
* COMMNUMBER5 = "Commuication number 5
* COMMTYPE6 = "Commuication type 6
* COMMNUMBER6 = "Commuication number 6
OBJECTID = "Object identification
* COMPANYOWNEDAPT = "Company Housing
* NOCOMMIT = "COMMIT control at BAPI interface
LOCKINDICATOR = "Lock indicator for HR master record
VALIDITYBEGIN = "Valid from date
VALIDITYEND = "Valid to date
RECORDNUMBER = "Number of infotype record
* CONAME = "C/O name
* STREETANDHOUSENO = "House number and street
IMPORTING
RETURN = "Structure for return code
IMPORTING Parameters details for BAPI_ADDREMPHK_CHANGE
EMPLOYEENUMBER - Personnel number
Data type: BAPIP0006HK-EMPLOYEENOOptional: No
Call by Reference: No ( called with pass by value option)
SCNDADDRESSLINE - 2nd address line
Data type: BAPIP0006-LOCATOptional: Yes
Call by Reference: No ( called with pass by value option)
CITY - City
Data type: BAPIP0006-ORT01Optional: Yes
Call by Reference: No ( called with pass by value option)
DISTRICTCODE - District code
Data type: BAPIP0006HK-DISTRICTCODEOptional: Yes
Call by Reference: No ( called with pass by value option)
STATE - Area
Data type: BAPIP0006-STATEOptional: Yes
Call by Reference: No ( called with pass by value option)
COUNTRY - Country key
Data type: BAPIP0006-LAND1Optional: Yes
Call by Reference: No ( called with pass by value option)
TELEPHONENUMBER - Telephone number
Data type: BAPIP0006-TELNROptional: Yes
Call by Reference: No ( called with pass by value option)
DISTRICT - District
Data type: BAPIP0006-ORT02Optional: Yes
Call by Reference: No ( called with pass by value option)
POSTALCODECITY - Postal Code
Data type: BAPIP0006-PSTLZOptional: Yes
Call by Reference: No ( called with pass by value option)
COMMTYPE1 - Commuication type 1
Data type: BAPIP0006HK-COMMTYPE1Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMNUMBER1 - Commuication number 1
Data type: BAPIP0006HK-COMMNUMBER1Optional: Yes
Call by Reference: No ( called with pass by value option)
SUBTYPE - Subtype
Data type: BAPIP0006HK-SUBTYPEOptional: No
Call by Reference: No ( called with pass by value option)
COMMTYPE2 - Commuication type 2
Data type: BAPIP0006HK-COMMTYPE2Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMNUMBER2 - Commuication number 2
Data type: BAPIP0006HK-COMMNUMBER2Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMTYPE3 - Commuication type 3
Data type: BAPIP0006HK-COMMTYPE3Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMNUMBER3 - Commuication number 3
Data type: BAPIP0006HK-COMMNUMBER3Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMTYPE4 - Commuication type 4
Data type: BAPIP0006HK-COMMTYPE4Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMNUMBER4 - Commuication number 4
Data type: BAPIP0006HK-COMMNUMBER4Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMTYPE5 - Commuication type 5
Data type: BAPIP0006HK-COMMTYPE5Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMNUMBER5 - Commuication number 5
Data type: BAPIP0006HK-COMMNUMBER5Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMTYPE6 - Commuication type 6
Data type: BAPIP0006HK-COMMTYPE6Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMNUMBER6 - Commuication number 6
Data type: BAPIP0006HK-COMMNUMBER6Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECTID - Object identification
Data type: BAPIP0006HK-OBJECTIDOptional: No
Call by Reference: No ( called with pass by value option)
COMPANYOWNEDAPT - Company Housing
Data type: BAPIP0006HK-COMPAPARTMENTOptional: Yes
Call by Reference: No ( called with pass by value option)
NOCOMMIT - COMMIT control at BAPI interface
Data type: BAPI_STAND-NO_COMMITOptional: Yes
Call by Reference: No ( called with pass by value option)
LOCKINDICATOR - Lock indicator for HR master record
Data type: BAPIP0006HK-LOCKINDICOptional: No
Call by Reference: No ( called with pass by value option)
VALIDITYBEGIN - Valid from date
Data type: BAPIP0006HK-VALIDBEGINOptional: No
Call by Reference: No ( called with pass by value option)
VALIDITYEND - Valid to date
Data type: BAPIP0006HK-VALIDENDOptional: No
Call by Reference: No ( called with pass by value option)
RECORDNUMBER - Number of infotype record
Data type: BAPIP0006HK-RECORDNROptional: No
Call by Reference: No ( called with pass by value option)
CONAME - C/O name
Data type: BAPIP0006-NAME2Optional: Yes
Call by Reference: No ( called with pass by value option)
STREETANDHOUSENO - House number and street
Data type: BAPIP0006-STRASOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_ADDREMPHK_CHANGE
RETURN - Structure for return code
Data type: BAPIRETURN1Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_ADDREMPHK_CHANGE 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_return | TYPE BAPIRETURN1, " | |||
| lv_employeenumber | TYPE BAPIP0006HK-EMPLOYEENO, " | |||
| lv_scndaddressline | TYPE BAPIP0006-LOCAT, " | |||
| lv_city | TYPE BAPIP0006-ORT01, " | |||
| lv_districtcode | TYPE BAPIP0006HK-DISTRICTCODE, " | |||
| lv_state | TYPE BAPIP0006-STATE, " | |||
| lv_country | TYPE BAPIP0006-LAND1, " | |||
| lv_telephonenumber | TYPE BAPIP0006-TELNR, " | |||
| lv_district | TYPE BAPIP0006-ORT02, " | |||
| lv_postalcodecity | TYPE BAPIP0006-PSTLZ, " | |||
| lv_commtype1 | TYPE BAPIP0006HK-COMMTYPE1, " | |||
| lv_commnumber1 | TYPE BAPIP0006HK-COMMNUMBER1, " | |||
| lv_subtype | TYPE BAPIP0006HK-SUBTYPE, " | |||
| lv_commtype2 | TYPE BAPIP0006HK-COMMTYPE2, " | |||
| lv_commnumber2 | TYPE BAPIP0006HK-COMMNUMBER2, " | |||
| lv_commtype3 | TYPE BAPIP0006HK-COMMTYPE3, " | |||
| lv_commnumber3 | TYPE BAPIP0006HK-COMMNUMBER3, " | |||
| lv_commtype4 | TYPE BAPIP0006HK-COMMTYPE4, " | |||
| lv_commnumber4 | TYPE BAPIP0006HK-COMMNUMBER4, " | |||
| lv_commtype5 | TYPE BAPIP0006HK-COMMTYPE5, " | |||
| lv_commnumber5 | TYPE BAPIP0006HK-COMMNUMBER5, " | |||
| lv_commtype6 | TYPE BAPIP0006HK-COMMTYPE6, " | |||
| lv_commnumber6 | TYPE BAPIP0006HK-COMMNUMBER6, " | |||
| lv_objectid | TYPE BAPIP0006HK-OBJECTID, " | |||
| lv_companyownedapt | TYPE BAPIP0006HK-COMPAPARTMENT, " | |||
| lv_nocommit | TYPE BAPI_STAND-NO_COMMIT, " | |||
| lv_lockindicator | TYPE BAPIP0006HK-LOCKINDIC, " | |||
| lv_validitybegin | TYPE BAPIP0006HK-VALIDBEGIN, " | |||
| lv_validityend | TYPE BAPIP0006HK-VALIDEND, " | |||
| lv_recordnumber | TYPE BAPIP0006HK-RECORDNR, " | |||
| lv_coname | TYPE BAPIP0006-NAME2, " | |||
| lv_streetandhouseno | TYPE BAPIP0006-STRAS. " |
|   CALL FUNCTION 'BAPI_ADDREMPHK_CHANGE' "Change Employee Address (Hong Kong) |
| EXPORTING | ||
| EMPLOYEENUMBER | = lv_employeenumber | |
| SCNDADDRESSLINE | = lv_scndaddressline | |
| CITY | = lv_city | |
| DISTRICTCODE | = lv_districtcode | |
| STATE | = lv_state | |
| COUNTRY | = lv_country | |
| TELEPHONENUMBER | = lv_telephonenumber | |
| DISTRICT | = lv_district | |
| POSTALCODECITY | = lv_postalcodecity | |
| COMMTYPE1 | = lv_commtype1 | |
| COMMNUMBER1 | = lv_commnumber1 | |
| SUBTYPE | = lv_subtype | |
| COMMTYPE2 | = lv_commtype2 | |
| COMMNUMBER2 | = lv_commnumber2 | |
| COMMTYPE3 | = lv_commtype3 | |
| COMMNUMBER3 | = lv_commnumber3 | |
| COMMTYPE4 | = lv_commtype4 | |
| COMMNUMBER4 | = lv_commnumber4 | |
| COMMTYPE5 | = lv_commtype5 | |
| COMMNUMBER5 | = lv_commnumber5 | |
| COMMTYPE6 | = lv_commtype6 | |
| COMMNUMBER6 | = lv_commnumber6 | |
| OBJECTID | = lv_objectid | |
| COMPANYOWNEDAPT | = lv_companyownedapt | |
| NOCOMMIT | = lv_nocommit | |
| LOCKINDICATOR | = lv_lockindicator | |
| VALIDITYBEGIN | = lv_validitybegin | |
| VALIDITYEND | = lv_validityend | |
| RECORDNUMBER | = lv_recordnumber | |
| CONAME | = lv_coname | |
| STREETANDHOUSENO | = lv_streetandhouseno | |
| IMPORTING | ||
| RETURN | = lv_return | |
| . " BAPI_ADDREMPHK_CHANGE | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_ADDREMPHK_CHANGE
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 EMPLOYEENO FROM BAPIP0006HK INTO @DATA(ld_employeenumber). | ||||
| "SELECT single LOCAT FROM BAPIP0006 INTO @DATA(ld_scndaddressline). | ||||
| "SELECT single ORT01 FROM BAPIP0006 INTO @DATA(ld_city). | ||||
| "SELECT single DISTRICTCODE FROM BAPIP0006HK INTO @DATA(ld_districtcode). | ||||
| "SELECT single STATE FROM BAPIP0006 INTO @DATA(ld_state). | ||||
| "SELECT single LAND1 FROM BAPIP0006 INTO @DATA(ld_country). | ||||
| "SELECT single TELNR FROM BAPIP0006 INTO @DATA(ld_telephonenumber). | ||||
| "SELECT single ORT02 FROM BAPIP0006 INTO @DATA(ld_district). | ||||
| "SELECT single PSTLZ FROM BAPIP0006 INTO @DATA(ld_postalcodecity). | ||||
| "SELECT single COMMTYPE1 FROM BAPIP0006HK INTO @DATA(ld_commtype1). | ||||
| "SELECT single COMMNUMBER1 FROM BAPIP0006HK INTO @DATA(ld_commnumber1). | ||||
| "SELECT single SUBTYPE FROM BAPIP0006HK INTO @DATA(ld_subtype). | ||||
| "SELECT single COMMTYPE2 FROM BAPIP0006HK INTO @DATA(ld_commtype2). | ||||
| "SELECT single COMMNUMBER2 FROM BAPIP0006HK INTO @DATA(ld_commnumber2). | ||||
| "SELECT single COMMTYPE3 FROM BAPIP0006HK INTO @DATA(ld_commtype3). | ||||
| "SELECT single COMMNUMBER3 FROM BAPIP0006HK INTO @DATA(ld_commnumber3). | ||||
| "SELECT single COMMTYPE4 FROM BAPIP0006HK INTO @DATA(ld_commtype4). | ||||
| "SELECT single COMMNUMBER4 FROM BAPIP0006HK INTO @DATA(ld_commnumber4). | ||||
| "SELECT single COMMTYPE5 FROM BAPIP0006HK INTO @DATA(ld_commtype5). | ||||
| "SELECT single COMMNUMBER5 FROM BAPIP0006HK INTO @DATA(ld_commnumber5). | ||||
| "SELECT single COMMTYPE6 FROM BAPIP0006HK INTO @DATA(ld_commtype6). | ||||
| "SELECT single COMMNUMBER6 FROM BAPIP0006HK INTO @DATA(ld_commnumber6). | ||||
| "SELECT single OBJECTID FROM BAPIP0006HK INTO @DATA(ld_objectid). | ||||
| "SELECT single COMPAPARTMENT FROM BAPIP0006HK INTO @DATA(ld_companyownedapt). | ||||
| "SELECT single NO_COMMIT FROM BAPI_STAND INTO @DATA(ld_nocommit). | ||||
| "SELECT single LOCKINDIC FROM BAPIP0006HK INTO @DATA(ld_lockindicator). | ||||
| "SELECT single VALIDBEGIN FROM BAPIP0006HK INTO @DATA(ld_validitybegin). | ||||
| "SELECT single VALIDEND FROM BAPIP0006HK INTO @DATA(ld_validityend). | ||||
| "SELECT single RECORDNR FROM BAPIP0006HK INTO @DATA(ld_recordnumber). | ||||
| "SELECT single NAME2 FROM BAPIP0006 INTO @DATA(ld_coname). | ||||
| "SELECT single STRAS FROM BAPIP0006 INTO @DATA(ld_streetandhouseno). | ||||
Search for further information about these or an SAP related objects