profile="http://gmpg.org/xfn/11"> SAP ABAP – Reading text module in report | Mayusha K M lesheet" type="text/css" href="//www.mayusha.in/wp-content/cache/wpfc-minified/24746ab242302dc413f928c6caf8ca0f/144468076 0index.css" media="all"/> >> ument,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-56680806-1', 'auto'); ga('send', 'pageview');

SAP ABAP – Reading text module in report

In SAP ABAP we can read the TEXT module in our report using the function module SSFRT_READ_TEXTMODULE. Suppose I have one text module say Z_TEXT01 and now I need to read this text module inside one report , that can be done as follows:

Z_TEXT01 = ‘This is a sample program for text module read and display.’

REPORT ytest_km.

DATA i_textmodule TYPE tdsfname VALUE ‘Z_TEXT01’,
lang_vector  TYPE ssfrlang,
res_lang     TYPE spras,
i_language   TYPE spras,
it_txtmodul  TYPE tsftext,
x_line       TYPE tline.

i_language sylangu.
lang_vectorlangu1 ‘E’“Adding language key

CALL FUNCTION ‘SSFRT_READ_TEXTMODULE’
EXPORTING
i_textmodule i_textmodule
i_languages  lang_vector
IMPORTING
o_langu      res_lang     “Resulting language
o_text       it_txtmodul  “This table willcontains the text
EXCEPTIONS
error        1
OTHERS       2.

IF sysubrc EQ AND i_language res_lang.
LOOP AT it_txtmodul INTO x_line.
WRITE x_line.
ENDLOOP.
ENDIF.

 

Output:

This is a sample program for text module read and display.

0 Comments

Leave A Reply