Hi All,
I am using the FM Read_Text for reading text from S010 but its behaving strangely. With the same data if i execute the FM in SE37 transaction, i am getting proper results but while executing in ABAP , its not returning any data as well as no exception. Below is the code written, please suggest if i am lacking something.
DATA BEGIN OF TEXTHEADER.
INCLUDE STRUCTURE THEAD.
DATA END OF TEXTHEADER.
DATA BEGIN OF LINES OCCURS 10.
INCLUDE STRUCTURE TLINE.
DATA END OF LINES.
DATA: name like THEAD-TDNAME,
object LIKE THEAD-TDOBJECT,
ID like THEAD-TDID.
CLEAR TEXTHEADER.
ID = '0001'.
name = GS_HD_REF-ORDER_NUMB.
object = 'VBBK'.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = ID
language = sy-langu
name = name
object = object
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
IMPORTING
HEADER = TEXTHEADER
tables
lines = lines
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.
I checked the values while debugging & executed the FM with same values in SE37 which displays the correct results but in the program i am not getting any results.
regards
Sumit