Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using READ_TEXT function module...

Former Member
0 Kudos

Hi,

I am trying to read a standard text using function module READ_TEXT.

In that function module we have a table parameter called lines which fetches the data in it.

DATA: DATA:lt_lines LIKE tline OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = 'ST'

language = 'EN'

name = 'ZPACKING_SLIP_Description'

object = 'TEXT'

TABLES

lines = lt_lines

EXCEPTIONS

OTHERS = 8.

DATA: T_PACKING_SLIP_Description TYPE CHAR600.

T_PACKING_SLIP = lt_lines-tdline.

<b>But the problem is the data in the standard text is very big around 600 characters hence it gets cut since the tline-tdline character length is just 132 as defined in standard structure tline.</b>

Please tell me how do I handle this issue. I want the whole standard text to get fetched and not just 132 length.

6 REPLIES 6

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Wow, I would suggest makeing your text within 132 characters per line. I'm not sure what the sense is of having it 600. THis wouldn't fit on a page anyway.

Regards,

Rich Heilman

0 Kudos

Rich,

Absolutely.

0 Kudos

Actually I should have been more clear.

The whole standard text is of around 600 char. But its not like like in one complete line. Its splitted in different lines.

I guess I need to loop at internal table or contatenate the internal table.

Thanks.

Regards,

Tushar.

0 Kudos

Hi,

Yes you need to concatenate the all the lines , if you pass the parameters you will get all the text into it_tline table , loop that table and concatenate all the text.

Regards

vijay

0 Kudos

Yes, the return parameter LINES is an internal table, the text will be returned in multiple rows. You will need to loop at that internal table and process accordingly.

I thought that text with line size of 600 was a little strange.

Regards,

Rich Heilman

Former Member
0 Kudos

Tushar,

If you have a lot of text you can use a word wrap function to put it into line of a size you specify.

Function: RKD_WORD_WRAP and set OUTPUTLEN = 132. Detault in 35 characters.

Regards

David