SAP ADDR_COMM_MAINTAIN Function Module for
ADDR_COMM_MAINTAIN is a standard addr comm maintain SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 addr comm maintain FM, simply by entering the name ADDR_COMM_MAINTAIN into the relevant SAP transaction such as SE37 or SE38.
Function Group: SZA0
Program Name: SAPLSZA0
Main Program: SAPLSZA0
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ADDR_COMM_MAINTAIN 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 'ADDR_COMM_MAINTAIN'".
EXPORTING
* ADDRESS_HANDLE = ' ' "Address handle (temporary key)
* IV_TIME_DEPENDENCE = ' ' "
* IV_CONSIDER_ADRCOMC_FOR_INSERT = 'X' "
* ADDRESS_NUMBER = ' ' "Address Number (Key of Database Table)
* DATE_FROM = '00010101' "
* LANGUAGE = SY-LANGU "
TABLE_TYPE = "
* SUBSTITUTE_ALL_COMM_DATA = ' ' "
* ACCEPT_TELNR_CALL = ' ' "
* CONSIDER_CONSNUMBER_FOR_INSERT = ' ' "
* CHECK_ADDRESS = 'X' "
IMPORTING
RETURNCODE = "Return code: ' '(ok), 'I'nfo, 'W'arning, 'E'rror
TABLES
COMM_TABLE = "
* ERROR_TABLE = "Table with errors, warnings, information
* COMM_TABLE_OUT = "
* IT_USAGE = "Address Usages
* IT_USAGE_UUID = "
* ET_USAGE_OUT = "
* ET_USAGE_UUID_OUT = "
* ET_CREATED_USAGE_UUID = "
EXCEPTIONS
PARAMETER_ERROR = 1 ADDRESS_NOT_EXIST = 2 INTERNAL_ERROR = 3
IMPORTING Parameters details for ADDR_COMM_MAINTAIN
ADDRESS_HANDLE - Address handle (temporary key)
Data type: SZAD_FIELD-HANDLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_TIME_DEPENDENCE -
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_CONSIDER_ADRCOMC_FOR_INSERT -
Data type: AD_CONSIDER_ADRCOMC_INSDefault: 'X'
Optional: Yes
Call by Reference: Yes
ADDRESS_NUMBER - Address Number (Key of Database Table)
Data type: ADRC-ADDRNUMBERDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATE_FROM -
Data type: ADCP-DATE_FROMDefault: '00010101'
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE -
Data type: ADRT-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLE_TYPE -
Data type: SZAD_FIELD-TABLE_TYPEOptional: No
Call by Reference: No ( called with pass by value option)
SUBSTITUTE_ALL_COMM_DATA -
Data type: SZAD_FIELD-FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ACCEPT_TELNR_CALL -
Data type: SZAD_FIELD-FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CONSIDER_CONSNUMBER_FOR_INSERT -
Data type: SZAD_FIELD-FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHECK_ADDRESS -
Data type: SZAD_FIELD-FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ADDR_COMM_MAINTAIN
RETURNCODE - Return code: ' '(ok), 'I'nfo, 'W'arning, 'E'rror
Data type: SZAD_FIELD-RETURNCODEOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for ADDR_COMM_MAINTAIN
COMM_TABLE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_TABLE - Table with errors, warnings, information
Data type: ADDR_ERROROptional: Yes
Call by Reference: No ( called with pass by value option)
COMM_TABLE_OUT -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
IT_USAGE - Address Usages
Data type: ADSUSEOptional: Yes
Call by Reference: Yes
IT_USAGE_UUID -
Data type: ADSUSE_UUIDOptional: Yes
Call by Reference: Yes
ET_USAGE_OUT -
Data type: ADSUSEOptional: Yes
Call by Reference: Yes
ET_USAGE_UUID_OUT -
Data type: ADSUSE_UUIDOptional: Yes
Call by Reference: Yes
ET_CREATED_USAGE_UUID -
Data type: ADDR_S_CREATED_UUIDOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
PARAMETER_ERROR - Incorrect parameter values
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ADDRESS_NOT_EXIST - Address does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERNAL_ERROR - Serious internal error (MESSAGE A...)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ADDR_COMM_MAINTAIN 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: | ||||
| lt_comm_table | TYPE STANDARD TABLE OF STRING, " | |||
| lv_returncode | TYPE SZAD_FIELD-RETURNCODE, " | |||
| lv_address_handle | TYPE SZAD_FIELD-HANDLE, " SPACE | |||
| lv_parameter_error | TYPE SZAD_FIELD, " | |||
| lv_iv_time_dependence | TYPE XFELD, " SPACE | |||
| lv_iv_consider_adrcomc_for_insert | TYPE AD_CONSIDER_ADRCOMC_INS, " 'X' | |||
| lt_error_table | TYPE STANDARD TABLE OF ADDR_ERROR, " | |||
| lv_address_number | TYPE ADRC-ADDRNUMBER, " SPACE | |||
| lv_address_not_exist | TYPE ADRC, " | |||
| lv_date_from | TYPE ADCP-DATE_FROM, " '00010101' | |||
| lt_comm_table_out | TYPE STANDARD TABLE OF ADCP, " | |||
| lv_internal_error | TYPE ADCP, " | |||
| lt_it_usage | TYPE STANDARD TABLE OF ADSUSE, " | |||
| lv_language | TYPE ADRT-LANGU, " SY-LANGU | |||
| lv_table_type | TYPE SZAD_FIELD-TABLE_TYPE, " | |||
| lt_it_usage_uuid | TYPE STANDARD TABLE OF ADSUSE_UUID, " | |||
| lt_et_usage_out | TYPE STANDARD TABLE OF ADSUSE, " | |||
| lv_substitute_all_comm_data | TYPE SZAD_FIELD-FLAG, " SPACE | |||
| lv_accept_telnr_call | TYPE SZAD_FIELD-FLAG, " SPACE | |||
| lt_et_usage_uuid_out | TYPE STANDARD TABLE OF ADSUSE_UUID, " | |||
| lt_et_created_usage_uuid | TYPE STANDARD TABLE OF ADDR_S_CREATED_UUID, " | |||
| lv_consider_consnumber_for_insert | TYPE SZAD_FIELD-FLAG, " SPACE | |||
| lv_check_address | TYPE SZAD_FIELD-FLAG. " 'X' |
|   CALL FUNCTION 'ADDR_COMM_MAINTAIN' " |
| EXPORTING | ||
| ADDRESS_HANDLE | = lv_address_handle | |
| IV_TIME_DEPENDENCE | = lv_iv_time_dependence | |
| IV_CONSIDER_ADRCOMC_FOR_INSERT | = lv_iv_consider_adrcomc_for_insert | |
| ADDRESS_NUMBER | = lv_address_number | |
| DATE_FROM | = lv_date_from | |
| LANGUAGE | = lv_language | |
| TABLE_TYPE | = lv_table_type | |
| SUBSTITUTE_ALL_COMM_DATA | = lv_substitute_all_comm_data | |
| ACCEPT_TELNR_CALL | = lv_accept_telnr_call | |
| CONSIDER_CONSNUMBER_FOR_INSERT | = lv_consider_consnumber_for_insert | |
| CHECK_ADDRESS | = lv_check_address | |
| IMPORTING | ||
| RETURNCODE | = lv_returncode | |
| TABLES | ||
| COMM_TABLE | = lt_comm_table | |
| ERROR_TABLE | = lt_error_table | |
| COMM_TABLE_OUT | = lt_comm_table_out | |
| IT_USAGE | = lt_it_usage | |
| IT_USAGE_UUID | = lt_it_usage_uuid | |
| ET_USAGE_OUT | = lt_et_usage_out | |
| ET_USAGE_UUID_OUT | = lt_et_usage_uuid_out | |
| ET_CREATED_USAGE_UUID | = lt_et_created_usage_uuid | |
| EXCEPTIONS | ||
| PARAMETER_ERROR = 1 | ||
| ADDRESS_NOT_EXIST = 2 | ||
| INTERNAL_ERROR = 3 | ||
| . " ADDR_COMM_MAINTAIN | ||
ABAP code using 7.40 inline data declarations to call FM ADDR_COMM_MAINTAIN
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 RETURNCODE FROM SZAD_FIELD INTO @DATA(ld_returncode). | ||||
| "SELECT single HANDLE FROM SZAD_FIELD INTO @DATA(ld_address_handle). | ||||
| DATA(ld_address_handle) | = ' '. | |||
| DATA(ld_iv_time_dependence) | = ' '. | |||
| DATA(ld_iv_consider_adrcomc_for_insert) | = 'X'. | |||
| "SELECT single ADDRNUMBER FROM ADRC INTO @DATA(ld_address_number). | ||||
| DATA(ld_address_number) | = ' '. | |||
| "SELECT single DATE_FROM FROM ADCP INTO @DATA(ld_date_from). | ||||
| DATA(ld_date_from) | = '00010101'. | |||
| "SELECT single LANGU FROM ADRT INTO @DATA(ld_language). | ||||
| DATA(ld_language) | = SY-LANGU. | |||
| "SELECT single TABLE_TYPE FROM SZAD_FIELD INTO @DATA(ld_table_type). | ||||
| "SELECT single FLAG FROM SZAD_FIELD INTO @DATA(ld_substitute_all_comm_data). | ||||
| DATA(ld_substitute_all_comm_data) | = ' '. | |||
| "SELECT single FLAG FROM SZAD_FIELD INTO @DATA(ld_accept_telnr_call). | ||||
| DATA(ld_accept_telnr_call) | = ' '. | |||
| "SELECT single FLAG FROM SZAD_FIELD INTO @DATA(ld_consider_consnumber_for_insert). | ||||
| DATA(ld_consider_consnumber_for_insert) | = ' '. | |||
| "SELECT single FLAG FROM SZAD_FIELD INTO @DATA(ld_check_address). | ||||
| DATA(ld_check_address) | = 'X'. | |||
Search for further information about these or an SAP related objects