SAP Function Modules

COMP_ADDRESS_COLLECT_DATA SAP Function module







COMP_ADDRESS_COLLECT_DATA 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 COMP_ADDRESS_COLLECT_DATA into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CRM3
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM COMP_ADDRESS_COLLECT_DATA - COMP ADDRESS COLLECT DATA





CALL FUNCTION 'COMP_ADDRESS_COLLECT_DATA' "
  EXPORTING
    i_addrnumber =              " adrc-addrnumber
    i_addr_group =              " adrc-addr_group
  TABLES
    t_xadrc =                   " vadrc
    t_yadrc =                   " vadrc
    t_xadr2 =                   " vadr2
    t_yadr2 =                   " vadr2
    t_xadr3 =                   " vadr3
    t_yadr3 =                   " vadr3
    t_xadr4 =                   " vadr4
    t_yadr4 =                   " vadr4
    t_xadr5 =                   " vadr5
    t_yadr5 =                   " vadr5
    t_xadr6 =                   " vadr6
    t_yadr6 =                   " vadr6
    t_xadr7 =                   " vadr7
    t_yadr7 =                   " vadr7
    t_xadr8 =                   " vadr8
    t_yadr8 =                   " vadr8
    t_xadr9 =                   " vadr9
    t_yadr9 =                   " vadr9
    t_xadr10 =                  " vadr10
    t_xadr11 =                  " vadr11
    t_yadr11 =                  " vadr11
    t_xadr12 =                  " vadr12
    t_yadr12 =                  " vadr12
    t_xadr13 =                  " vadr13
    t_yadr13 =                  " vadr13
    t_xadr14 =                  " vadr14
    t_yadr14 =                  " vadr14
    t_xadr15 =                  " vadr15
    t_yadr15 =                  " vadr15
    t_xadr16 =                  " vadr16
    t_yadr16 =                  " vadr16
    t_xadrt =                   " vadrt
    t_yadrt =                   " vadrt
    t_xadrct =                  " vadrct
    t_yadrct =                  " vadrct
    .  "  COMP_ADDRESS_COLLECT_DATA

ABAP code example for Function Module COMP_ADDRESS_COLLECT_DATA





The ABAP code below is a full code listing to execute function module COMP_ADDRESS_COLLECT_DATA 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_xadrc  TYPE STANDARD TABLE OF VADRC,"TABLES PARAM
wa_t_xadrc  LIKE LINE OF it_t_xadrc ,
it_t_yadrc  TYPE STANDARD TABLE OF VADRC,"TABLES PARAM
wa_t_yadrc  LIKE LINE OF it_t_yadrc ,
it_t_xadr2  TYPE STANDARD TABLE OF VADR2,"TABLES PARAM
wa_t_xadr2  LIKE LINE OF it_t_xadr2 ,
it_t_yadr2  TYPE STANDARD TABLE OF VADR2,"TABLES PARAM
wa_t_yadr2  LIKE LINE OF it_t_yadr2 ,
it_t_xadr3  TYPE STANDARD TABLE OF VADR3,"TABLES PARAM
wa_t_xadr3  LIKE LINE OF it_t_xadr3 ,
it_t_yadr3  TYPE STANDARD TABLE OF VADR3,"TABLES PARAM
wa_t_yadr3  LIKE LINE OF it_t_yadr3 ,
it_t_xadr4  TYPE STANDARD TABLE OF VADR4,"TABLES PARAM
wa_t_xadr4  LIKE LINE OF it_t_xadr4 ,
it_t_yadr4  TYPE STANDARD TABLE OF VADR4,"TABLES PARAM
wa_t_yadr4  LIKE LINE OF it_t_yadr4 ,
it_t_xadr5  TYPE STANDARD TABLE OF VADR5,"TABLES PARAM
wa_t_xadr5  LIKE LINE OF it_t_xadr5 ,
it_t_yadr5  TYPE STANDARD TABLE OF VADR5,"TABLES PARAM
wa_t_yadr5  LIKE LINE OF it_t_yadr5 ,
it_t_xadr6  TYPE STANDARD TABLE OF VADR6,"TABLES PARAM
wa_t_xadr6  LIKE LINE OF it_t_xadr6 ,
it_t_yadr6  TYPE STANDARD TABLE OF VADR6,"TABLES PARAM
wa_t_yadr6  LIKE LINE OF it_t_yadr6 ,
it_t_xadr7  TYPE STANDARD TABLE OF VADR7,"TABLES PARAM
wa_t_xadr7  LIKE LINE OF it_t_xadr7 ,
it_t_yadr7  TYPE STANDARD TABLE OF VADR7,"TABLES PARAM
wa_t_yadr7  LIKE LINE OF it_t_yadr7 ,
it_t_xadr8  TYPE STANDARD TABLE OF VADR8,"TABLES PARAM
wa_t_xadr8  LIKE LINE OF it_t_xadr8 ,
it_t_yadr8  TYPE STANDARD TABLE OF VADR8,"TABLES PARAM
wa_t_yadr8  LIKE LINE OF it_t_yadr8 ,
it_t_xadr9  TYPE STANDARD TABLE OF VADR9,"TABLES PARAM
wa_t_xadr9  LIKE LINE OF it_t_xadr9 ,
it_t_yadr9  TYPE STANDARD TABLE OF VADR9,"TABLES PARAM
wa_t_yadr9  LIKE LINE OF it_t_yadr9 ,
it_t_xadr10  TYPE STANDARD TABLE OF VADR10,"TABLES PARAM
wa_t_xadr10  LIKE LINE OF it_t_xadr10 ,
it_t_xadr11  TYPE STANDARD TABLE OF VADR11,"TABLES PARAM
wa_t_xadr11  LIKE LINE OF it_t_xadr11 ,
it_t_yadr11  TYPE STANDARD TABLE OF VADR11,"TABLES PARAM
wa_t_yadr11  LIKE LINE OF it_t_yadr11 ,
it_t_xadr12  TYPE STANDARD TABLE OF VADR12,"TABLES PARAM
wa_t_xadr12  LIKE LINE OF it_t_xadr12 ,
it_t_yadr12  TYPE STANDARD TABLE OF VADR12,"TABLES PARAM
wa_t_yadr12  LIKE LINE OF it_t_yadr12 ,
it_t_xadr13  TYPE STANDARD TABLE OF VADR13,"TABLES PARAM
wa_t_xadr13  LIKE LINE OF it_t_xadr13 ,
it_t_yadr13  TYPE STANDARD TABLE OF VADR13,"TABLES PARAM
wa_t_yadr13  LIKE LINE OF it_t_yadr13 ,
it_t_xadr14  TYPE STANDARD TABLE OF VADR14,"TABLES PARAM
wa_t_xadr14  LIKE LINE OF it_t_xadr14 ,
it_t_yadr14  TYPE STANDARD TABLE OF VADR14,"TABLES PARAM
wa_t_yadr14  LIKE LINE OF it_t_yadr14 ,
it_t_xadr15  TYPE STANDARD TABLE OF VADR15,"TABLES PARAM
wa_t_xadr15  LIKE LINE OF it_t_xadr15 ,
it_t_yadr15  TYPE STANDARD TABLE OF VADR15,"TABLES PARAM
wa_t_yadr15  LIKE LINE OF it_t_yadr15 ,
it_t_xadr16  TYPE STANDARD TABLE OF VADR16,"TABLES PARAM
wa_t_xadr16  LIKE LINE OF it_t_xadr16 ,
it_t_yadr16  TYPE STANDARD TABLE OF VADR16,"TABLES PARAM
wa_t_yadr16  LIKE LINE OF it_t_yadr16 ,
it_t_xadrt  TYPE STANDARD TABLE OF VADRT,"TABLES PARAM
wa_t_xadrt  LIKE LINE OF it_t_xadrt ,
it_t_yadrt  TYPE STANDARD TABLE OF VADRT,"TABLES PARAM
wa_t_yadrt  LIKE LINE OF it_t_yadrt ,
it_t_xadrct  TYPE STANDARD TABLE OF VADRCT,"TABLES PARAM
wa_t_xadrct  LIKE LINE OF it_t_xadrct ,
it_t_yadrct  TYPE STANDARD TABLE OF VADRCT,"TABLES PARAM
wa_t_yadrct  LIKE LINE OF it_t_yadrct .


SELECT single ADDRNUMBER
FROM ADRC
INTO @DATA(ld_i_addrnumber).


SELECT single ADDR_GROUP
FROM ADRC
INTO @DATA(ld_i_addr_group).


"populate fields of struture and append to itab
append wa_t_xadrc to it_t_xadrc.

"populate fields of struture and append to itab
append wa_t_yadrc to it_t_yadrc.

"populate fields of struture and append to itab
append wa_t_xadr2 to it_t_xadr2.

"populate fields of struture and append to itab
append wa_t_yadr2 to it_t_yadr2.

"populate fields of struture and append to itab
append wa_t_xadr3 to it_t_xadr3.

"populate fields of struture and append to itab
append wa_t_yadr3 to it_t_yadr3.

"populate fields of struture and append to itab
append wa_t_xadr4 to it_t_xadr4.

"populate fields of struture and append to itab
append wa_t_yadr4 to it_t_yadr4.

"populate fields of struture and append to itab
append wa_t_xadr5 to it_t_xadr5.

"populate fields of struture and append to itab
append wa_t_yadr5 to it_t_yadr5.

"populate fields of struture and append to itab
append wa_t_xadr6 to it_t_xadr6.

"populate fields of struture and append to itab
append wa_t_yadr6 to it_t_yadr6.

"populate fields of struture and append to itab
append wa_t_xadr7 to it_t_xadr7.

"populate fields of struture and append to itab
append wa_t_yadr7 to it_t_yadr7.

"populate fields of struture and append to itab
append wa_t_xadr8 to it_t_xadr8.

"populate fields of struture and append to itab
append wa_t_yadr8 to it_t_yadr8.

"populate fields of struture and append to itab
append wa_t_xadr9 to it_t_xadr9.

"populate fields of struture and append to itab
append wa_t_yadr9 to it_t_yadr9.

"populate fields of struture and append to itab
append wa_t_xadr10 to it_t_xadr10.

"populate fields of struture and append to itab
append wa_t_xadr11 to it_t_xadr11.

"populate fields of struture and append to itab
append wa_t_yadr11 to it_t_yadr11.

"populate fields of struture and append to itab
append wa_t_xadr12 to it_t_xadr12.

"populate fields of struture and append to itab
append wa_t_yadr12 to it_t_yadr12.

"populate fields of struture and append to itab
append wa_t_xadr13 to it_t_xadr13.

"populate fields of struture and append to itab
append wa_t_yadr13 to it_t_yadr13.

"populate fields of struture and append to itab
append wa_t_xadr14 to it_t_xadr14.

"populate fields of struture and append to itab
append wa_t_yadr14 to it_t_yadr14.

"populate fields of struture and append to itab
append wa_t_xadr15 to it_t_xadr15.

"populate fields of struture and append to itab
append wa_t_yadr15 to it_t_yadr15.

"populate fields of struture and append to itab
append wa_t_xadr16 to it_t_xadr16.

"populate fields of struture and append to itab
append wa_t_yadr16 to it_t_yadr16.

"populate fields of struture and append to itab
append wa_t_xadrt to it_t_xadrt.

"populate fields of struture and append to itab
append wa_t_yadrt to it_t_yadrt.

"populate fields of struture and append to itab
append wa_t_xadrct to it_t_xadrct.

"populate fields of struture and append to itab
append wa_t_yadrct to it_t_yadrct. . CALL FUNCTION 'COMP_ADDRESS_COLLECT_DATA' EXPORTING i_addrnumber = ld_i_addrnumber i_addr_group = ld_i_addr_group TABLES t_xadrc = it_t_xadrc t_yadrc = it_t_yadrc t_xadr2 = it_t_xadr2 t_yadr2 = it_t_yadr2 t_xadr3 = it_t_xadr3 t_yadr3 = it_t_yadr3 t_xadr4 = it_t_xadr4 t_yadr4 = it_t_yadr4 t_xadr5 = it_t_xadr5 t_yadr5 = it_t_yadr5 t_xadr6 = it_t_xadr6 t_yadr6 = it_t_yadr6 t_xadr7 = it_t_xadr7 t_yadr7 = it_t_yadr7 t_xadr8 = it_t_xadr8 t_yadr8 = it_t_yadr8 t_xadr9 = it_t_xadr9 t_yadr9 = it_t_yadr9 t_xadr10 = it_t_xadr10 t_xadr11 = it_t_xadr11 t_yadr11 = it_t_yadr11 t_xadr12 = it_t_xadr12 t_yadr12 = it_t_yadr12 t_xadr13 = it_t_xadr13 t_yadr13 = it_t_yadr13 t_xadr14 = it_t_xadr14 t_yadr14 = it_t_yadr14 t_xadr15 = it_t_xadr15 t_yadr15 = it_t_yadr15 t_xadr16 = it_t_xadr16 t_yadr16 = it_t_yadr16 t_xadrt = it_t_xadrt t_yadrt = it_t_yadrt t_xadrct = it_t_xadrct t_yadrct = it_t_yadrct . " COMP_ADDRESS_COLLECT_DATA
IF SY-SUBRC EQ 0. "All OK 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:
ld_i_addrnumber  TYPE ADRC-ADDRNUMBER ,
it_t_xadrc  TYPE STANDARD TABLE OF VADRC ,
wa_t_xadrc  LIKE LINE OF it_t_xadrc,
ld_i_addr_group  TYPE ADRC-ADDR_GROUP ,
it_t_yadrc  TYPE STANDARD TABLE OF VADRC ,
wa_t_yadrc  LIKE LINE OF it_t_yadrc,
it_t_xadr2  TYPE STANDARD TABLE OF VADR2 ,
wa_t_xadr2  LIKE LINE OF it_t_xadr2,
it_t_yadr2  TYPE STANDARD TABLE OF VADR2 ,
wa_t_yadr2  LIKE LINE OF it_t_yadr2,
it_t_xadr3  TYPE STANDARD TABLE OF VADR3 ,
wa_t_xadr3  LIKE LINE OF it_t_xadr3,
it_t_yadr3  TYPE STANDARD TABLE OF VADR3 ,
wa_t_yadr3  LIKE LINE OF it_t_yadr3,
it_t_xadr4  TYPE STANDARD TABLE OF VADR4 ,
wa_t_xadr4  LIKE LINE OF it_t_xadr4,
it_t_yadr4  TYPE STANDARD TABLE OF VADR4 ,
wa_t_yadr4  LIKE LINE OF it_t_yadr4,
it_t_xadr5  TYPE STANDARD TABLE OF VADR5 ,
wa_t_xadr5  LIKE LINE OF it_t_xadr5,
it_t_yadr5  TYPE STANDARD TABLE OF VADR5 ,
wa_t_yadr5  LIKE LINE OF it_t_yadr5,
it_t_xadr6  TYPE STANDARD TABLE OF VADR6 ,
wa_t_xadr6  LIKE LINE OF it_t_xadr6,
it_t_yadr6  TYPE STANDARD TABLE OF VADR6 ,
wa_t_yadr6  LIKE LINE OF it_t_yadr6,
it_t_xadr7  TYPE STANDARD TABLE OF VADR7 ,
wa_t_xadr7  LIKE LINE OF it_t_xadr7,
it_t_yadr7  TYPE STANDARD TABLE OF VADR7 ,
wa_t_yadr7  LIKE LINE OF it_t_yadr7,
it_t_xadr8  TYPE STANDARD TABLE OF VADR8 ,
wa_t_xadr8  LIKE LINE OF it_t_xadr8,
it_t_yadr8  TYPE STANDARD TABLE OF VADR8 ,
wa_t_yadr8  LIKE LINE OF it_t_yadr8,
it_t_xadr9  TYPE STANDARD TABLE OF VADR9 ,
wa_t_xadr9  LIKE LINE OF it_t_xadr9,
it_t_yadr9  TYPE STANDARD TABLE OF VADR9 ,
wa_t_yadr9  LIKE LINE OF it_t_yadr9,
it_t_xadr10  TYPE STANDARD TABLE OF VADR10 ,
wa_t_xadr10  LIKE LINE OF it_t_xadr10,
it_t_xadr11  TYPE STANDARD TABLE OF VADR11 ,
wa_t_xadr11  LIKE LINE OF it_t_xadr11,
it_t_yadr11  TYPE STANDARD TABLE OF VADR11 ,
wa_t_yadr11  LIKE LINE OF it_t_yadr11,
it_t_xadr12  TYPE STANDARD TABLE OF VADR12 ,
wa_t_xadr12  LIKE LINE OF it_t_xadr12,
it_t_yadr12  TYPE STANDARD TABLE OF VADR12 ,
wa_t_yadr12  LIKE LINE OF it_t_yadr12,
it_t_xadr13  TYPE STANDARD TABLE OF VADR13 ,
wa_t_xadr13  LIKE LINE OF it_t_xadr13,
it_t_yadr13  TYPE STANDARD TABLE OF VADR13 ,
wa_t_yadr13  LIKE LINE OF it_t_yadr13,
it_t_xadr14  TYPE STANDARD TABLE OF VADR14 ,
wa_t_xadr14  LIKE LINE OF it_t_xadr14,
it_t_yadr14  TYPE STANDARD TABLE OF VADR14 ,
wa_t_yadr14  LIKE LINE OF it_t_yadr14,
it_t_xadr15  TYPE STANDARD TABLE OF VADR15 ,
wa_t_xadr15  LIKE LINE OF it_t_xadr15,
it_t_yadr15  TYPE STANDARD TABLE OF VADR15 ,
wa_t_yadr15  LIKE LINE OF it_t_yadr15,
it_t_xadr16  TYPE STANDARD TABLE OF VADR16 ,
wa_t_xadr16  LIKE LINE OF it_t_xadr16,
it_t_yadr16  TYPE STANDARD TABLE OF VADR16 ,
wa_t_yadr16  LIKE LINE OF it_t_yadr16,
it_t_xadrt  TYPE STANDARD TABLE OF VADRT ,
wa_t_xadrt  LIKE LINE OF it_t_xadrt,
it_t_yadrt  TYPE STANDARD TABLE OF VADRT ,
wa_t_yadrt  LIKE LINE OF it_t_yadrt,
it_t_xadrct  TYPE STANDARD TABLE OF VADRCT ,
wa_t_xadrct  LIKE LINE OF it_t_xadrct,
it_t_yadrct  TYPE STANDARD TABLE OF VADRCT ,
wa_t_yadrct  LIKE LINE OF it_t_yadrct.


SELECT single ADDRNUMBER
FROM ADRC
INTO ld_i_addrnumber.


"populate fields of struture and append to itab
append wa_t_xadrc to it_t_xadrc.

SELECT single ADDR_GROUP
FROM ADRC
INTO ld_i_addr_group.


"populate fields of struture and append to itab
append wa_t_yadrc to it_t_yadrc.

"populate fields of struture and append to itab
append wa_t_xadr2 to it_t_xadr2.

"populate fields of struture and append to itab
append wa_t_yadr2 to it_t_yadr2.

"populate fields of struture and append to itab
append wa_t_xadr3 to it_t_xadr3.

"populate fields of struture and append to itab
append wa_t_yadr3 to it_t_yadr3.

"populate fields of struture and append to itab
append wa_t_xadr4 to it_t_xadr4.

"populate fields of struture and append to itab
append wa_t_yadr4 to it_t_yadr4.

"populate fields of struture and append to itab
append wa_t_xadr5 to it_t_xadr5.

"populate fields of struture and append to itab
append wa_t_yadr5 to it_t_yadr5.

"populate fields of struture and append to itab
append wa_t_xadr6 to it_t_xadr6.

"populate fields of struture and append to itab
append wa_t_yadr6 to it_t_yadr6.

"populate fields of struture and append to itab
append wa_t_xadr7 to it_t_xadr7.

"populate fields of struture and append to itab
append wa_t_yadr7 to it_t_yadr7.

"populate fields of struture and append to itab
append wa_t_xadr8 to it_t_xadr8.

"populate fields of struture and append to itab
append wa_t_yadr8 to it_t_yadr8.

"populate fields of struture and append to itab
append wa_t_xadr9 to it_t_xadr9.

"populate fields of struture and append to itab
append wa_t_yadr9 to it_t_yadr9.

"populate fields of struture and append to itab
append wa_t_xadr10 to it_t_xadr10.

"populate fields of struture and append to itab
append wa_t_xadr11 to it_t_xadr11.

"populate fields of struture and append to itab
append wa_t_yadr11 to it_t_yadr11.

"populate fields of struture and append to itab
append wa_t_xadr12 to it_t_xadr12.

"populate fields of struture and append to itab
append wa_t_yadr12 to it_t_yadr12.

"populate fields of struture and append to itab
append wa_t_xadr13 to it_t_xadr13.

"populate fields of struture and append to itab
append wa_t_yadr13 to it_t_yadr13.

"populate fields of struture and append to itab
append wa_t_xadr14 to it_t_xadr14.

"populate fields of struture and append to itab
append wa_t_yadr14 to it_t_yadr14.

"populate fields of struture and append to itab
append wa_t_xadr15 to it_t_xadr15.

"populate fields of struture and append to itab
append wa_t_yadr15 to it_t_yadr15.

"populate fields of struture and append to itab
append wa_t_xadr16 to it_t_xadr16.

"populate fields of struture and append to itab
append wa_t_yadr16 to it_t_yadr16.

"populate fields of struture and append to itab
append wa_t_xadrt to it_t_xadrt.

"populate fields of struture and append to itab
append wa_t_yadrt to it_t_yadrt.

"populate fields of struture and append to itab
append wa_t_xadrct to it_t_xadrct.

"populate fields of struture and append to itab
append wa_t_yadrct to it_t_yadrct.

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 COMP_ADDRESS_COLLECT_DATA or its description.