SAP BAPI_ADDREMPTW_CREATESUCCESSOR Function Module for Create subs.employee address record (Taiwan)
BAPI_ADDREMPTW_CREATESUCCESSOR is a standard bapi addremptw createsuccessor 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 subs.employee address record (Taiwan) 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 addremptw createsuccessor FM, simply by entering the name BAPI_ADDREMPTW_CREATESUCCESSOR into the relevant SAP transaction such as SE37 or SE38.
Function Group: PADR_TW
Program Name: SAPLPADR_TW
Main Program:
Appliation area: P
Release date: 27-Apr-2000
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_ADDREMPTW_CREATESUCCESSOR 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_ADDREMPTW_CREATESUCCESSOR'"Create subs.employee address record (Taiwan).
EXPORTING
EMPLOYEENUMBER = "Personnel number
* TELEPHONENUMBER = "Telephone number
* SCNDADDRESSLINE = "2nd address line
* CITY = "City
* DISTRICT = "District
* CONAME = "C/O name
* POSTALCODECITY = "Postal code
* VILLAGE = "Village
* NEIGHBORHOOD = "Neighborhood
* TOWN = "Town
* COMMTYPE1 = "Communication type 1
VALIDITYBEGIN = "Valid from date
* COMMNUMBER1 = "Communication number 1
* COMMTYPE2 = "Communication type 2
* COMMNUMBER2 = "Communication number 2
* COMMTYPE3 = "Communication type 3
* COMMNUMBER3 = "Communication number 3
* DISTANCEINKM = "Distance in Kilometers
* BUSROUTE = "Bus Route
* NOCOMMIT = "COMMIT control at BAPI interface
VALIDITYEND = "Valid to date
ADDRESSTYPE = "Subtype
* INLOCKINDICATOR = "Lock indicator for HR master record
* STREETANDHOUSENO = "House number and street
* COUNTY = "County
* STATE = "Area
* COUNTRY = "Country key
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_ADDREMPTW_CREATESUCCESSOR
EMPLOYEENUMBER - Personnel number
Data type: BAPIP0006-PERNROptional: No
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)
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)
DISTRICT - District
Data type: BAPIP0006-ORT02Optional: Yes
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)
POSTALCODECITY - Postal code
Data type: BAPIP0006-PSTLZOptional: Yes
Call by Reference: No ( called with pass by value option)
VILLAGE - Village
Data type: BAPIP0006TW-VILLAGEOptional: Yes
Call by Reference: No ( called with pass by value option)
NEIGHBORHOOD - Neighborhood
Data type: BAPIP0006TW-NEIGHBORHOODOptional: Yes
Call by Reference: No ( called with pass by value option)
TOWN - Town
Data type: BAPIP0006TW-TOWNOptional: Yes
Call by Reference: No ( called with pass by value option)
COMMTYPE1 - Communication type 1
Data type: BAPIP0006TW-COMMTYPE1Optional: Yes
Call by Reference: No ( called with pass by value option)
VALIDITYBEGIN - Valid from date
Data type: BAPIP0006-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
COMMNUMBER1 - Communication number 1
Data type: BAPIP0006TW-COMMNUMBER1Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMTYPE2 - Communication type 2
Data type: BAPIP0006TW-COMMTYPE2Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMNUMBER2 - Communication number 2
Data type: BAPIP0006TW-COMMNUMBER2Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMTYPE3 - Communication type 3
Data type: BAPIP0006TW-COMMTYPE3Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMNUMBER3 - Communication number 3
Data type: BAPIP0006TW-COMMNUMBER3Optional: Yes
Call by Reference: No ( called with pass by value option)
DISTANCEINKM - Distance in Kilometers
Data type: BAPIP0006TW-DISTANCEOptional: Yes
Call by Reference: No ( called with pass by value option)
BUSROUTE - Bus Route
Data type: BAPIP0006TW-BUSROUTEOptional: 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)
VALIDITYEND - Valid to date
Data type: BAPIP0006-ENDDAOptional: No
Call by Reference: No ( called with pass by value option)
ADDRESSTYPE - Subtype
Data type: BAPIP0006-SUBTYOptional: No
Call by Reference: No ( called with pass by value option)
INLOCKINDICATOR - Lock indicator for HR master record
Data type: BAPIP0006TW-LOCKINDICOptional: 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)
COUNTY - County
Data type: BAPIP0006TW-COUNTYOptional: 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)
EXPORTING Parameters details for BAPI_ADDREMPTW_CREATESUCCESSOR
RETURN - Structure for return code
Data type: BAPIRETURN1Optional: No
Call by Reference: No ( called with pass by value option)
EMPLOYEENUMBER - Personnel number
Data type: BAPIP0006-PERNROptional: No
Call by Reference: No ( called with pass by value option)
SUBTYPE - Subtype
Data type: BAPIP0006TW-SUBTYPEOptional: No
Call by Reference: No ( called with pass by value option)
OBJECTID - Object identification
Data type: BAPIP0006TW-OBJECTIDOptional: No
Call by Reference: No ( called with pass by value option)
LOCKINDICATOR - Lock indicator for HR master record
Data type: BAPIP0006TW-LOCKINDICOptional: No
Call by Reference: No ( called with pass by value option)
VALIDITYBEGIN - Valid from date
Data type: BAPIP0006-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
VALIDITYEND - Valid to date
Data type: BAPIP0006-ENDDAOptional: No
Call by Reference: No ( called with pass by value option)
RECORDNUMBER - Number of infotype record
Data type: BAPIP0006TW-RECORDNROptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_ADDREMPTW_CREATESUCCESSOR 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_telephonenumber | TYPE BAPIP0006-TELNR, " | |||
| lv_scndaddressline | TYPE BAPIP0006-LOCAT, " | |||
| lv_city | TYPE BAPIP0006-ORT01, " | |||
| lv_district | TYPE BAPIP0006-ORT02, " | |||
| lv_coname | TYPE BAPIP0006-NAME2, " | |||
| lv_postalcodecity | TYPE BAPIP0006-PSTLZ, " | |||
| lv_village | TYPE BAPIP0006TW-VILLAGE, " | |||
| lv_neighborhood | TYPE BAPIP0006TW-NEIGHBORHOOD, " | |||
| lv_town | TYPE BAPIP0006TW-TOWN, " | |||
| lv_commtype1 | TYPE BAPIP0006TW-COMMTYPE1, " | |||
| lv_validitybegin | TYPE BAPIP0006-BEGDA, " | |||
| lv_employeenumber | TYPE BAPIP0006-PERNR, " | |||
| lv_commnumber1 | TYPE BAPIP0006TW-COMMNUMBER1, " | |||
| lv_commtype2 | TYPE BAPIP0006TW-COMMTYPE2, " | |||
| lv_commnumber2 | TYPE BAPIP0006TW-COMMNUMBER2, " | |||
| lv_commtype3 | TYPE BAPIP0006TW-COMMTYPE3, " | |||
| lv_commnumber3 | TYPE BAPIP0006TW-COMMNUMBER3, " | |||
| lv_distanceinkm | TYPE BAPIP0006TW-DISTANCE, " | |||
| lv_busroute | TYPE BAPIP0006TW-BUSROUTE, " | |||
| lv_nocommit | TYPE BAPI_STAND-NO_COMMIT, " | |||
| lv_subtype | TYPE BAPIP0006TW-SUBTYPE, " | |||
| lv_validityend | TYPE BAPIP0006-ENDDA, " | |||
| lv_objectid | TYPE BAPIP0006TW-OBJECTID, " | |||
| lv_addresstype | TYPE BAPIP0006-SUBTY, " | |||
| lv_lockindicator | TYPE BAPIP0006TW-LOCKINDIC, " | |||
| lv_inlockindicator | TYPE BAPIP0006TW-LOCKINDIC, " | |||
| lv_validitybegin | TYPE BAPIP0006-BEGDA, " | |||
| lv_streetandhouseno | TYPE BAPIP0006-STRAS, " | |||
| lv_county | TYPE BAPIP0006TW-COUNTY, " | |||
| lv_validityend | TYPE BAPIP0006-ENDDA, " | |||
| lv_state | TYPE BAPIP0006-STATE, " | |||
| lv_recordnumber | TYPE BAPIP0006TW-RECORDNR, " | |||
| lv_country | TYPE BAPIP0006-LAND1. " |
|   CALL FUNCTION 'BAPI_ADDREMPTW_CREATESUCCESSOR' "Create subs.employee address record (Taiwan) |
| EXPORTING | ||
| EMPLOYEENUMBER | = lv_employeenumber | |
| TELEPHONENUMBER | = lv_telephonenumber | |
| SCNDADDRESSLINE | = lv_scndaddressline | |
| CITY | = lv_city | |
| DISTRICT | = lv_district | |
| CONAME | = lv_coname | |
| POSTALCODECITY | = lv_postalcodecity | |
| VILLAGE | = lv_village | |
| NEIGHBORHOOD | = lv_neighborhood | |
| TOWN | = lv_town | |
| COMMTYPE1 | = lv_commtype1 | |
| VALIDITYBEGIN | = lv_validitybegin | |
| COMMNUMBER1 | = lv_commnumber1 | |
| COMMTYPE2 | = lv_commtype2 | |
| COMMNUMBER2 | = lv_commnumber2 | |
| COMMTYPE3 | = lv_commtype3 | |
| COMMNUMBER3 | = lv_commnumber3 | |
| DISTANCEINKM | = lv_distanceinkm | |
| BUSROUTE | = lv_busroute | |
| NOCOMMIT | = lv_nocommit | |
| VALIDITYEND | = lv_validityend | |
| ADDRESSTYPE | = lv_addresstype | |
| INLOCKINDICATOR | = lv_inlockindicator | |
| STREETANDHOUSENO | = lv_streetandhouseno | |
| COUNTY | = lv_county | |
| STATE | = lv_state | |
| COUNTRY | = lv_country | |
| 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_ADDREMPTW_CREATESUCCESSOR | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_ADDREMPTW_CREATESUCCESSOR
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 TELNR FROM BAPIP0006 INTO @DATA(ld_telephonenumber). | ||||
| "SELECT single LOCAT FROM BAPIP0006 INTO @DATA(ld_scndaddressline). | ||||
| "SELECT single ORT01 FROM BAPIP0006 INTO @DATA(ld_city). | ||||
| "SELECT single ORT02 FROM BAPIP0006 INTO @DATA(ld_district). | ||||
| "SELECT single NAME2 FROM BAPIP0006 INTO @DATA(ld_coname). | ||||
| "SELECT single PSTLZ FROM BAPIP0006 INTO @DATA(ld_postalcodecity). | ||||
| "SELECT single VILLAGE FROM BAPIP0006TW INTO @DATA(ld_village). | ||||
| "SELECT single NEIGHBORHOOD FROM BAPIP0006TW INTO @DATA(ld_neighborhood). | ||||
| "SELECT single TOWN FROM BAPIP0006TW INTO @DATA(ld_town). | ||||
| "SELECT single COMMTYPE1 FROM BAPIP0006TW INTO @DATA(ld_commtype1). | ||||
| "SELECT single BEGDA FROM BAPIP0006 INTO @DATA(ld_validitybegin). | ||||
| "SELECT single PERNR FROM BAPIP0006 INTO @DATA(ld_employeenumber). | ||||
| "SELECT single COMMNUMBER1 FROM BAPIP0006TW INTO @DATA(ld_commnumber1). | ||||
| "SELECT single COMMTYPE2 FROM BAPIP0006TW INTO @DATA(ld_commtype2). | ||||
| "SELECT single COMMNUMBER2 FROM BAPIP0006TW INTO @DATA(ld_commnumber2). | ||||
| "SELECT single COMMTYPE3 FROM BAPIP0006TW INTO @DATA(ld_commtype3). | ||||
| "SELECT single COMMNUMBER3 FROM BAPIP0006TW INTO @DATA(ld_commnumber3). | ||||
| "SELECT single DISTANCE FROM BAPIP0006TW INTO @DATA(ld_distanceinkm). | ||||
| "SELECT single BUSROUTE FROM BAPIP0006TW INTO @DATA(ld_busroute). | ||||
| "SELECT single NO_COMMIT FROM BAPI_STAND INTO @DATA(ld_nocommit). | ||||
| "SELECT single SUBTYPE FROM BAPIP0006TW INTO @DATA(ld_subtype). | ||||
| "SELECT single ENDDA FROM BAPIP0006 INTO @DATA(ld_validityend). | ||||
| "SELECT single OBJECTID FROM BAPIP0006TW INTO @DATA(ld_objectid). | ||||
| "SELECT single SUBTY FROM BAPIP0006 INTO @DATA(ld_addresstype). | ||||
| "SELECT single LOCKINDIC FROM BAPIP0006TW INTO @DATA(ld_lockindicator). | ||||
| "SELECT single LOCKINDIC FROM BAPIP0006TW INTO @DATA(ld_inlockindicator). | ||||
| "SELECT single BEGDA FROM BAPIP0006 INTO @DATA(ld_validitybegin). | ||||
| "SELECT single STRAS FROM BAPIP0006 INTO @DATA(ld_streetandhouseno). | ||||
| "SELECT single COUNTY FROM BAPIP0006TW INTO @DATA(ld_county). | ||||
| "SELECT single ENDDA FROM BAPIP0006 INTO @DATA(ld_validityend). | ||||
| "SELECT single STATE FROM BAPIP0006 INTO @DATA(ld_state). | ||||
| "SELECT single RECORDNR FROM BAPIP0006TW INTO @DATA(ld_recordnumber). | ||||
| "SELECT single LAND1 FROM BAPIP0006 INTO @DATA(ld_country). | ||||
Search for further information about these or an SAP related objects