cancel
Showing results for 
Search instead for 
Did you mean: 

How to read long text for document in QI02

former_member210804
Active Participant
0 Kudos

Hi Experts,

I have maintained long text for document in QI02.  I want to fetch the text. Please check the below screenshot for maintaining long text.

Once we click on the long text button, we will get the below screen.

I am able to fetch the description ('Testing') but unable to fetch 'Document test' text. Please let me know your inputs how we can read this text.


Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi ,

I am not sure if the text what you are referring here are stored in SAP table.I think those are links of the document type selected.

Please check if the long text maintained by you have any specific text id assigned to it.

open the long text then from header menu in top Go to ---> Header

text header window will be displayed . See here if you have any specific text id here.

Then make use of function module READ_TEXT to fetch the long text.

Thanks,

former_member210804
Active Participant
0 Kudos

Hi Amol,

Issue resolved. Please look at the code below.

DATA: LS_DRAD  TYPE DRAD,

             LS_THEAD TYPE THEAD.

DATA: S_DRAD TYPE DRAD.

  LS_DRAD-DOKOB        = 'QINF'.

     LS_DRAD-OBJKY+0(18= EX_QINF-MATNR.

     LS_DRAD-OBJKY+18(10) = EX_QINF-ZAEHL.

     SELECT SINGLE * FROM DRAD INTO S_DRAD

                               WHERE DOKOB = LS_DRAD-DOKOB

                                AND  OBJKY = LS_DRAD-OBJKY.


*****Q-Info record description

       LS_THEAD-TDID = 'LTXT'.

       LS_THEAD-TDSPRAS = SY-LANGU.

       LS_THEAD-TDOBJECT = 'DRAD'.

       LS_THEAD-TDNAME   = S_DRAD-LONGTEXT_ID.

       CALL FUNCTION 'READ_TEXT'

         EXPORTING

*         CLIENT   = SY-MANDT

           ID       = LS_THEAD-TDID

           LANGUAGE = LS_THEAD-TDSPRAS

           NAME     = LS_THEAD-TDNAME

           OBJECT   = LS_THEAD-TDOBJECT

*         ARCHIVE_HANDLE                = 0

*         LOCAL_CAT                     = ' '

*       IMPORTING

*         HEADER   =

*         OLD_LINE_COUNTER              =

         TABLES

           LINES    = DOCU_DESCR

*       EXCEPTIONS

*         ID       = 1

*         LANGUAGE = 2

*         NAME     = 3

*         NOT_FOUND                     = 4

*         OBJECT   = 5

*         REFERENCE_CHECK               = 6

*         WRONG_ACCESS_TO_ARCHIVE       = 7

*         OTHERS   = 8

         .

0 Kudos

Hi ,

Glad to know your issue is resolved. Please mark your question as answered.

Thanks,

Amol