Skip to Content
0
Former Member
Jun 21, 2007 at 10:05 AM

read_text help

20 Views

hi all,

can anyone plz tell me how to use read_text in sap script. i have used as follows in my print program.how can i define my field in sap script. can anyone help me out when i am using this code i get run time error where is the correct location i have to use in my code i am using it with my select statement.

DATA: BEGIN OF CLITEXT OCCURS 0.

INCLUDE STRUCTURE TLINE.

DATA: END OF CLITEXT.

DATA : W_CLITEXT LIKE TLINE-TDLINE.

LOOP AT IT_HEADER.

CLEAR W_CLITEXT .

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID = '0004'

LANGUAGE = SY-LANGU

NAME = SY-UNAME

OBJECT = 'VBBP'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES = CLITEXT

  • EXCEPTIONS

  • ID = 1

  • LANGUAGE = 2

  • NAME = 3

  • NOT_FOUND = 4

  • OBJECT = 5

  • REFERENCE_CHECK = 6

  • WRONG_ACCESS_TO_ARCHIVE = 7

  • OTHERS = 8

.

  • IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

MOVE CLITEXT-TDLINE TO W_CLITEXT .