SAP ADDRESS_DELETE Function Module for
ADDRESS_DELETE is a standard address delete 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 address delete FM, simply by entering the name ADDRESS_DELETE into the relevant SAP transaction such as SE37 or SE38.
Function Group: SAD2
Program Name: SAPLSAD2
Main Program: SAPLSAD2
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function ADDRESS_DELETE 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 'ADDRESS_DELETE'".
EXPORTING
ENTRY_ADRNR = "Address number
* ENTRY_KIND_OF_ADDR = ' ' "Type of address, C=Company, P=Pers
* ENTRY_NATIO = ' ' "National indicator
* FLG_DEL_ALL = ' ' "Flag: delete all existing versions ?
IMPORTING
RTCODE = "Return code
EXCEPTIONS
ADDR_NOT_EXIST = 1 VERS_NOT_EXIST = 2 WRONG_DATA = 3
IMPORTING Parameters details for ADDRESS_DELETE
ENTRY_ADRNR - Address number
Data type: SADR-ADRNROptional: No
Call by Reference: No ( called with pass by value option)
ENTRY_KIND_OF_ADDR - Type of address, C=Company, P=Pers
Data type: SY-INPUTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENTRY_NATIO - National indicator
Data type: SADR-NATIODefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_DEL_ALL - Flag: delete all existing versions ?
Data type: SADR-FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ADDRESS_DELETE
RTCODE - Return code
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ADDR_NOT_EXIST - Address does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
VERS_NOT_EXIST - Version does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_DATA - Unauthorized data was transferred
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ADDRESS_DELETE 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_rtcode | TYPE SY-SUBRC, " | |||
| lv_entry_adrnr | TYPE SADR-ADRNR, " | |||
| lv_addr_not_exist | TYPE SADR, " | |||
| lv_vers_not_exist | TYPE SADR, " | |||
| lv_entry_kind_of_addr | TYPE SY-INPUT, " SPACE | |||
| lv_wrong_data | TYPE SY, " | |||
| lv_entry_natio | TYPE SADR-NATIO, " SPACE | |||
| lv_flg_del_all | TYPE SADR-FLAG. " SPACE |
|   CALL FUNCTION 'ADDRESS_DELETE' " |
| EXPORTING | ||
| ENTRY_ADRNR | = lv_entry_adrnr | |
| ENTRY_KIND_OF_ADDR | = lv_entry_kind_of_addr | |
| ENTRY_NATIO | = lv_entry_natio | |
| FLG_DEL_ALL | = lv_flg_del_all | |
| IMPORTING | ||
| RTCODE | = lv_rtcode | |
| EXCEPTIONS | ||
| ADDR_NOT_EXIST = 1 | ||
| VERS_NOT_EXIST = 2 | ||
| WRONG_DATA = 3 | ||
| . " ADDRESS_DELETE | ||
ABAP code using 7.40 inline data declarations to call FM ADDRESS_DELETE
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 SUBRC FROM SY INTO @DATA(ld_rtcode). | ||||
| "SELECT single ADRNR FROM SADR INTO @DATA(ld_entry_adrnr). | ||||
| "SELECT single INPUT FROM SY INTO @DATA(ld_entry_kind_of_addr). | ||||
| DATA(ld_entry_kind_of_addr) | = ' '. | |||
| "SELECT single NATIO FROM SADR INTO @DATA(ld_entry_natio). | ||||
| DATA(ld_entry_natio) | = ' '. | |||
| "SELECT single FLAG FROM SADR INTO @DATA(ld_flg_del_all). | ||||
| DATA(ld_flg_del_all) | = ' '. | |||
Search for further information about these or an SAP related objects