SAP Function Modules

ADDR3_EXTRACT_TABLES SAP Function module - Read address type 3 (contact person in company) tables







ADDR3_EXTRACT_TABLES is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name ADDR3_EXTRACT_TABLES into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SZAX
Released Date: 02.09.1999
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM ADDR3_EXTRACT_TABLES - ADDR3 EXTRACT TABLES





CALL FUNCTION 'ADDR3_EXTRACT_TABLES' "Read address type 3 (contact person in company) tables
  TABLES
    t_address_keys =            " addr_key      Addr.key: Only uses addr.no and pers.no.
*   t_adrp =                    " adrp
*   t_adcp =                    " adcp
*   t_adr2 =                    " adr2
*   t_adr3 =                    " adr3
*   t_adr4 =                    " adr4
*   t_adr5 =                    " adr5
*   t_adr6 =                    " adr6
*   t_adr7 =                    " adr7
*   t_adr8 =                    " adr8
*   t_adr9 =                    " adr9
*   t_adr10 =                   " adr10
*   t_adr11 =                   " adr11
*   t_adr12 =                   " adr12
*   t_adr13 =                   " adr13
*   t_adrt =                    " adrt
  EXCEPTIONS
    EMPTY_TABLE = 1             "
    .  "  ADDR3_EXTRACT_TABLES

ABAP code example for Function Module ADDR3_EXTRACT_TABLES





The ABAP code below is a full code listing to execute function module ADDR3_EXTRACT_TABLES including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_t_address_keys  TYPE STANDARD TABLE OF ADDR_KEY,"TABLES PARAM
wa_t_address_keys  LIKE LINE OF it_t_address_keys ,
it_t_adrp  TYPE STANDARD TABLE OF ADRP,"TABLES PARAM
wa_t_adrp  LIKE LINE OF it_t_adrp ,
it_t_adcp  TYPE STANDARD TABLE OF ADCP,"TABLES PARAM
wa_t_adcp  LIKE LINE OF it_t_adcp ,
it_t_adr2  TYPE STANDARD TABLE OF ADR2,"TABLES PARAM
wa_t_adr2  LIKE LINE OF it_t_adr2 ,
it_t_adr3  TYPE STANDARD TABLE OF ADR3,"TABLES PARAM
wa_t_adr3  LIKE LINE OF it_t_adr3 ,
it_t_adr4  TYPE STANDARD TABLE OF ADR4,"TABLES PARAM
wa_t_adr4  LIKE LINE OF it_t_adr4 ,
it_t_adr5  TYPE STANDARD TABLE OF ADR5,"TABLES PARAM
wa_t_adr5  LIKE LINE OF it_t_adr5 ,
it_t_adr6  TYPE STANDARD TABLE OF ADR6,"TABLES PARAM
wa_t_adr6  LIKE LINE OF it_t_adr6 ,
it_t_adr7  TYPE STANDARD TABLE OF ADR7,"TABLES PARAM
wa_t_adr7  LIKE LINE OF it_t_adr7 ,
it_t_adr8  TYPE STANDARD TABLE OF ADR8,"TABLES PARAM
wa_t_adr8  LIKE LINE OF it_t_adr8 ,
it_t_adr9  TYPE STANDARD TABLE OF ADR9,"TABLES PARAM
wa_t_adr9  LIKE LINE OF it_t_adr9 ,
it_t_adr10  TYPE STANDARD TABLE OF ADR10,"TABLES PARAM
wa_t_adr10  LIKE LINE OF it_t_adr10 ,
it_t_adr11  TYPE STANDARD TABLE OF ADR11,"TABLES PARAM
wa_t_adr11  LIKE LINE OF it_t_adr11 ,
it_t_adr12  TYPE STANDARD TABLE OF ADR12,"TABLES PARAM
wa_t_adr12  LIKE LINE OF it_t_adr12 ,
it_t_adr13  TYPE STANDARD TABLE OF ADR13,"TABLES PARAM
wa_t_adr13  LIKE LINE OF it_t_adr13 ,
it_t_adrt  TYPE STANDARD TABLE OF ADRT,"TABLES PARAM
wa_t_adrt  LIKE LINE OF it_t_adrt .


"populate fields of struture and append to itab
append wa_t_address_keys to it_t_address_keys.

"populate fields of struture and append to itab
append wa_t_adrp to it_t_adrp.

"populate fields of struture and append to itab
append wa_t_adcp to it_t_adcp.

"populate fields of struture and append to itab
append wa_t_adr2 to it_t_adr2.

"populate fields of struture and append to itab
append wa_t_adr3 to it_t_adr3.

"populate fields of struture and append to itab
append wa_t_adr4 to it_t_adr4.

"populate fields of struture and append to itab
append wa_t_adr5 to it_t_adr5.

"populate fields of struture and append to itab
append wa_t_adr6 to it_t_adr6.

"populate fields of struture and append to itab
append wa_t_adr7 to it_t_adr7.

"populate fields of struture and append to itab
append wa_t_adr8 to it_t_adr8.

"populate fields of struture and append to itab
append wa_t_adr9 to it_t_adr9.

"populate fields of struture and append to itab
append wa_t_adr10 to it_t_adr10.

"populate fields of struture and append to itab
append wa_t_adr11 to it_t_adr11.

"populate fields of struture and append to itab
append wa_t_adr12 to it_t_adr12.

"populate fields of struture and append to itab
append wa_t_adr13 to it_t_adr13.

"populate fields of struture and append to itab
append wa_t_adrt to it_t_adrt. . CALL FUNCTION 'ADDR3_EXTRACT_TABLES' TABLES t_address_keys = it_t_address_keys * t_adrp = it_t_adrp * t_adcp = it_t_adcp * t_adr2 = it_t_adr2 * t_adr3 = it_t_adr3 * t_adr4 = it_t_adr4 * t_adr5 = it_t_adr5 * t_adr6 = it_t_adr6 * t_adr7 = it_t_adr7 * t_adr8 = it_t_adr8 * t_adr9 = it_t_adr9 * t_adr10 = it_t_adr10 * t_adr11 = it_t_adr11 * t_adr12 = it_t_adr12 * t_adr13 = it_t_adr13 * t_adrt = it_t_adrt EXCEPTIONS EMPTY_TABLE = 1 . " ADDR3_EXTRACT_TABLES
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
it_t_address_keys  TYPE STANDARD TABLE OF ADDR_KEY ,
wa_t_address_keys  LIKE LINE OF it_t_address_keys,
it_t_adrp  TYPE STANDARD TABLE OF ADRP ,
wa_t_adrp  LIKE LINE OF it_t_adrp,
it_t_adcp  TYPE STANDARD TABLE OF ADCP ,
wa_t_adcp  LIKE LINE OF it_t_adcp,
it_t_adr2  TYPE STANDARD TABLE OF ADR2 ,
wa_t_adr2  LIKE LINE OF it_t_adr2,
it_t_adr3  TYPE STANDARD TABLE OF ADR3 ,
wa_t_adr3  LIKE LINE OF it_t_adr3,
it_t_adr4  TYPE STANDARD TABLE OF ADR4 ,
wa_t_adr4  LIKE LINE OF it_t_adr4,
it_t_adr5  TYPE STANDARD TABLE OF ADR5 ,
wa_t_adr5  LIKE LINE OF it_t_adr5,
it_t_adr6  TYPE STANDARD TABLE OF ADR6 ,
wa_t_adr6  LIKE LINE OF it_t_adr6,
it_t_adr7  TYPE STANDARD TABLE OF ADR7 ,
wa_t_adr7  LIKE LINE OF it_t_adr7,
it_t_adr8  TYPE STANDARD TABLE OF ADR8 ,
wa_t_adr8  LIKE LINE OF it_t_adr8,
it_t_adr9  TYPE STANDARD TABLE OF ADR9 ,
wa_t_adr9  LIKE LINE OF it_t_adr9,
it_t_adr10  TYPE STANDARD TABLE OF ADR10 ,
wa_t_adr10  LIKE LINE OF it_t_adr10,
it_t_adr11  TYPE STANDARD TABLE OF ADR11 ,
wa_t_adr11  LIKE LINE OF it_t_adr11,
it_t_adr12  TYPE STANDARD TABLE OF ADR12 ,
wa_t_adr12  LIKE LINE OF it_t_adr12,
it_t_adr13  TYPE STANDARD TABLE OF ADR13 ,
wa_t_adr13  LIKE LINE OF it_t_adr13,
it_t_adrt  TYPE STANDARD TABLE OF ADRT ,
wa_t_adrt  LIKE LINE OF it_t_adrt.


"populate fields of struture and append to itab
append wa_t_address_keys to it_t_address_keys.

"populate fields of struture and append to itab
append wa_t_adrp to it_t_adrp.

"populate fields of struture and append to itab
append wa_t_adcp to it_t_adcp.

"populate fields of struture and append to itab
append wa_t_adr2 to it_t_adr2.

"populate fields of struture and append to itab
append wa_t_adr3 to it_t_adr3.

"populate fields of struture and append to itab
append wa_t_adr4 to it_t_adr4.

"populate fields of struture and append to itab
append wa_t_adr5 to it_t_adr5.

"populate fields of struture and append to itab
append wa_t_adr6 to it_t_adr6.

"populate fields of struture and append to itab
append wa_t_adr7 to it_t_adr7.

"populate fields of struture and append to itab
append wa_t_adr8 to it_t_adr8.

"populate fields of struture and append to itab
append wa_t_adr9 to it_t_adr9.

"populate fields of struture and append to itab
append wa_t_adr10 to it_t_adr10.

"populate fields of struture and append to itab
append wa_t_adr11 to it_t_adr11.

"populate fields of struture and append to itab
append wa_t_adr12 to it_t_adr12.

"populate fields of struture and append to itab
append wa_t_adr13 to it_t_adr13.

"populate fields of struture and append to itab
append wa_t_adrt to it_t_adrt.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name ADDR3_EXTRACT_TABLES or its description.