Monday, December 20, 2010
Steps to create long texts using SE91 transaction
  • Go to SE91.
  • Give ZTST as class and click on CREATE button.
  • Select message number 000 and uncheck check box for Self-Explanat'y.
  • Click LONG TEXT button on application toolbar.
  • It takes you to the another window. Enter long text there. Save and Activate and comeback to Message maintenance screen.
  • Save and exit the screen.
Read long text entered in SE91
REPORT ztest_notepad.
DATA:
g_lines  LIKE sy-tabix,
it_tline LIKE tline OCCURS 0 WITH HEADER LINE,
it_dokhl LIKE dokhl OCCURS 0 WITH HEADER LINE.

START-OF-SELECTION.
SELECT *
FROM dokhl
INTO TABLE it_dokhl
WHERE id     = 'NA'      "This ID is common for all TEXT objects which are created in SE91
AND object = 'ZTST000' "This is combination of message class(ZTST)+message number(000)
AND langu  = sy-langu
AND typ    = 'E'.
IF sy-subrc = 0.
DESCRIBE TABLE it_dokhl LINES g_lines.
READ TABLE it_dokhl INDEX g_lines.
ENDIF.

CALL FUNCTION 'DOCU_READ'
EXPORTING
id      = it_dokhl-id
langu   = it_dokhl-langu
object  = it_dokhl-object
typ     = it_dokhl-typ
version = it_dokhl-dokversion
TABLES
line    = it_tline.

LOOP AT it_tline .
WRITE it_tline.
ENDLOOP. 

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.