Skip to Content
0
Jul 29, 2005 at 02:12 AM

text data extract

157 Views

Hi,

I have to extract a text data regarding bill of lading. I have already used the following code for extracting basic data text from material master.

TABLES:

STXH.

DATA:

TDNAME LIKE STXH-TDNAME,

MYLINE LIKE TLINE-TDLINE,

ZE13_LINE(1200) TYPE C.

DATA:BEGIN OF LINES OCCURS 0.

INCLUDE STRUCTURE TLINE.

DATA:END OF LINES.

DATA:BEGIN OF MYHEADER.

INCLUDE STRUCTURE THEAD.

DATA:END OF MYHEADER.

CLEAR ZBASICTEXT.

CLEAR TDNAME.

*CONCATENATE '000000000000'

*MARA-MATNR

MOVE MVKE-MVGR4

TO TDNAME.

*MOVE 'AF'

*TO SY-LANGU.

*MOVE TDNAME TO ZZTDNAME.

CALL FUNCTION 'READ_TEXT'

EXPORTING

ID = 'YBOL'

LANGUAGE = SY-LANGU

NAME = TDNAME

OBJECT = 'TEXT'

IMPORTING

HEADER = MYHEADER

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.

LOOP AT LINES.

MOVE LINES-TDLINE(132) TO ZBASICTEXT."myline.

EXIT.

ENDLOOP.

End If.

Here the last line extracts only 132 characters, but however the Bill of Lading text is 10 line paragraph.So can somebody explain how to extract that data. Also I am using this code in ABAP Query for a field.

I appreciate your help.