Skip to Content
author's profile photo Former Member
Former Member

Problem in reading long text

Hi All,

for reading long text , for the description of a material i am using

READ_TEXT function module, but the problem is for a single PO,

there may have many line items, and the texts can be of any length,

I have to print it in my smartforms, where i may have many PO's

and its related any no of line items.

Now the problem is that, through READ_TEXT, it is showing

only one line (probably upto 255 char long text).

But my texts could be so long, that it may splits into many lines,

So please tell me how could i get the long text for each line items

of all PO.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    Posted on Jan 07, 2014 at 05:42 AM

    Hi Srikant,

    please create a structure in your program, with a variable of type string, ebeln, ebelp ,

    and declare these code

    data:begin of dt_lines occurs 0,

    tdformat like tline-tdformat,

    tdline like tline-tdline,

    data:end of dt_lines.

    Again, create a internal table of the same type as of the structure created earlier,

    lets say the internal table is it_tab1,

    then collect all these stuff in the internal table and, inside the text in your smartforms

    loop into the internal table, you have created, you will get the desired result.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 09:41 AM

    Smartforms can solve it for you, don't use READ_TEXT but create a TEXT node of type "I Include text"

    Regards,

    Raymond


    pastedImage_2.png (42.0 kB)
    pastedImage_0.png (50.8 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2014 at 05:28 AM

    Hi,

    Your READ_TEXT FM returns the tables parameters lines.

    data item_text(500) your varaible to display in form

    LOOP at i_lines

    CONCATENATE item_text i_lines-tdline into item_text

    separated by space.

    endloop.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Srikant

      It depens on at what place you are determining the text. If you are determining it before loop of MAIN table then you need PO line item so that you can print the test for that line item. If you are determining it inside loop for each line item then you only need to do read_text and proceed ahead

      Nabheet

  • Posted on Jan 07, 2014 at 05:17 AM

    READ_TEXT returns internal table "lines" which contains the whole text, so looping through the table will give all the text. However, smartforms also give option of "include text" in text node where you can give text name as variable, text object and text id and the long text is printed accordingly.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2014 at 05:37 AM


    Hi,

    you can define a variant with STRING type. Then using Kumar's suggestion loop the internal table and concatenate the lines to the variant.

    Hope it help you.

    Yawa

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 06:09 AM

    HIII,

    data: v_lines2 type table of ty_tline,
    w_lines2 type ty_tline.
    data: v_name2 type stxh-tdname,
    tdspras2 type stxh-tdspras,
    tdid2 type stxh-tdid,
    tdobject2 type stxh-tdobject.


    data: text type CHAR1000.

    tdobject2 = 'EKKO'.
    tdid2 = 'F01'.
    tdspras2 = 'EN'.
    v_name2 = '5500000012'.

    call function 'READ_TEXT'
    exporting
    id = tdid2
    language = tdspras2
    name = v_name2
    object = tdobject2
    tables
    lines = v_lines2
    exceptions
    id = 1
    language = 2
    name = 3
    not_found = 4
    object = 5
    reference_check = 6
    wrong_access_to_archive = 7
    others = 8.


    loop at v_lines2 into w_lines2.
    concatenate TEXT w_lines2-tdline into TEXT separated by space.
    condense TEXT.
    endloop.



    This may helps u....

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.