SAP BAPI_ADDREMPHK_REQUEST Function Module for Create locked employee address record (Hong Kong)









BAPI_ADDREMPHK_REQUEST is a standard bapi addremphk request SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create locked employee address record (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 request FM, simply by entering the name BAPI_ADDREMPHK_REQUEST 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: 27-Apr-2000
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_ADDREMPHK_REQUEST 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_REQUEST'"Create locked employee address record (Hong Kong)
EXPORTING
EMPLOYEENUMBER = "Personnel number
* STATE = "Region (State, Province, County)
* COUNTRY = "Country key
* TELEPHONENUMBER = "Telephone number
* DISTRICT = "District
* POSTALCODECITY = "Postal Code
* COMMTYPE1 = "Communication type 1
* COMMNUMBER1 = "Communication number 1
* COMMTYPE2 = "Communication type 2
* COMMNUMBER2 = "Communication number 1
* COMMTYPE3 = "Communication type 3
VALIDITYBEGIN = "Valid from date
* COMMNUMBER3 = "Communication number 3
* COMMTYPE4 = "Communication type 4
* COMMNUMBER4 = "Communication number 4
* COMMTYPE5 = "Communication type 5
* COMMNUMBER5 = "Communication number 5
* COMMTYPE6 = "Communication type 6
* COMMNUMBER6 = "Communication number 6
* COMPANYOWNEDAPT = "Company Housing
* NOCOMMIT = "COMMIT control at BAPI interface
VALIDITYEND = "Valid to date
ADDRESSTYPE = "Subtype
* CONAME = "C/O name
* STREETANDHOUSENO = "House number and street
* SCNDADDRESSLINE = "2nd address line
* CITY = "City
* DISTRICTCODE = "District code

IMPORTING
RETURN = "Structure for return code
EMPLOYEENUMBER = "Personnel number
SUBTYPE = "Subtype
OBJECTID = "Object identification
LOCKINDICATOR = "Lock indicator for HR master record
VALIDITYBEGIN = "Valid from date
VALIDITYEND = "Valid to date
RECORDNUMBER = "Number of infotype record
.



IMPORTING Parameters details for BAPI_ADDREMPHK_REQUEST

EMPLOYEENUMBER - Personnel number

Data type: BAPIP0006-PERNR
Optional: No
Call by Reference: No ( called with pass by value option)

STATE - Region (State, Province, County)

Data type: BAPIP0006-STATE
Optional: Yes
Call by Reference: No ( called with pass by value option)

COUNTRY - Country key

Data type: BAPIP0006-LAND1
Optional: Yes
Call by Reference: No ( called with pass by value option)

TELEPHONENUMBER - Telephone number

Data type: BAPIP0006-TELNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

DISTRICT - District

Data type: BAPIP0006-ORT02
Optional: Yes
Call by Reference: No ( called with pass by value option)

POSTALCODECITY - Postal Code

Data type: BAPIP0006-PSTLZ
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMTYPE1 - Communication type 1

Data type: BAPIP0006HK-COMMTYPE1
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMNUMBER1 - Communication number 1

Data type: BAPIP0006HK-COMMNUMBER1
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMTYPE2 - Communication type 2

Data type: BAPIP0006HK-COMMTYPE2
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMNUMBER2 - Communication number 1

Data type: BAPIP0006HK-COMMNUMBER2
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMTYPE3 - Communication type 3

Data type: BAPIP0006HK-COMMTYPE3
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALIDITYBEGIN - Valid from date

Data type: BAPIP0006-BEGDA
Optional: No
Call by Reference: No ( called with pass by value option)

COMMNUMBER3 - Communication number 3

Data type: BAPIP0006HK-COMMNUMBER3
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMTYPE4 - Communication type 4

Data type: BAPIP0006HK-COMMTYPE4
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMNUMBER4 - Communication number 4

Data type: BAPIP0006HK-COMMNUMBER4
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMTYPE5 - Communication type 5

Data type: BAPIP0006HK-COMMTYPE5
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMNUMBER5 - Communication number 5

Data type: BAPIP0006HK-COMMNUMBER5
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMTYPE6 - Communication type 6

Data type: BAPIP0006HK-COMMTYPE6
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMMNUMBER6 - Communication number 6

Data type: BAPIP0006HK-COMMNUMBER6
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMPANYOWNEDAPT - Company Housing

Data type: BAPIP0006HK-COMPAPARTMENT
Optional: Yes
Call by Reference: No ( called with pass by value option)

NOCOMMIT - COMMIT control at BAPI interface

Data type: BAPI_STAND-NO_COMMIT
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALIDITYEND - Valid to date

Data type: BAPIP0006-ENDDA
Optional: No
Call by Reference: No ( called with pass by value option)

ADDRESSTYPE - Subtype

Data type: BAPIP0006-SUBTY
Optional: No
Call by Reference: No ( called with pass by value option)

CONAME - C/O name

Data type: BAPIP0006-NAME2
Optional: Yes
Call by Reference: No ( called with pass by value option)

STREETANDHOUSENO - House number and street

Data type: BAPIP0006-STRAS
Optional: Yes
Call by Reference: No ( called with pass by value option)

SCNDADDRESSLINE - 2nd address line

Data type: BAPIP0006-LOCAT
Optional: Yes
Call by Reference: No ( called with pass by value option)

CITY - City

Data type: BAPIP0006-ORT01
Optional: Yes
Call by Reference: No ( called with pass by value option)

DISTRICTCODE - District code

Data type: BAPIP0006HK-DISTRICTCODE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BAPI_ADDREMPHK_REQUEST

RETURN - Structure for return code

Data type: BAPIRETURN1
Optional: No
Call by Reference: No ( called with pass by value option)

EMPLOYEENUMBER - Personnel number

Data type: BAPIP0006-PERNR
Optional: No
Call by Reference: No ( called with pass by value option)

SUBTYPE - Subtype

Data type: BAPIP0006HK-SUBTYPE
Optional: No
Call by Reference: No ( called with pass by value option)

OBJECTID - Object identification

Data type: BAPIP0006HK-OBJECTID
Optional: No
Call by Reference: No ( called with pass by value option)

LOCKINDICATOR - Lock indicator for HR master record

Data type: BAPIP0006HK-LOCKINDIC
Optional: No
Call by Reference: No ( called with pass by value option)

VALIDITYBEGIN - Valid from date

Data type: BAPIP0006-BEGDA
Optional: No
Call by Reference: No ( called with pass by value option)

VALIDITYEND - Valid to date

Data type: BAPIP0006-ENDDA
Optional: No
Call by Reference: No ( called with pass by value option)

RECORDNUMBER - Number of infotype record

Data type: BAPIP0006HK-RECORDNR
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for BAPI_ADDREMPHK_REQUEST 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 BAPIP0006-PERNR, "   
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_commtype2  TYPE BAPIP0006HK-COMMTYPE2, "   
lv_commnumber2  TYPE BAPIP0006HK-COMMNUMBER2, "   
lv_commtype3  TYPE BAPIP0006HK-COMMTYPE3, "   
lv_validitybegin  TYPE BAPIP0006-BEGDA, "   
lv_employeenumber  TYPE BAPIP0006-PERNR, "   
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_companyownedapt  TYPE BAPIP0006HK-COMPAPARTMENT, "   
lv_nocommit  TYPE BAPI_STAND-NO_COMMIT, "   
lv_subtype  TYPE BAPIP0006HK-SUBTYPE, "   
lv_validityend  TYPE BAPIP0006-ENDDA, "   
lv_objectid  TYPE BAPIP0006HK-OBJECTID, "   
lv_addresstype  TYPE BAPIP0006-SUBTY, "   
lv_coname  TYPE BAPIP0006-NAME2, "   
lv_lockindicator  TYPE BAPIP0006HK-LOCKINDIC, "   
lv_validitybegin  TYPE BAPIP0006-BEGDA, "   
lv_streetandhouseno  TYPE BAPIP0006-STRAS, "   
lv_validityend  TYPE BAPIP0006-ENDDA, "   
lv_scndaddressline  TYPE BAPIP0006-LOCAT, "   
lv_city  TYPE BAPIP0006-ORT01, "   
lv_recordnumber  TYPE BAPIP0006HK-RECORDNR, "   
lv_districtcode  TYPE BAPIP0006HK-DISTRICTCODE. "   

  CALL FUNCTION 'BAPI_ADDREMPHK_REQUEST'  "Create locked employee address record (Hong Kong)
    EXPORTING
         EMPLOYEENUMBER = lv_employeenumber
         STATE = lv_state
         COUNTRY = lv_country
         TELEPHONENUMBER = lv_telephonenumber
         DISTRICT = lv_district
         POSTALCODECITY = lv_postalcodecity
         COMMTYPE1 = lv_commtype1
         COMMNUMBER1 = lv_commnumber1
         COMMTYPE2 = lv_commtype2
         COMMNUMBER2 = lv_commnumber2
         COMMTYPE3 = lv_commtype3
         VALIDITYBEGIN = lv_validitybegin
         COMMNUMBER3 = lv_commnumber3
         COMMTYPE4 = lv_commtype4
         COMMNUMBER4 = lv_commnumber4
         COMMTYPE5 = lv_commtype5
         COMMNUMBER5 = lv_commnumber5
         COMMTYPE6 = lv_commtype6
         COMMNUMBER6 = lv_commnumber6
         COMPANYOWNEDAPT = lv_companyownedapt
         NOCOMMIT = lv_nocommit
         VALIDITYEND = lv_validityend
         ADDRESSTYPE = lv_addresstype
         CONAME = lv_coname
         STREETANDHOUSENO = lv_streetandhouseno
         SCNDADDRESSLINE = lv_scndaddressline
         CITY = lv_city
         DISTRICTCODE = lv_districtcode
    IMPORTING
         RETURN = lv_return
         EMPLOYEENUMBER = lv_employeenumber
         SUBTYPE = lv_subtype
         OBJECTID = lv_objectid
         LOCKINDICATOR = lv_lockindicator
         VALIDITYBEGIN = lv_validitybegin
         VALIDITYEND = lv_validityend
         RECORDNUMBER = lv_recordnumber
. " BAPI_ADDREMPHK_REQUEST




ABAP code using 7.40 inline data declarations to call FM BAPI_ADDREMPHK_REQUEST

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 PERNR FROM BAPIP0006 INTO @DATA(ld_employeenumber).
 
"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 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 BEGDA FROM BAPIP0006 INTO @DATA(ld_validitybegin).
 
"SELECT single PERNR FROM BAPIP0006 INTO @DATA(ld_employeenumber).
 
"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 COMPAPARTMENT FROM BAPIP0006HK INTO @DATA(ld_companyownedapt).
 
"SELECT single NO_COMMIT FROM BAPI_STAND INTO @DATA(ld_nocommit).
 
"SELECT single SUBTYPE FROM BAPIP0006HK INTO @DATA(ld_subtype).
 
"SELECT single ENDDA FROM BAPIP0006 INTO @DATA(ld_validityend).
 
"SELECT single OBJECTID FROM BAPIP0006HK INTO @DATA(ld_objectid).
 
"SELECT single SUBTY FROM BAPIP0006 INTO @DATA(ld_addresstype).
 
"SELECT single NAME2 FROM BAPIP0006 INTO @DATA(ld_coname).
 
"SELECT single LOCKINDIC FROM BAPIP0006HK INTO @DATA(ld_lockindicator).
 
"SELECT single BEGDA FROM BAPIP0006 INTO @DATA(ld_validitybegin).
 
"SELECT single STRAS FROM BAPIP0006 INTO @DATA(ld_streetandhouseno).
 
"SELECT single ENDDA FROM BAPIP0006 INTO @DATA(ld_validityend).
 
"SELECT single LOCAT FROM BAPIP0006 INTO @DATA(ld_scndaddressline).
 
"SELECT single ORT01 FROM BAPIP0006 INTO @DATA(ld_city).
 
"SELECT single RECORDNR FROM BAPIP0006HK INTO @DATA(ld_recordnumber).
 
"SELECT single DISTRICTCODE FROM BAPIP0006HK INTO @DATA(ld_districtcode).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!