SAP Function Modules

FTBP_READ_ADDRESS_PRINT SAP Function module - Business Partner: Read Address Data and Formatted Address







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

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


Pattern for FM FTBP_READ_ADDRESS_PRINT - FTBP READ ADDRESS PRINT





CALL FUNCTION 'FTBP_READ_ADDRESS_PRINT' "Business Partner: Read Address Data and Formatted Address
  EXPORTING
    i_partner =                 " bu_partner    Business Partner
*   i_adr_kind = SPACE          " tb009-adr_kind
*   i_bukrs =                   " t001-bukrs
*   i_sender_country = SPACE    " szad_field-send_cntry  Buchungskreis (Absender)
*   i_count_lines = 5           " adrs-anzzl    Number of lines in address
*   i_date =                    " sy-datum      Datum zur Auswahl der Adresse
*   i_operation = SPACE         " bu_operation  Activity for BP Address Determination
*   i_xmemory =                 " boole-boole
*   i_xwa =                     " boole-boole
*   i_no_bus020_ext =           " boole-boole   Data Element for BOOLE Domain: TRUE (='X') and FALSE (=' ')
  IMPORTING
    address_printform =         " adrs_print
    address_short_form =        " szad_field-addr_short
    address_short_form_s =      " szad_field-addr_short
    address_data_carrier =      " szad_field-addr_dc
    address_data_carrier_0 =    " szad_field-addr_dc
    number_of_used_lines =      " adrs-anzzl
    address_printform_table =   " szadr_printform_table
    address_printform_table_10 =   " szadr_printform_table
    e_bus020_ext =              " bus020_ext
    e_but021_fs =               " but021_fs     BP: Address Usage With Validity Data
    e_stnd_instead =            " boole-boole   Kennzeichen: Standardadresse statt angeforderter Adresse selektiert
  EXCEPTIONS
    ADDRESS = 1                 "               Adresse nicht vorhanden oder zugeordnet
    PARTNER = 2                 "               Partner does not exist
    NO_ADDRESS = 3              "               Obsolete
    .  "  FTBP_READ_ADDRESS_PRINT

ABAP code example for Function Module FTBP_READ_ADDRESS_PRINT





The ABAP code below is a full code listing to execute function module FTBP_READ_ADDRESS_PRINT 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:
ld_address_printform  TYPE ADRS_PRINT ,
ld_address_short_form  TYPE SZAD_FIELD-ADDR_SHORT ,
ld_address_short_form_s  TYPE SZAD_FIELD-ADDR_SHORT ,
ld_address_data_carrier  TYPE SZAD_FIELD-ADDR_DC ,
ld_address_data_carrier_0  TYPE SZAD_FIELD-ADDR_DC ,
ld_number_of_used_lines  TYPE ADRS-ANZZL ,
ld_address_printform_table  TYPE SZADR_PRINTFORM_TABLE ,
ld_address_printform_table_10  TYPE SZADR_PRINTFORM_TABLE ,
ld_e_bus020_ext  TYPE BUS020_EXT ,
ld_e_but021_fs  TYPE BUT021_FS ,
ld_e_stnd_instead  TYPE BOOLE-BOOLE .

DATA(ld_i_partner) = 'Check type of data required'.

SELECT single ADR_KIND
FROM TB009
INTO @DATA(ld_i_adr_kind).


SELECT single BUKRS
FROM T001
INTO @DATA(ld_i_bukrs).


DATA(ld_i_sender_country) = some text here

DATA(ld_i_count_lines) = Check type of data required
DATA(ld_i_date) = '20210129'.
DATA(ld_i_operation) = '20210129'.

DATA(ld_i_xmemory) = some text here

DATA(ld_i_xwa) = some text here

DATA(ld_i_no_bus020_ext) = some text here . CALL FUNCTION 'FTBP_READ_ADDRESS_PRINT' EXPORTING i_partner = ld_i_partner * i_adr_kind = ld_i_adr_kind * i_bukrs = ld_i_bukrs * i_sender_country = ld_i_sender_country * i_count_lines = ld_i_count_lines * i_date = ld_i_date * i_operation = ld_i_operation * i_xmemory = ld_i_xmemory * i_xwa = ld_i_xwa * i_no_bus020_ext = ld_i_no_bus020_ext IMPORTING address_printform = ld_address_printform address_short_form = ld_address_short_form address_short_form_s = ld_address_short_form_s address_data_carrier = ld_address_data_carrier address_data_carrier_0 = ld_address_data_carrier_0 number_of_used_lines = ld_number_of_used_lines address_printform_table = ld_address_printform_table address_printform_table_10 = ld_address_printform_table_10 e_bus020_ext = ld_e_bus020_ext e_but021_fs = ld_e_but021_fs e_stnd_instead = ld_e_stnd_instead EXCEPTIONS ADDRESS = 1 PARTNER = 2 NO_ADDRESS = 3 . " FTBP_READ_ADDRESS_PRINT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "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:
ld_i_partner  TYPE BU_PARTNER ,
ld_address_printform  TYPE ADRS_PRINT ,
ld_i_adr_kind  TYPE TB009-ADR_KIND ,
ld_address_short_form  TYPE SZAD_FIELD-ADDR_SHORT ,
ld_i_bukrs  TYPE T001-BUKRS ,
ld_address_short_form_s  TYPE SZAD_FIELD-ADDR_SHORT ,
ld_i_sender_country  TYPE SZAD_FIELD-SEND_CNTRY ,
ld_address_data_carrier  TYPE SZAD_FIELD-ADDR_DC ,
ld_address_data_carrier_0  TYPE SZAD_FIELD-ADDR_DC ,
ld_i_count_lines  TYPE ADRS-ANZZL ,
ld_number_of_used_lines  TYPE ADRS-ANZZL ,
ld_i_date  TYPE SY-DATUM ,
ld_address_printform_table  TYPE SZADR_PRINTFORM_TABLE ,
ld_i_operation  TYPE BU_OPERATION ,
ld_address_printform_table_10  TYPE SZADR_PRINTFORM_TABLE ,
ld_i_xmemory  TYPE BOOLE-BOOLE ,
ld_e_bus020_ext  TYPE BUS020_EXT ,
ld_i_xwa  TYPE BOOLE-BOOLE ,
ld_e_but021_fs  TYPE BUT021_FS ,
ld_i_no_bus020_ext  TYPE BOOLE-BOOLE ,
ld_e_stnd_instead  TYPE BOOLE-BOOLE .

ld_i_partner = '20210129'.

SELECT single ADR_KIND
FROM TB009
INTO ld_i_adr_kind.


SELECT single BUKRS
FROM T001
INTO ld_i_bukrs.


ld_i_sender_country = some text here

ld_i_count_lines = Check type of data required
ld_i_date = '20210129'.
ld_i_operation = '20210129'.

ld_i_xmemory = some text here

ld_i_xwa = some text here

ld_i_no_bus020_ext = some text here

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