Skip to Content
-2
May 13, 2018 at 05:48 AM

problem in the abap cod for READ_TEXT FM SQ02 - outbound delivery header text

330 Views

Hi

I am trying to read some text from outbound delivery header text a query.

in the FM : READ_TEXT parameters are like this :

result of READ_TEXT

for this in the SQ02 I joined the STXL and STXH

then added the additional field by this code

DATA: BEGIN OF HTEXT OCCURS 50.
INCLUDE STRUCTURE THEAD.
DATA END OF HTEXT.
DATA: BEGIN OF T_READ_LINE OCCURS 50.
INCLUDE STRUCTURE TLINE.
DATA: END OF T_READ_LINE.
READ TABLE T_READ_LINE INDEX 4. "read the line value

DATA: TDNAME like STXH-TDNAME,
gs_lines TYPE tline,
Textclient type String.

CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'Z007'
LANGUAGE = '멡'
NAME = TDNAME
OBJECT = 'VBBK'
IMPORTING
HEADER = HTEXT
TABLES
LINES = T_READ_LINE
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.
CLEAR gs_lines.
LOOP AT T_read_line INTO gs_lines.
Concatenate textclient gs_lines-tdline into textclient .
ENDLOOP.
ENDIF.

but it doesn't work???. result of SQ01:

Attachments

capture2.jpg (57.4 kB)
capture2.jpg (16.2 kB)
capture.jpg (44.4 kB)
capture1.jpg (33.3 kB)
capture.jpg (33.2 kB)