Skip to Content
-2

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

May 13 at 05:48 AM

103

avatar image

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:

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Rajkumar Narasimman May 13 at 06:24 AM
1

Hi Ali,

After cheking your above code, it looks for variable TDNAME value is not passed in READ_TEXT Function. Kindly check and pass the pass the value for TDNAME variable. Even after passing the value, if still problem exists use conversion exit to fill zeros for variable TDNAME. Use debugger for better troubleshooting.

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

DATA L_VBLNR TYPE VBELN_VF. 
L_VBLNR = '12345566'.    "Assign value

"Conversion exit to fill zero
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = L_VBLNR
     IMPORTING
       OUTPUT        = L_VBLNR.

"Assign value
TDNAME = L_VBLNR.

CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'Z007'
LANGUAGE = '멡'
NAME = TDNAME
OBJECT = 'VBBK'

Share
10 |10000 characters needed characters left characters exceeded
ali khojaloo May 13 at 06:43 AM
-2

I don't know much about ABAP debugging. How should I debug the infoset?

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi May 14 at 08:53 AM
0
  • What's your SAP version (with Farsi language installed)
  • Which value does FM CONVERSION_EXIT_ISOLA_INPUT return with input = 'FA' ([U+BA61])
  • Which exception is raised by READ_TEXT
Share
10 |10000 characters needed characters left characters exceeded