SAP ADDRESS_INSERT Function Module for









ADDRESS_INSERT is a standard address insert 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 insert FM, simply by entering the name ADDRESS_INSERT 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_INSERT 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_INSERT'"
EXPORTING
ENTRY_COMPANY = "Company data for SADR
ENTRY_KIND_OF_ADDR = "Type of address number C=Company/P
ENTRY_PERSONAL = "Person data for SADRP
* NO_DUPREC = ' ' "

IMPORTING
EX_ADRNR = "Address number
RTCODE = "Retruncode

TABLES
CS1_TAB = "Reserve table
TEL_TAB = "Telephone numbers
TLX_TAB = "Telex numbers
TTX_TAB = "Teletext numbers
X40_TAB = "X400 numbers
CS2_TAB = "Reserve table
CS3_TAB = "Reserve table
CS4_TAB = "Reserve table
CS5_TAB = "Reserve table
EDI_TAB = "Reserve table
FAX_TAB = "FAX numbers
RML_TAB = "RMail numbers
SSW_TAB = "Reserve table

EXCEPTIONS
ADDR_EXIST = 1 ADDR_NUMBER_OVERFLOW = 2 DEFAULT_COMMU_NR_MISSING = 3 DEFAULT_COMMU_SYS_MISSING = 4 PERS_COMP_RELATION_NOT_OK = 5 WRONG_HEAD_DATA = 6 WRONG_PARAMETER = 7 WRONG_POSN_DATA = 8
.



IMPORTING Parameters details for ADDRESS_INSERT

ENTRY_COMPANY - Company data for SADR

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

ENTRY_KIND_OF_ADDR - Type of address number C=Company/P

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

ENTRY_PERSONAL - Person data for SADRP

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

NO_DUPREC -

Data type: SONV-FLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for ADDRESS_INSERT

EX_ADRNR - Address number

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

RTCODE - Retruncode

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

TABLES Parameters details for ADDRESS_INSERT

CS1_TAB - Reserve table

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

TEL_TAB - Telephone numbers

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

TLX_TAB - Telex numbers

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

TTX_TAB - Teletext numbers

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

X40_TAB - X400 numbers

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

CS2_TAB - Reserve table

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

CS3_TAB - Reserve table

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

CS4_TAB - Reserve table

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

CS5_TAB - Reserve table

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

EDI_TAB - Reserve table

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

FAX_TAB - FAX numbers

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

RML_TAB - RMail numbers

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

SSW_TAB - Reserve table

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

EXCEPTIONS details

ADDR_EXIST - Address number exists

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

ADDR_NUMBER_OVERFLOW - Address number overflow

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

DEFAULT_COMMU_NR_MISSING - Standard communication number miss

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

DEFAULT_COMMU_SYS_MISSING - Standard communication system miss

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

PERS_COMP_RELATION_NOT_OK - Error in relationship person <-> company

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

WRONG_HEAD_DATA - incorrect company/person data

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

WRONG_PARAMETER - incorrect parameter passing

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

WRONG_POSN_DATA - incorrect data in table

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

Copy and paste ABAP code example for ADDRESS_INSERT 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_cs1_tab  TYPE STANDARD TABLE OF SADR10, "   
lv_ex_adrnr  TYPE SADR-ADRNR, "   
lv_addr_exist  TYPE SADR, "   
lv_entry_company  TYPE SADR, "   
lt_tel_tab  TYPE STANDARD TABLE OF SADR2, "   
lt_tlx_tab  TYPE STANDARD TABLE OF SADR5, "   
lt_ttx_tab  TYPE STANDARD TABLE OF SADR4, "   
lt_x40_tab  TYPE STANDARD TABLE OF SADR8, "   
lv_rtcode  TYPE SY-SUBRC, "   
lt_cs2_tab  TYPE STANDARD TABLE OF SADR11, "   
lv_entry_kind_of_addr  TYPE SY-INPUT, "   
lv_addr_number_overflow  TYPE SY, "   
lt_cs3_tab  TYPE STANDARD TABLE OF SADR12, "   
lv_entry_personal  TYPE SADRP, "   
lv_default_commu_nr_missing  TYPE SADRP, "   
lt_cs4_tab  TYPE STANDARD TABLE OF SADR13, "   
lv_no_duprec  TYPE SONV-FLAG, "   SPACE
lv_default_commu_sys_missing  TYPE SONV, "   
lt_cs5_tab  TYPE STANDARD TABLE OF SADR14, "   
lv_pers_comp_relation_not_ok  TYPE SADR14, "   
lt_edi_tab  TYPE STANDARD TABLE OF SADR6, "   
lv_wrong_head_data  TYPE SADR6, "   
lt_fax_tab  TYPE STANDARD TABLE OF SADR3, "   
lv_wrong_parameter  TYPE SADR3, "   
lt_rml_tab  TYPE STANDARD TABLE OF SADR7, "   
lv_wrong_posn_data  TYPE SADR7, "   
lt_ssw_tab  TYPE STANDARD TABLE OF SADR9. "   

  CALL FUNCTION 'ADDRESS_INSERT'  "
    EXPORTING
         ENTRY_COMPANY = lv_entry_company
         ENTRY_KIND_OF_ADDR = lv_entry_kind_of_addr
         ENTRY_PERSONAL = lv_entry_personal
         NO_DUPREC = lv_no_duprec
    IMPORTING
         EX_ADRNR = lv_ex_adrnr
         RTCODE = lv_rtcode
    TABLES
         CS1_TAB = lt_cs1_tab
         TEL_TAB = lt_tel_tab
         TLX_TAB = lt_tlx_tab
         TTX_TAB = lt_ttx_tab
         X40_TAB = lt_x40_tab
         CS2_TAB = lt_cs2_tab
         CS3_TAB = lt_cs3_tab
         CS4_TAB = lt_cs4_tab
         CS5_TAB = lt_cs5_tab
         EDI_TAB = lt_edi_tab
         FAX_TAB = lt_fax_tab
         RML_TAB = lt_rml_tab
         SSW_TAB = lt_ssw_tab
    EXCEPTIONS
        ADDR_EXIST = 1
        ADDR_NUMBER_OVERFLOW = 2
        DEFAULT_COMMU_NR_MISSING = 3
        DEFAULT_COMMU_SYS_MISSING = 4
        PERS_COMP_RELATION_NOT_OK = 5
        WRONG_HEAD_DATA = 6
        WRONG_PARAMETER = 7
        WRONG_POSN_DATA = 8
. " ADDRESS_INSERT




ABAP code using 7.40 inline data declarations to call FM ADDRESS_INSERT

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 ADRNR FROM SADR INTO @DATA(ld_ex_adrnr).
 
 
 
 
 
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_rtcode).
 
 
"SELECT single INPUT FROM SY INTO @DATA(ld_entry_kind_of_addr).
 
 
 
 
 
 
"SELECT single FLAG FROM SONV INTO @DATA(ld_no_duprec).
DATA(ld_no_duprec) = ' '.
 
 
 
 
 
 
 
 
 
 
 


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!