SAP Function Modules

FI_TEXTS_DOCUMENT SAP Function module







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

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


Pattern for FM FI_TEXTS_DOCUMENT - FI TEXTS DOCUMENT





CALL FUNCTION 'FI_TEXTS_DOCUMENT' "
  EXPORTING
*   i_aktyp = SPACE             " t020-aktyp    Transaction type
*   i_aktyp = SPACE             " t020-aktyp    Transaction type
    i_belnr =                   " bkpf-belnr    Number of the financial accounting
    i_belnr =                   " bkpf-belnr    Number of the financial accounting document
*   i_blart = SPACE             " bkpf-blart
*   i_bukrs = SPACE             " t001-bukrs    Company code
*   i_bukrs = SPACE             " t001-bukrs    Company code
*   i_check = SPACE             " rf02l-xneua   X - only test, whether texts are a
*   i_check = SPACE             " rf02l-xneua   X - only test whether texts are available
*   i_dyncl = SPACE             " t020-dyncl    Screen class
*   i_dyncl = SPACE             " t020-dyncl    Screen Class
    i_gjahr =                   " bkpf-gjahr    Fiscal year
    i_gjahr =                   " bkpf-gjahr    Fiscal year
    i_object =                  " ttxob-tdobject  Text object
    i_object =                  " ttxob-tdobject  Text object
*   i_give_back_ids =           " boole-boole
*   i_clear_xupd = SPACE        " boole-boole
  IMPORTING
    e_update =                  " rtext-updkz
* TABLES
*   t_tdid =                    " ttxid
*   t_accdn =                   " accdn
  EXCEPTIONS
    NO_TEXTS_FOUND = 1          "               No texts found (only for I_CHECK = 'x')
    INCORRECT_OBJECT = 2        "
    .  "  FI_TEXTS_DOCUMENT

ABAP code example for Function Module FI_TEXTS_DOCUMENT





The ABAP code below is a full code listing to execute function module FI_TEXTS_DOCUMENT 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_update  TYPE RTEXT-UPDKZ ,
it_t_tdid  TYPE STANDARD TABLE OF TTXID,"TABLES PARAM
wa_t_tdid  LIKE LINE OF it_t_tdid ,
it_t_accdn  TYPE STANDARD TABLE OF ACCDN,"TABLES PARAM
wa_t_accdn  LIKE LINE OF it_t_accdn .


SELECT single AKTYP
FROM T020
INTO @DATA(ld_i_aktyp).


SELECT single AKTYP
FROM T020
INTO @DATA(ld_i_aktyp).


SELECT single BELNR
FROM BKPF
INTO @DATA(ld_i_belnr).


SELECT single BELNR
FROM BKPF
INTO @DATA(ld_i_belnr).


SELECT single BLART
FROM BKPF
INTO @DATA(ld_i_blart).


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


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


DATA(ld_i_check) = some text here

DATA(ld_i_check) = some text here

SELECT single DYNCL
FROM T020
INTO @DATA(ld_i_dyncl).


SELECT single DYNCL
FROM T020
INTO @DATA(ld_i_dyncl).


SELECT single GJAHR
FROM BKPF
INTO @DATA(ld_i_gjahr).


SELECT single GJAHR
FROM BKPF
INTO @DATA(ld_i_gjahr).


SELECT single TDOBJECT
FROM TTXOB
INTO @DATA(ld_i_object).


SELECT single TDOBJECT
FROM TTXOB
INTO @DATA(ld_i_object).


DATA(ld_i_give_back_ids) = some text here

DATA(ld_i_clear_xupd) = some text here

"populate fields of struture and append to itab
append wa_t_tdid to it_t_tdid.

"populate fields of struture and append to itab
append wa_t_accdn to it_t_accdn. . CALL FUNCTION 'FI_TEXTS_DOCUMENT' EXPORTING * i_aktyp = ld_i_aktyp * i_aktyp = ld_i_aktyp i_belnr = ld_i_belnr i_belnr = ld_i_belnr * i_blart = ld_i_blart * i_bukrs = ld_i_bukrs * i_bukrs = ld_i_bukrs * i_check = ld_i_check * i_check = ld_i_check * i_dyncl = ld_i_dyncl * i_dyncl = ld_i_dyncl i_gjahr = ld_i_gjahr i_gjahr = ld_i_gjahr i_object = ld_i_object i_object = ld_i_object * i_give_back_ids = ld_i_give_back_ids * i_clear_xupd = ld_i_clear_xupd IMPORTING e_update = ld_e_update * TABLES * t_tdid = it_t_tdid * t_accdn = it_t_accdn EXCEPTIONS NO_TEXTS_FOUND = 1 INCORRECT_OBJECT = 2 . " FI_TEXTS_DOCUMENT
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_e_update  TYPE RTEXT-UPDKZ ,
ld_i_aktyp  TYPE T020-AKTYP ,
ld_i_aktyp  TYPE T020-AKTYP ,
it_t_tdid  TYPE STANDARD TABLE OF TTXID ,
wa_t_tdid  LIKE LINE OF it_t_tdid,
ld_i_belnr  TYPE BKPF-BELNR ,
ld_i_belnr  TYPE BKPF-BELNR ,
it_t_accdn  TYPE STANDARD TABLE OF ACCDN ,
wa_t_accdn  LIKE LINE OF it_t_accdn,
ld_i_blart  TYPE BKPF-BLART ,
ld_i_bukrs  TYPE T001-BUKRS ,
ld_i_bukrs  TYPE T001-BUKRS ,
ld_i_check  TYPE RF02L-XNEUA ,
ld_i_check  TYPE RF02L-XNEUA ,
ld_i_dyncl  TYPE T020-DYNCL ,
ld_i_dyncl  TYPE T020-DYNCL ,
ld_i_gjahr  TYPE BKPF-GJAHR ,
ld_i_gjahr  TYPE BKPF-GJAHR ,
ld_i_object  TYPE TTXOB-TDOBJECT ,
ld_i_object  TYPE TTXOB-TDOBJECT ,
ld_i_give_back_ids  TYPE BOOLE-BOOLE ,
ld_i_clear_xupd  TYPE BOOLE-BOOLE .


SELECT single AKTYP
FROM T020
INTO ld_i_aktyp.


SELECT single AKTYP
FROM T020
INTO ld_i_aktyp.


"populate fields of struture and append to itab
append wa_t_tdid to it_t_tdid.

SELECT single BELNR
FROM BKPF
INTO ld_i_belnr.


SELECT single BELNR
FROM BKPF
INTO ld_i_belnr.


"populate fields of struture and append to itab
append wa_t_accdn to it_t_accdn.

SELECT single BLART
FROM BKPF
INTO ld_i_blart.


SELECT single BUKRS
FROM T001
INTO ld_i_bukrs.


SELECT single BUKRS
FROM T001
INTO ld_i_bukrs.


ld_i_check = some text here

ld_i_check = some text here

SELECT single DYNCL
FROM T020
INTO ld_i_dyncl.


SELECT single DYNCL
FROM T020
INTO ld_i_dyncl.


SELECT single GJAHR
FROM BKPF
INTO ld_i_gjahr.


SELECT single GJAHR
FROM BKPF
INTO ld_i_gjahr.


SELECT single TDOBJECT
FROM TTXOB
INTO ld_i_object.


SELECT single TDOBJECT
FROM TTXOB
INTO ld_i_object.


ld_i_give_back_ids = some text here

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