Display long text in an ABAP Query.

Hi all,
Could any one please help me in guiding me, to tell how can I display the long text which is got from the function module 'READ_TEXT'  in an ABAP query.
The issue here is that Iam able to loop at the <itab> table and get the long text for each of the records any, but Iam not able to display it on an infoset..
Send me the examples if any..
Thanks & Regards,
Sanjay Mankar.

Dear dont try with ABAP Qualry
use alv or like that
sample code is attach here
if you have any claryfication reply me
*&      Form  F001-BasicData_LText
      text
     -->IN_PAR     text
     -->OUT_PAR    text
FORM F001-BasicData_LText TABLES in_par  STRUCTURE itcsy out_par STRUCTURE itcsy.
  DATA :
       IT_LTEXT       TYPE STANDARD TABLE OF TLINE,
       WA_LTEXT       TYPE TLINE,
       W_FTEXT(100)   TYPE   C,
       W_FTEXT1(100)  TYPE   C,LW_LEN TYPE I.
  DATA :
       W_ID          LIKE thead-tdid,                  "Text ID
       W_LANGU       LIKE THEAD-TDSPRAS,              "Language
       W_NAME        LIKE thead-tdname,                "Name
       W_OBJECT      LIKE thead-tdobject.              "Texts:
  READ TABLE in_par WITH KEY 'EKPO-MATNR'.
    w_NAME = in_par-value.
  W_ID      =  'GRUN'.
  W_OBJECT  =  'MATERIAL'.
  W_LANGU   =  SY-LANGU.
  CALL FUNCTION 'READ_TEXT'
    EXPORTING
      ID                      = W_ID
      LANGUAGE                = W_LANGU
      NAME                    = W_NAME
      OBJECT                  = W_OBJECT
    TABLES
      lines                   = IT_LTEXT
    EXCEPTIONS
      id                      = 1
      language                = 2
      name                    = 3
      not_found               = 4
      object                  = 5
      reference_check         = 6
      wrong_access_to_archive = 7
      OTHERS                  = 8.
  Loop at IT_LTEXT into WA_LTEXT.
    W_FTEXT1 = WA_LTEXT-TDLINE.
    CONCATENATE W_FTEXT W_FTEXT1 INTO W_FTEXT SEPARATED BY SPACE.
  Endloop.
LOOP AT out_par WHERE name EQ 'W_FTEXT'.
      out_par-value = W_FTEXT.
      MODIFY out_par.
    ENDLOOP.
ENDFORM.                    "F001-BasicData_LText
*&      Form  F001-LTEXT_DEVIDING
      text
     -->P_IT_DVTXT  text
FORM F001-LTEXT_DEVIDING TABLES in_par  STRUCTURE itcsy out_par STRUCTURE itcsy.
DATA : W_TEXTLINE(100)    TYPE  C,
       W_DELIMITER        TYPE  C,
       W_OUTPUTLEN        TYPE  I,
       W_FTEXT(100)       TYPE  C,
       OUT_LINE1          TYPE  C,
       OUT_LINE2          TYPE  C,
       OUT_LINE3          TYPE  C,
       W_LINE1(35)        TYPE  C,
       W_LINE2(35)        TYPE  C,
       W_LINE3(35)        TYPE  C.
  READ TABLE in_par WITH KEY 'W_FTEXT'.
      W_FTEXT = IN_PAR-VALUE.
      W_TEXTLINE   = W_FTEXT.
      W_DELIMITER  = ' '.
      W_OUTPUTLEN  = 30.
  CALL FUNCTION 'RKD_WORD_WRAP'
    EXPORTING
      TEXTLINE    = W_TEXTLINE
      DELIMITER   = W_DELIMITER
      OUTPUTLEN   = W_OUTPUTLEN
    IMPORTING
        OUT_LINE1 = W_LINE1
        OUT_LINE2 = W_LINE2
        OUT_LINE3 = W_LINE3.
  LOOP AT out_par.
    if out_par-name eq 'W_LINE1'.
    out_par-value = W_LINE1.
      elseif out_par-name eq 'W_LINE2'.
      out_par-value = W_LINE2.
        elseif out_par-name eq 'W_LINE3'.
        out_par-value = W_LINE3.
    endif.
  MODIFY out_par.
  ENDLOOP.
ENDFORM.                    " F001-LTEXT_DEVIDING
rewads if helpful

Similar Messages

  • Display long text of characteristic in Query name

    Hi All,
    I have implemented RRI between my sender and receiver query.
    When user will click on WBS Element in my sender query <b>the receiver query name will be the name of that WBS Element.</b>
    After execution,I am able to see the Short text associated with Characteristic WBS ELement but<b> i want to display Long text of WBS Element in Receiver query name</b>.
    I have tried to implement the same logic as suggested by Bhanu in following blog:
    <u>Variable screen in Web report</u>
    Kindly,suggest the appropriate solution for this issue.
    Thanks in advance.

    Hi All,
    I am still facing the same problem.
    Kindly suggest me the appropriate solution for displaying WBS Element's Long Text in Receiver's Query Name.
    Thanks in advance.
    Best Regards,
    Nilima Rodrigues

  • How to display long text in smartforms

    Hi experts,
    Iam trying to display long text into smartforms.I got the long text into ITAB frm database
    in the abap program.In the form interface how to define the variable?In the long text i have 6 lines.
    points guaranteed
    cheers
    kaki

    Kaki,
    Delcare a table and getting the LONG TEXT is not the right way of doing this.
    You create a TEXT object and change the TYPE to INCLUDE TEXT. Once that is done all you have to do specify the parameters of your long text - TEXT ID, TEXT OBJECT and TEXT NAME. These are the same parameters that you use for READ_TEXT funciton. You don't have to fetch the text manually, it happens automatically.
    Make sure this is a part of the main window as this might run into multiple pages.
    Regards,
    Ravi
    Note : Please reward the posts that help you.

  • Crystal Report for Enterprise not displaying Long Text from BEx

    Hello,
    I am creating a report using SAP Crystal Report for Enterprise 4.0 (Version 14.0.2) and the source of data is BEx query via OLAP connection created using IDT. I am using SAP BusinessObjects BI platform 4.0.
    The Characteristic (which is hierarchy) in the Rows section of the BEx Query is set to display long text and as such, it displays long text when the query is executed in the BEx Analyzer. However, when it comes to Crystal Report, the short text is displayed in the report. Can I display long text in the Crystal Report? How?
    Thanks,
    KP

    Venkat,
    Thanks for your response. Please note, however, the transaction RAD1 does not exist. Let me provide more details about the current settings of the InfoObject.
    The Characteristic is 'Item' (0CS_ITEM) and upon going to RSA1 >  Modeling > InfoObjects > Item (0CS_ITEM) > Right Click > Display > Business Explorer (tab) > Text Type is set to 'Long Text' and BEx description is set to 'Long description' already.
    When I run/execute the query with this Item characteristic, the results in BEx Analyzer is showing appropriate long text, however, Crystal Report for Enterprise shows short text only
    K
    Edited by: Kumar Pathak on Feb 3, 2012 6:18 PM

  • How to display Long text in a JLabel with multiline??

    Hi,
    Suppose I have a label that displays a long text....
    ""This is an example label that displays long text, how to break the line????.........""
    how to display it like below with one label?
    ""This is an example label
    that displays long text, how
    to break the line????.........""
    Thanks

    so basically do this
    JLabel myLabel = new JLabel();
    String theText = "<html>This is an example label<br>
                                  that displays long text, how<br>
                                  to break the line????.........</html>";
    myLabel.setText(theText);Obivously, u dont have to use a separate string, u could just call setText or pass it into the JLabel constructor, i just separated it to make it easier to see what your supposed to do.
    GOod Luck

  • How to display Long text in alv output

    Hi,
    I have developed an ALV report.It is displaying the output.
    There is another requirment for alv output text field as below
    From the long text fields show only the first 20 characters and afterwards the long text icon. If the icon is clicked open the long text display screen.
    Please give your suggestion how to work on this requirement.
    Thanks in advance

    Hi,
    Create a hotspot for the long text column of ALV.
    When user clicks on the hotspot, handle the event to display long text screen.
    You may refer sample program of hotspot ALV :
    Goto SE38
    Type BCALV*
    Click F4
    search for HOTSPOT or EVENTS & you will get a sample program.
    Best regards,
    Prashant

  • How to display long text in alv

    Hi ,
    I need to display the long text of particular object on ALV, with 30 char each line .
    I have long text in one internal table, master table have one to maany relation with longtext table and long text contains 120 character in each line.
    i need to display long text using 30 char in each line on alv. could you please suggest the soution ????
    format is like
    ponumber date         longtext 
        1234    03/04/05   this is PO is created
                                  for materail which have
                                  shortage in plant.

    hope u r expecting this..
    optimize = 'X'
    if u use OUTPUTLEN it is fixed size for that specific field, and also it reflects for next fields, to avoid that again have to mention OUTPUTLEN = 'X' for next field.
    With OPTIMIZE = 'X'  it will adjust based on the size.
    regards...
    santhosh reddy
    Message was edited by:
            Santhosh Reddy

  • How to display  LONG TEXT STRING in Module Pool Screen ?

    Hi Experts,
    I want to display long text string, on screen designed through module pool(SE51). I tried to display through input/output field , but it displays it in SINGLE LINE and i have to scroll all through to view all string.
    I want to display it in rectangular format . It doesnt allow me to set HEIGHT of component.
    Please provide solution.
    Thanks in advance.
    Regards
    Deepak

    This is the program where u can get the WA_THEAD from other program like report and trying to display and modifying that text. U can do instead of WA_THEAD u can generate here itself and use also
    *& Module pool       ZMP_LTEXT                                         *
    PROGRAM  ZMP_LTEXT                               .
    TABLES: STXL.
    *&      Module  STATUS_9000  OUTPUT
    MODULE STATUS_9000 OUTPUT.
    CONSTANTS:line_length type i value 132.
    DATA:g_editor type ref to cl_gui_textedit,
         g_editor_container type ref to cl_gui_custom_container,
         CONT1 type scrfname value 'CONT1',
         g_repid like sy-repid,
         g_ok_code like sy-ucomm,
         g_mytable(132) type c occurs 0,
         g_mycontainer(30) type c ,
         v_result(256) type c,
         g_head like thead,
         it_line type table of tline with header line,
         wa_stxl type stxl.
    DATA : BEGIN OF IT_THEAD1,
           ICON TYPE ICON-ID.
           INCLUDE STRUCTURE STXL.
    DATA : END OF IT_THEAD1.
    DATA : IT_THEAD LIKE TABLE OF IT_THEAD1,
           WA_THEAD LIKE LINE OF IT_THEAD.
    IMPORT WA_THEAD FROM MEMORY ID 'ABCD'.
    select SINGLE * from STXL into wa_stxl
                     where tdname = '00006000156500000002'.
    SELECT SINGLE * from STXL into wa_stxl
                      where tdname = WA_THEAD-TDNAME
                      AND TDID = WA_THEAD-TDID
                      AND TDOBJECT = WA_THEAD-TDOBJECT
                      AND TDSPRAS = WA_THEAD-TDSPRAS.
    IF SY-SUBRC NE 0.
    MESSAGE 'NO RECORD EXIST' TYPE 'E'.
    ENDIF.
    MOVE-CORRESPONDING WA_STXL TO G_HEAD.
    SET PF-STATUS 'STATUS'.
    SET TITLEBAR '001'.
      if g_editor is initial.
         CREATE OBJECT G_EDITOR_CONTAINER
           EXPORTING
            PARENT                      =
             CONTAINER_NAME              = CONT1
            STYLE                       =
            LIFETIME                    = lifetime_default
            REPID                       =
            DYNNR                       =
            NO_AUTODEF_PROGID_DYNNR     =
           EXCEPTIONS
            CNTL_ERROR                  = 1
            CNTL_SYSTEM_ERROR           = 2
            CREATE_ERROR                = 3
            LIFETIME_ERROR              = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5
             others                      = 6.
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         CREATE OBJECT G_EDITOR
           EXPORTING
            MAX_NUMBER_CHARS       =
            STYLE                  = 0
       WORDWRAP_MODE          = cl_gui_textedit=>wordwrap_at_fixed_position
    for to fix number of characters in row to 132 characers
             WORDWRAP_POSITION      = line_length
             WORDWRAP_TO_LINEBREAK_MODE = cl_gui_textedit=>true
    for the word to break to next line if it don’t fit in line
            FILEDROP_MODE          = DROPFILE_EVENT_OFF
             PARENT                 = G_EDITOR_CONTAINER
            LIFETIME               =
            NAME                   =
           EXCEPTIONS
            ERROR_CNTL_CREATE      = 1
            ERROR_CNTL_INIT        = 2
            ERROR_CNTL_LINK        = 3
            ERROR_DP_CREATE        = 4
            GUI_TYPE_NOT_SUPPORTED = 5
             others                 = 6  .
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
      REFRESH g_mytable.
         MOVE: WA_THEAD-TDNAME TO STXL-TDNAME,
               WA_THEAD-TDID TO STXL-TDID,
               WA_THEAD-TDOBJECT TO STXL-TDOBJECT,
               WA_THEAD-TDSPRAS TO STXL-TDSPRAS.
        CALL FUNCTION 'READ_TEXT'
        EXPORTING
        CLIENT                        = SY-MANDT
          ID                            = wa_stxl-tdid
          LANGUAGE                      = wa_stxl-tdspras
          NAME                          = wa_stxl-tdname
          OBJECT                        = wa_stxl-tdobject
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
      IMPORTING
        HEADER                        =
        TABLES
          LINES                         = it_line
      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.
    LOOP AT IT_LINE INTO V_RESULT.
       APPEND V_RESULT TO G_MYTABLE.
    ENDLOOP.
    CALL METHOD G_EDITOR->SET_TEXT_AS_R3TABLE
       EXPORTING
         TABLE           = G_MYTABLE
       EXCEPTIONS
         ERROR_DP        = 1
         ERROR_DP_CREATE = 2
         others          = 3.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
       endif.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    MODULE USER_COMMAND_9000 INPUT.
    CASE SY-UCOMM.
    REFRESH G_MYTABLE[].
    REFRESH IT_LINE[].
    CLEAR V_RESULT.
      WHEN 'SAVE'.
         CALL METHOD G_EDITOR->GET_TEXT_AS_R3TABLE
          EXPORTING
            ONLY_WHEN_MODIFIED     = FALSE
            IMPORTING
              TABLE                  = G_MYTABLE
            IS_MODIFIED            =
          EXCEPTIONS
            ERROR_DP               = 1
            ERROR_CNTL_CALL_METHOD = 2
            ERROR_DP_CREATE        = 3
            POTENTIAL_DATA_LOSS    = 4
            others                 = 5
         IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
    LOOP AT G_MYTABLE INTO V_RESULT.
       APPEND V_RESULT TO IT_LINE.
    ENDLOOP.
    CLEAR V_RESULT.
        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            CLIENT                = SY-MANDT
            HEADER                = G_HEAD
            INSERT                = ' '
            SAVEMODE_DIRECT       = 'X'
          OWNER_SPECIFIED       = ' '
          LOCAL_CAT             = ' '
        IMPORTING
          FUNCTION              =
          NEWHEADER             =
          TABLES
            LINES                 = IT_LINE
        EXCEPTIONS
          ID                    = 1
          LANGUAGE              = 2
          NAME                  = 3
          OBJECT                = 4
          OTHERS                = 5
       IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    REFRESH G_MYTABLE[].
    REFRESH IT_LINE[].
    CLEAR V_RESULT.
    WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
    LEAVE TO SCREEN '0'.
    *CALL SCREEN '0'.
    WHEN OTHERS.
    ENDCASE.
    *G_OK_CODE = SY-UCOMM.
    *CLEAR SY-UCOMM.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT

  • Alv- displaying long text in alv output

    hi,
              as per my requirement, i need to be display long text (length >1000 characters) in alv list or alv grid.
    i get the entaire long text and keep it in final internal table and pass it to alv functional module,  but  it unable to display the compleate long text( in alv-grid).
    the alv list displays the complete long text but not in the row, it displays in the second rown and few field labes of long text and its previous field label are displayed in impro[per order.
    is there any possible way to display long text in alv.
    regards,
    revoori

    Hi Ashok,
    try to pass the below while filling your long text.
    wa_fieldcat-seltext_l  = 'Your Long Text'.
    wa_fieldcat-ddictxt = 'L'.
    for more info check below
    Long Text --- 1000 characters
    hope it works
    Thnaks!
    Edited by: Prasanth on Mar 8, 2009 4:03 PM

  • Display long text in SAPScript

    Hi
    I'd like to display long text of line item text which is there in VF03 (Billing/Invoice docu) menugoto-items-texts    in output of SAPSCRIPT  form.It would like to write the command in script text editor as: " /: INCLUDE &VBDPR-TDNAME& OBJECT VBBP ID 0001 PARAGRAPH HT " .
    will this piece of code is enough to display on form. are is there anything that i need to do. like declaring in print program.....? please, suggest me experts....
    thank you....

    that is enough, but make sure you populated the TDNAME in the driver.
    /: INCLUDE &VBDPR-TDNAME& OBJECT VBBP ID 0001 PARAGRAPH HT

  • How to display long text in SAP Query ALV layout? It only show 129 char now

    I have a SAP Query which show a remark field(Max length more than 500 char), but it only show max length 129 char now. In fact, the lenght of remark field text is more than 300, and i had debug the source code, the field text value do is correct, its length do is 376.
    Do anybody can help me solve the issue, let the query ALV layout can show the long text field value?
    thanks very much in addvance.

    Hi,
    ALV can show only a restrict value length around 128 characters, many experts said that we can not extend. many suggestions is split text into some column.
    Regards,

  • How to make fields in field group as text fields in ABAP query

    Hi friends,
    I a have a ABAP query 85 corresponding to infoset A205,
    there is a field group in the infoset A205 and it contains some fields
    but some of the fields are made as text fields ................i want to know how to make these fields in
    the field group as text fields.
    there is a small icon  " T " on the field when it is made as a text field .
    Please help me
    Thanks & Regards

    Hi,
    IF you can specify which Field Catalog then it will be useful for us to provide appropriate answer.
    1. For Customer Master
    IMG> Financial Accounting New> Acs Recev and Acs Payable --> Customer Accounts --> Master Data --> Preperation of creating customer master Data --> Define Account Groups with screen layout (customers)
    In that you can create your own account group, and click Details Screen.
    There will Field Status header within that are listed three main areas
    General data
    Company code data
    Sales data
    When you double click these lines it will take you into "Status Group" Overview. Wherein under "Select Group" are listed fields Address, communiucation.... Double click on one group , you will bet aken into the group field wherein you will find 4 colums with indicators assigned to it. ( Suppress, Req. Entry, Opt Entry, Display) you can choose the required option. "Req. Entry" against the field. Click save after you complete your selections.
    2. Similarly you can do for Material Master in
    IMG --> Logistics General --> Material Master --> Field Selection --> Maintain Field Selection for Data Screens
    But be careful when you do it for material master as it is cuts across all the modules...
    Regards
    Sathya

  • Displaying Long text of hierarchy in variable cell

    Hi,
    What I'm trying to do is get the profit center node variable to show the medium/long text description of the node within the Layout->Display Text Elements section(SAPBEXheaderItem) of the query.
    I tried playing around with both the display and BEx Description settings in:  InfoObject->Business Explorer->General Settings
    I also tried to select the medium text setting within the query definition.
    Any ideas?

    Hello,
    Unfortunately, there is no possibility to change the length to more than 60. This is because all interfaces are based on  60 characters and the storage on the database is 60. Please refer to the attached SAP notes :
    545923     FAQ: Technical limits/customer namespace/p             
    540868     Technical limits for characteristics                   
    Best Regards,
    Des

  • Long text of InfoObject in Query Designer

    Hi Experts,
    In my InfoObject I have Long Text and Short Text.
    I have maintained both.
    In my Query Designer I'm only getting the short text and same text is getting displayed when I run the Report. Can anyone tell me how do I view the long text please in Query Designer please.
    Thanks

    Hi,
    Thanks all for your help,
    The description issue is resolved but My data which come under that Column is not getting displayed fully.
    The length I have defined in the infoobject is 40 by it is only displaying me 25 char information in the report.
    Can anyone help me with this please.
    Thanks
    Edited by: MO AHMED on Mar 17, 2010 3:07 PM

  • Urgent : ALV , how to display long text in colum field

    Dear All,
                  Have mada an ALV report, but in some column have to show long text like.
    "Qty of Processed Finished Goods receive with wt/length/pieces / units "
    but while display of ALV it's showing only :
    " Qty of Processed Finished Goods receive with wt/length/p "
    Plz tell is it possible to show all the contents in that field, even in multiple row. like :
    "Qty of Processed Finished
    Goods  receive with wt/length/pieces
    / units  "
    Looking forward to your earliest response.
    Regards,
    Gulrez Alam

    Hi,
      In your field catelog
    w_fieldcat-tabname   = 'Internal table name'.
      w_fieldcat-fieldname = 'Field of the internal table'.
      w_fieldcat-outputlen = '90'.----Here you have to increse the length
      w_fieldcat-col_pos   = '1'.
      w_fieldcat-row_pos   = '1'.
      w_fieldcat-seltext_l = 'Qty of Processed Finished Goods receive
                                       with wt/length/pieces / units '.
    APPEND w_fieldcat TO i_fieldcat.
      CLEAR w_fieldcat.
    Pls. reward if useful...

Maybe you are looking for