SAP Function Modules

FTBP_READ_PARTNER SAP Function module - Business Partner: Read General Data







FTBP_READ_PARTNER 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 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 - FTBP READ PARTNER





CALL FUNCTION 'FTBP_READ_PARTNER' "Business Partner: Read General Data
  EXPORTING
    i_partner =                 " but000-partner  Partner
*   i_release = SPACE           " c             Check Release of Partner
*   i_read_from_db = SPACE      " boole-boole   Always Read from the Database
*   i_date = SY-DATUM           " sy-datum
*   i_xmemory = SPACE           " boole-boole   Kennzeichen: Lokales Memory durchsuchen
*   i_xwa = SPACE               " boole-boole   Kennzeichen: Arbeitsbereich durchsuchen
*   i_addrnumber =              " but020-addrnumber  Adressnummer (für Adressfindung)
*   i_cp_exclude = SPACE        " boole-boole   Keine Daten zur Zentralen Person (Performance!)
*   i_is_exclude = SPACE        " boole-boole   Standardbranche nicht ermitteln
  IMPORTING
    e_bus000 =                  " bus000
    e_bus001 =                  " bus001
    e_bp001 =                   " bp001
    e_but0bank =                " but0bank      Business Partner: Bank Data
    e_customer =                " kna1-kunnr
  EXCEPTIONS
    PARTNER = 1                 "
    PARTNER_NOT_RELEASED = 2    "               Partner is not released
    WRONG_PARAMETERS = 3        "
    DATA_FOR_DATA_NOT_ACT = 4   "
    .  "  FTBP_READ_PARTNER

ABAP code example for Function Module FTBP_READ_PARTNER





The ABAP code below is a full code listing to execute function module FTBP_READ_PARTNER 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_e_bus000  TYPE BUS000 ,
ld_e_bus001  TYPE BUS001 ,
ld_e_bp001  TYPE BP001 ,
ld_e_but0bank  TYPE BUT0BANK ,
ld_e_customer  TYPE KNA1-KUNNR .


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

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

DATA(ld_i_read_from_db) = some text here
DATA(ld_i_date) = '20210129'.

DATA(ld_i_xmemory) = some text here

DATA(ld_i_xwa) = some text here

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


DATA(ld_i_cp_exclude) = some text here

DATA(ld_i_is_exclude) = some text here . CALL FUNCTION 'FTBP_READ_PARTNER' EXPORTING i_partner = ld_i_partner * i_release = ld_i_release * i_read_from_db = ld_i_read_from_db * i_date = ld_i_date * i_xmemory = ld_i_xmemory * i_xwa = ld_i_xwa * i_addrnumber = ld_i_addrnumber * i_cp_exclude = ld_i_cp_exclude * i_is_exclude = ld_i_is_exclude IMPORTING e_bus000 = ld_e_bus000 e_bus001 = ld_e_bus001 e_bp001 = ld_e_bp001 e_but0bank = ld_e_but0bank e_customer = ld_e_customer EXCEPTIONS PARTNER = 1 PARTNER_NOT_RELEASED = 2 WRONG_PARAMETERS = 3 DATA_FOR_DATA_NOT_ACT = 4 . " FTBP_READ_PARTNER
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 ELSEIF SY-SUBRC EQ 4. "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_e_bus000  TYPE BUS000 ,
ld_i_partner  TYPE BUT000-PARTNER ,
ld_e_bus001  TYPE BUS001 ,
ld_i_release  TYPE C ,
ld_e_bp001  TYPE BP001 ,
ld_i_read_from_db  TYPE BOOLE-BOOLE ,
ld_e_but0bank  TYPE BUT0BANK ,
ld_i_date  TYPE SY-DATUM ,
ld_e_customer  TYPE KNA1-KUNNR ,
ld_i_xmemory  TYPE BOOLE-BOOLE ,
ld_i_xwa  TYPE BOOLE-BOOLE ,
ld_i_addrnumber  TYPE BUT020-ADDRNUMBER ,
ld_i_cp_exclude  TYPE BOOLE-BOOLE ,
ld_i_is_exclude  TYPE BOOLE-BOOLE .


SELECT single PARTNER
FROM BUT000
INTO ld_i_partner.

ld_i_release = '20210129'.

ld_i_read_from_db = some text here
ld_i_date = '20210129'.

ld_i_xmemory = some text here

ld_i_xwa = some text here

SELECT single ADDRNUMBER
FROM BUT020
INTO ld_i_addrnumber.


ld_i_cp_exclude = some text here

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