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

Similar Messages

  • 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

  • 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

  • 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.

  • 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 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

  • 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...

  • 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 print long text in ALV

    i want to print a description in text  mode which is 5-6 lines some times it have a blank line also so
    how to print in ALV .i m using READ_TEXT function but sumtime it not works when text exceed 4-5 lines
    what i sud do.

    hi,
    there is another way u can use yours internal table field like long text field. that is.
    parameters: salno type vbak-vbeln.
    data: begin of itab occurs 0,
      vbeln type vbak-vbeln,
      matnr type vbap-matnr,
      longtext type thead occurs 0,
      end of itab.
      data: itabstxl type standard table of stxl with header line.
      select single vbakvbeln vbapmatnr into (itab-vbeln, itab-matnr)
                                     from vbak inner join vbap
                                       on vbakvbeln = vbapvbeln
                                        where vbak~vbeln = salno.
        select single tdobject tdname tdid tdspras from stxl
                                                     into (itabstxl-tdobject,itabstxl-tdname,itabstxl-tdid,itabstxl-tdspras)
                                                           where relid = 'TX'
                                                            and  tdobject = 'VBBK'
                                                            and tdname = salno    "YOUR OWN TDNAME e,g
                                                            and tdid = 'Z003'
                                                            and tdspras = 'EN'.
    call function 'READ_TEXT'
      exporting
      CLIENT                        = SY-MANDT
        id                            = itabstxl-tdid
        language                      = itabstxl-tdspras
        name                          = itabstxl-tdname
        object                        = itabstxl-tdobject
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
      tables
        lines                         = itab-longtext
    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.
    break abaper.
    I HOPE THIS WILL SOLVE THIS WILL SOLVE THE PROBLEM OF THE OTHERS AS WELL.

  • How to display long text in Arabic quickly Flash Builder ?

    Hi,
    I have prepared an application for Android in Adobe Flash Builder. In application there are prayers in Arabic as a list. In app , short prayers are displaying quickly, but long prayers are displaying  after a long time. This is my problem.
    I share my project file in addition.Can  anybody help me, please?
    Note: I used SQLite database in my project as you can see and  I used a font to view prayers in Arabic.
    Prayers.zip - Google Drive

    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.

  • How to Display  Formatted Text  IN ALV Column?

    HI experts ,
    I am displaying  ALV with Multiple Column's , One of the Column is TEXT(Fomatted text).
    When ALV is Displayed  TEXT Column Comes as Continues TEXT . and is Not Formatted .
    Now when i want to edit this text i am Calling another View  which contains text edit . This Text edit will display correct Formatted Text . but when i save it and Come back to ALV again i do see continues text .
    Is there  any way where in i can display  the Formatted text in ALV Column ?
    Any body have any clue with this ...
    Thanks in Advance
    Patil
    Edited by: Badarinarayan Patil on Feb 22, 2008 3:45 PM

    Hi Juergen,
    I found Your blog and found it  really interesting... though I was not able to use it: I (like Jun Li is asking, I guess) need to use a dynamic text, containing formatting informations (according the xhtml syntax).
    I tried to pass it to the form by an ABAP-dictionary based interface and by means of the context (in a webdynpro page), but both tries failed.
    Some suggestion will be greatly appreciated.
    Thankyou
    Simone

  • How to display Long text information in my view

    Hi
    I have a long text of static information , which i need to show in my view. its like agreement information. The user must be able to read it . It has some 20 lines of text. Which is the appropriate control to be used to show the information ?

    Hi Naresh
    I had some options of displaying the long text in the view.
    option 1 - The long text in sap table was in multiple rows in terms of having each line as one record and when displayed looks like  a paragraph statement. So I used a webdynpro table to populate the rows and made invisible the row/column lines. So When you run it on the browser it will display like a long text. By default, SAP table will have column some length of 72 characters, which I changed to 140 charcs, to get a long sentence formation.
    option 2 - If the long text is not from SAP table and its kind of direct information, then just keep on pasting the text in the text view by providing spaces appropriately, so that the display will be a continous form of paragraph. This is a trial and error way and providing the spaces between the lines.
    option 3 - Store the long text in a text file and call a import parameter, which will read the whole text and store it in string (node) and display it text view. ( alignment cannot be gauranteed)
    option 4 - Last one, is to call a office (msword) or a pdf control , which will display the long text through the word editor or a pdf form.
    If you have any specific issues do write back to the forum.
    thanks
    sathya

  • How to display long text in a paragraph format using class CL_GUI_TEXTEDIT?

    I need to display a long paragraph in the text editor. I realize I have to declare a very long table line for my text table. For example, I wrote a subroutine set_paragraph_text.
    FORM set_paragraph_text USING p_paragraph.
      DATA:  l_line(1000) TYPE c,
                 lt_paragraph LIKE TABLE OF l_line.
      APPEND p_paragraph TO lt_paragraph.
    Display the paragraph in the text editor.
      CALL METHOD g_textedit->set_text_as_r3table
        EXPORTING
          table = lt_paragraph.
    ENDFORM.                    " set_paragraph_text
    This approach works well in release 6.4. Will it also work for earlier versions with more stringent char length limit? If not, can anybody suggest a better solution for the problem? The bottom line is that the paragraph needs to be displayed in its natural format, not one sentence per line. Another restriction is that the paragraph text is pre-fixed so it is hard coded into the program as a string literal.
    Thanks in advance for any help.

    Could this help you?
    <a href="https://wiki.sdn.sap.com/wiki/display/profile/2007/09/18/Playing%2BWith%2BText%2BEditor">Playing with text editor</a>
    Greetings,
    Blag.
    Message was edited by:
            Alvaro Tejada Galindo

  • How to display long text of info in webdynpro view

    Hi all
      I want to retrive a text of 500 characters in TextEdit UI element from R3,but the attribute through which we have bind this UI element is mapped to model attribute which is coming in the form of table i.e. first row of that table contains first 132 characters and the second row contains next 132 characters. Now the problem is how to retrieve the whole text and display in that UI element.
    Same is the problem for submitting this 500 text.

    Hi,
       You can use String concatenation for this:
    String textToShow = <get first 132 characters from the model node>;
    textToShow += <get next 132 characters from the model node>
    //set textToShow to the context attribute bound to the TextEdit UI element.
    Regards,
    Satyajit.

  • How to display subtotal text in alv report for particular group of values

    Hi,
    if material number falls 1 to 10 then i considered be calculate and display subtotal qty amount with subtotal text " Total of the mat1" and if material number falls 11 to 20 then again i need to be claculate and display subtotal qty amount with subtotal text "total of the mat2". if material number falls 21 to 30 then i don't want to display any subtotal and At last grand total also is not required.
    Please help me asap

    just check the thread...
    Can we modify a sub-total in ALV

Maybe you are looking for