Application Development and Automation 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: 
Read only

maximum output length from read_text function module....?

former_member220286
Participant
0 Likes
4,512

hi i want to know the maximum output length coming from read function module.

i am trying to print the header text of invoice but i canot get more than  132 characters.

i am using this fm in smart form in program lines....

9 REPLIES 9
Read only

Former Member
0 Likes
2,721

The structure tline is used by the fm to return the text. tline-tdline is length 132 characters so I guess that is the maximum it is going to return.

Read only

Former Member
0 Likes
2,721

Hi,

under detail of structure tline

TDFORMAT 1 Type TDFORMAT CHAR 2 0 Colonna formato

TDLINE 1 Type TDLINE CHAR 132 0 Riga testo

So, maximum length is 132 char

Regards

Ivan

Read only

0 Likes
2,721

how many lines we can  append with READ_TEXT FUNCTION MODULE.....

Read only

0 Likes
2,721

Hi DEEPAK BISHT

Length is 132 only

Read_text fm will return all the values in tline

there you put a loop and append it some other internal table as per your requirement

for your info see the below screen shot also read the documentation for that fm


Read only

0 Likes
2,721

Hi,

table contains all text lines belonging to a text module.

I think that there are not lines limitation.

Regards

Ivan

Read only

0 Likes
2,721

Hi Deepak,

It is an internal table with 132 characters per line.

Similar to an Internal table it has no limitation to the maximum number of lines

For more Information create a text in SO10 and read the same with the FM you will have a better idea.

Regards,

Yakub Shah

Read only

venkateswaran_k
Active Contributor
0 Likes
2,721

Hello Deepak,

The READ_TEXT will return you as a table of TD_LINE  where each line is 132 char length.

So the maximum length as you see number of lines it returns....

Regards,

Venkat

Read only

former_member209120
Active Contributor
0 Likes
2,721

Hi Deepak,

Out put length of read_text fm is 132 char  you can check like this

using abap code you can get header text, 

Try like this

CALL FUNCTION 'READ_TEXT'
EXPORTING
client   = sy-mandt
id       = ls_stxl-tdid
language = sy-langu
name     = ls_stxl-tdname
object   =
'EKPO '
TABLES
lines    = it_lines.
*    IF sy-subrc <> 0.
**  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
**          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*    ENDIF.

DATA : v_line TYPE string.
LOOP AT it_lines INTO ls_lines.
CONCATENATE  v_line ls_lines-tdline INTO v_line.
ENDLOOP.

Regards,

Ramesh.T


Read only

Former Member
0 Likes
2,721

Use Include Text Node instead of READ_TEXT function; it could save your time. Just identify:

  • Text name = <Invoice Number> (surround by &; e.g. &0900000001&)
  • Text object = VBBK
  • Text ID = <should give by your consultant>

Don't forget to check on box "No error if no text exists".