Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Function module READ_TEXT related problem

Hi all,

i am using READ_TEXT function module to read long text for line items, i have used these code lines

which is giving whole text in debugging but it is in splitted lines, so if i have lets say three line items

and my first line items contains a very long text then it splits into three lines, and unfortunately when i'm

using these long text to get printed in my smartforms ,it only printing some text from last.

My code is written below, please anybody tell me the required changes i have to perform

here to get whole long text (i am using command  &WA_FINAL-TXZ05& to print the long text and TXZ05 is of type

tline-tdline).I know tline-tdline can hold only 132 char length, so not getting how could i achieve this.

DATA:BEGIN OF DT_LINES OCCURS 0,

     TDFORMAT LIKE TLINE-TDFORMAT,

     TDLINE LIKE TLINE-TDLINE.

DATA:END OF DT_LINES.

LOOP AT it_final INTO wa_final.

CONCATENATE WA_FINAL-EBELN WA_FINAL-EBELP INTO V_NAM.

CALL FUNCTION 'READ_TEXT'

       EXPORTING

*   CLIENT                        = SY-MANDT

         ID                            = 'A01'

         LANGUAGE                      = SY-LANGU

         NAME                          = V_NAM

         OBJECT                        = 'EKPO'

*   ARCHIVE_HANDLE                = 0

*   LOCAL_CAT                     = ' '

* IMPORTING

*   HEADER                        =

       TABLES

         LINES                         = DT_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.

CLEAR DS_LINES.

LOOP AT DT_LINES INTO DS_LINES.

   WA_FINAL-TXZ05 = DS_LINES-TDLINE.

   MODIFY IT_FINAL FROM WA_FINAL TRANSPORTING TXZ05 .

ENDLOOP.

ENDLOOP.

Former Member
Former Member replied

Hi-

In is what I have found. you have created text cell under the loop for it_req it should be inside the loop and not under the loop.

Below screen shot is of your uploaded form:

What you need to do is create inside the loop, right click on loop -> Create -> Text. This will insert text cell inside the loop and here try to pass text details.

This change needs to be done only if you are using it_req to display text. No changes required if you are using include text.

Good Luck!!

-Venkat

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question