SAP Function Modules

FTBP_READ_PARTNER_IN_PRINTFORM SAP Function module - Format Partner and Address Data







FTBP_READ_PARTNER_IN_PRINTFORM 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_PARTNER_IN_PRINTFORM 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_PARTNER_IN_PRINTFORM - FTBP READ PARTNER IN PRINTFORM





CALL FUNCTION 'FTBP_READ_PARTNER_IN_PRINTFORM' "Format Partner and Address Data
* EXPORTING
*   address_into_memory = 'X'   " boole-boole   Partner- und Adreßdaten werden gepuffert
*   adrtyp = SPACE              " but021-adr_kind  Anschriftbez.-Schlüssel der zu suchenden Adresse
*   bukrs_in = SPACE            " t001-bukrs    Buchungskreis (für Adresse Inland)
*   date_in = SY-DATUM          " sy-datum      Gültigkeitsdatum (Default = Systemdatum)
*   no_address = SPACE          " boole-boole   'X' - Partner auch ohne Adresse aufbereiten
*   partnr = SPACE              " but000-partner  Partner-Nr. des zu bearbeitenden Partners
*   i_operation = SPACE         " bu_operation  Adressvorgang
*   lines = 5                   " adrs-anzzl    Number of lines in address
*   cntry_in =                  " t005-land1    Absenderland (alternativ zu BUKRS_IN)
*   kz_bplangu = SPACE          " sy-datar
  IMPORTING
    anschwa_out =               " adrs          Adreßdaten in aufbereiteter Form
    name_out =                  " but000        Namensbestandteile für natürl. Partner
    adref_out =                 " but021        BP: Address usages
    adref_out_fs =              " but021_fs     BP: Address Usage With Validity Data
    name_out_xtitle =           " tsad3t-title_medi  Anreden (Texte) (zentrale Adreßverwaltung)
    e_stnd_instead =            " boole-boole   Kennzeichen: Standard statt gewünschter Adresse geliefert
  EXCEPTIONS
    ADDRESS_NOT_FOUND = 1       "               Keine zugeordnete Adresse gefunden
    PARTNER_NOT_FOUND = 2       "               Partner zu vorgeg. PARTNR nicht gefunden
    .  "  FTBP_READ_PARTNER_IN_PRINTFORM

ABAP code example for Function Module FTBP_READ_PARTNER_IN_PRINTFORM





The ABAP code below is a full code listing to execute function module FTBP_READ_PARTNER_IN_PRINTFORM 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_anschwa_out  TYPE ADRS ,
ld_name_out  TYPE BUT000 ,
ld_adref_out  TYPE BUT021 ,
ld_adref_out_fs  TYPE BUT021_FS ,
ld_name_out_xtitle  TYPE TSAD3T-TITLE_MEDI ,
ld_e_stnd_instead  TYPE BOOLE-BOOLE .


DATA(ld_address_into_memory) = some text here

SELECT single ADR_KIND
FROM BUT021
INTO @DATA(ld_adrtyp).


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

DATA(ld_date_in) = '20210129'.

DATA(ld_no_address) = some text here

SELECT single PARTNER
FROM BUT000
INTO @DATA(ld_partnr).

DATA(ld_i_operation) = '20210129'.

DATA(ld_lines) = Check type of data required

SELECT single LAND1
FROM T005
INTO @DATA(ld_cntry_in).

DATA(ld_kz_bplangu) = 'some text here'. . CALL FUNCTION 'FTBP_READ_PARTNER_IN_PRINTFORM' * EXPORTING * address_into_memory = ld_address_into_memory * adrtyp = ld_adrtyp * bukrs_in = ld_bukrs_in * date_in = ld_date_in * no_address = ld_no_address * partnr = ld_partnr * i_operation = ld_i_operation * lines = ld_lines * cntry_in = ld_cntry_in * kz_bplangu = ld_kz_bplangu IMPORTING anschwa_out = ld_anschwa_out name_out = ld_name_out adref_out = ld_adref_out adref_out_fs = ld_adref_out_fs name_out_xtitle = ld_name_out_xtitle e_stnd_instead = ld_e_stnd_instead EXCEPTIONS ADDRESS_NOT_FOUND = 1 PARTNER_NOT_FOUND = 2 . " FTBP_READ_PARTNER_IN_PRINTFORM
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 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_anschwa_out  TYPE ADRS ,
ld_address_into_memory  TYPE BOOLE-BOOLE ,
ld_name_out  TYPE BUT000 ,
ld_adrtyp  TYPE BUT021-ADR_KIND ,
ld_adref_out  TYPE BUT021 ,
ld_bukrs_in  TYPE T001-BUKRS ,
ld_adref_out_fs  TYPE BUT021_FS ,
ld_date_in  TYPE SY-DATUM ,
ld_name_out_xtitle  TYPE TSAD3T-TITLE_MEDI ,
ld_no_address  TYPE BOOLE-BOOLE ,
ld_e_stnd_instead  TYPE BOOLE-BOOLE ,
ld_partnr  TYPE BUT000-PARTNER ,
ld_i_operation  TYPE BU_OPERATION ,
ld_lines  TYPE ADRS-ANZZL ,
ld_cntry_in  TYPE T005-LAND1 ,
ld_kz_bplangu  TYPE SY-DATAR .


ld_address_into_memory = some text here

SELECT single ADR_KIND
FROM BUT021
INTO ld_adrtyp.


SELECT single BUKRS
FROM T001
INTO ld_bukrs_in.

ld_date_in = '20210129'.

ld_no_address = some text here

SELECT single PARTNER
FROM BUT000
INTO ld_partnr.

ld_i_operation = '20210129'.

ld_lines = Check type of data required

SELECT single LAND1
FROM T005
INTO ld_cntry_in.

ld_kz_bplangu = '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_PARTNER_IN_PRINTFORM or its description.