Long text in alv grid

Hi ,
I wanted to display a long text in my grid. Suppose I have a field's  long text having field length 3000.
It is varying for other fields.
Anybody will tell me how to display the whole long text in alv grid.

hi,
if it is a heading then in the field catlog u can do it.
i don know th length limitation.
fieldcatalog-fieldname   = 'EBELP'.
<b>  fieldcatalog-seltext_m   = 'PO Item'.
fieldcatalog-seltext_s   = 'PO Item'.
fieldcatalog-seltext_l   = 'PO Item'.</b>
  fieldcatalog-col_pos     = 1.
  append fieldcatalog to fieldcatalog.
rgds
Anver

Similar Messages

  • 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 a Long Text in ALV report

    Hi,
    I want to display the PO header long text in ALV Report that is 255 character width.
    Please help me out how to do this.
    please it is very urgent
    Thanks and regards
    Krishna

    Use READ_TEXT and concatenate the first lines of the text.
          CALL FUNCTION 'READ_TEXT'
               EXPORTING
                    id       = 'F01'
                    language = sy-langu
                    name     = lv_name " purchase order with leading zeroes
                    object   = 'EKKO'
               TABLES
                    lines    = t_lines
               EXCEPTIONS
                    OTHERS   = 8.
    Regards

  • How to get Grand Total Text in ALV GRID

    Hi Folks,
    I am able to get the SUBTOTAL TEXT .....But i need...
    How to get Grand Total Text in ALV GRID Display...
    Can any one give a Solution for this...

    Hi Surendar,
    Check out this code.. this is showing Total Text in Toal line in the very first column.
    REPORT  zsales_ord_det_1                        .
    TABLES: ztable_10.
    TYPE-POOLS: slis.
    DATA: BEGIN OF it OCCURS 0,
    srno(6) type c,
    name LIKE ztable_10-name,
    age LIKE ztable_10-age,
    END OF it.
    DATA : BEGIN OF it_temp OCCURS 0,
    name LIKE ztable_10-name,
    age LIKE ztable_10-age,
    END OF it_temp.
    DATA: i_fieldcat  TYPE slis_t_fieldcat_alv,
          wa_fieldcat TYPE  slis_fieldcat_alv.
    DATA: v_repid LIKE sy-repid,
           i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
           gs_layout TYPE slis_layout_alv,
           gd_layout TYPE slis_layout_alv,
           i_sort TYPE STANDARD TABLE OF slis_sortinfo_alv,
           wa_sort TYPE slis_sortinfo_alv.
    START-OF-SELECTION.
      v_repid = sy-repid.
      SELECT * FROM ztable_10 INTO TABLE it_temp.
      LOOP AT it_temp .
        it-srno = 'Total'.
        it-name = it_temp-name.
        it-age = it_temp-age.
        APPEND  it.
      ENDLOOP.
    END-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         i_program_name               = v_repid
         i_internal_tabname           = 'IT'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
         i_inclname                   = v_repid
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
        CHANGING
          ct_fieldcat                  = i_fieldcat[]
       EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 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.
    wa_fieldcat-row_pos = 1.
    wa_fieldcat-col_pos = 1.
    wa_fieldcat-fieldname = 'SRNO'.
    wa_fieldcat-tabname = it.
    append wa_fieldcat to i_fieldcat.
      LOOP AT i_fieldcat INTO wa_fieldcat.
        IF wa_fieldcat-fieldname = 'AGE'.
          wa_fieldcat-do_sum = 'X'.
          MODIFY i_fieldcat FROM wa_fieldcat.
        ENDIF.
       IF wa_fieldcat-fieldname = 'SRNO'.
         Hide this field so that it can display it's content i.e.
            Total text in Subtotal level
        wa_fieldcat-tech = 'X'.
          wa_fieldcat-no_out = 'X'.
          MODIFY i_fieldcat FROM wa_fieldcat TRANSPORTING tech no_out.
       ENDIF.
      ENDLOOP.
    wa_sort-spos = 1.
    wa_sort-fieldname = 'SRNO'.
    wa_sort-up = 'X'.
    wa_sort-subtot = 'X'.
    APPEND wa_sort TO i_sort.
      gd_layout-no_totalline = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                       = ' '
         i_callback_program                        = v_repid
      I_CALLBACK_PF_STATUS_SET     = ' '
    i_callback_user_command                = 'USER_COMMAND'
      I_CALLBACK_TOP_OF_PAGE         = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE  = ' '
      I_CALLBACK_HTML_END_OF_LIST    = ' '
      I_STRUCTURE_NAME                       =
      I_BACKGROUND_ID                        = ' '
      I_GRID_TITLE                                  =
      I_GRID_SETTINGS                          =
         is_layout                                      = gd_layout
         it_fieldcat                                      = i_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
         it_sort                           = i_sort
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = it
       EXCEPTIONS
         program_error                     = 1
         OTHERS                            = 2
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    Regards,
    Seema

  • SUBTOTAL TEXT IN ALV GRID

    HI ALL,
    could any one  send me how to display the subtotal Text  in ALV grid output with code sample.
    with thanks.
    kannan

    hi,
    means u want to print some text instead of star ( coming in subtotal) ?
    If so than try like,
    *& Report  ZALV_LIST
    REPORT  zalv_list.
    TABLES : mseg.
    TYPE-POOLS : slis.
    DATA : BEGIN OF itab OCCURS 0,
            mblnr LIKE mseg-mblnr,
            matnr LIKE mseg-matnr,
            werks LIKE mseg-werks,
            menge LIKE mseg-menge,
            line_color(4) TYPE c,
           END OF itab.
    DATA : BEGIN OF itab1 OCCURS 0,
            mblnr LIKE mseg-mblnr,
            matnr LIKE mseg-matnr,
            werks LIKE mseg-werks,
            menge LIKE mseg-menge,
            line_color(4) TYPE c,
           END OF itab1.
    DATA : t_fcat TYPE slis_t_fieldcat_alv,
           t_eve TYPE slis_t_event,
           t_subtot TYPE slis_t_sortinfo_alv,
           subtot LIKE LINE OF t_subtot,
           wa_fcat LIKE LINE OF t_fcat,
           gd_layout    TYPE slis_layout_alv.
    DATA : gt_menge LIKE mseg-menge,
           st_menge LIKE mseg-menge.
    SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : doc FOR mseg-mblnr.
    SELECTION-SCREEN : END OF BLOCK blk1.
    INITIALIZATION.
      PERFORM build_cat USING t_fcat.
      PERFORM build_eve.
      PERFORM build_layout.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM display.
    *&      Form  build_cat
          text
         -->TEMP_FCAT  text
    FORM build_cat USING temp_fcat TYPE slis_t_fieldcat_alv.
      wa_fcat-tabname = 'ITAB'.
      wa_fcat-fieldname = 'MBLNR'.
      wa_fcat-seltext_m = 'Material Doc.'.
      APPEND wa_fcat TO temp_fcat.
      CLEAR wa_fcat.
      wa_fcat-tabname = 'ITAB'.
      wa_fcat-fieldname = 'MATNR'.
      wa_fcat-seltext_m = 'Material'.
      APPEND wa_fcat TO temp_fcat.
      CLEAR wa_fcat.
      wa_fcat-tabname = 'ITAB'.
      wa_fcat-fieldname = 'WERKS'.
      wa_fcat-seltext_m = 'Plant'.
      APPEND wa_fcat TO temp_fcat.
      CLEAR wa_fcat.
      wa_fcat-tabname = 'ITAB'.
      wa_fcat-fieldname = 'MENGE'.
      wa_fcat-seltext_m = 'Quantity'.
    wa_fcat-do_sum = 'Y'.
      APPEND wa_fcat TO temp_fcat.
      CLEAR wa_fcat.
    subtot-spos = 1.
    subtot-fieldname = 'MBLNR'.
    subtot-tabname = 'ITAB'.
    subtot-up = 'X'.
    subtot-group = 'X'.
    subtot-subtot = 'X'.
    subtot-expa = 'X'.
    APPEND subtot TO t_subtot.
    ENDFORM.                    "build_cat
    *&      Form  build_eve
          text
    FORM build_eve.
      DATA : wa_eve TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = t_eve
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE t_eve WITH KEY name =  slis_ev_top_of_page
                             INTO wa_eve.
      IF sy-subrc = 0.
        MOVE 'TOP_OF_PAGE' TO wa_eve-form.
        APPEND wa_eve TO t_eve.
      ENDIF.
    ENDFORM.                    "build_eve
    *&      Form  build_layout
          text
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-info_fieldname =      'LINE_COLOR'.
      gd_layout-subtotals_text = 'Sub Total'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  get_data
          text
    FORM get_data.
      SELECT mblnr matnr werks menge FROM mseg INTO CORRESPONDING FIELDS OF TABLE itab
      WHERE mblnr IN doc.
      SORT itab BY mblnr.
      LOOP AT itab.
        AT NEW mblnr.
          LOOP AT itab WHERE mblnr = itab-mblnr.
            st_menge = st_menge + itab-menge.
            itab1-mblnr = itab-mblnr.
            itab1-matnr = itab-matnr.
            itab1-werks = itab-werks.
            itab1-menge = itab-menge.
            APPEND itab1.
          ENDLOOP.
          itab1-mblnr = 'Sub_Total'.
          itab1-matnr = ''.
          itab1-werks = ''.
          itab1-menge = st_menge.
          itab1-line_color = 'C710'.
          APPEND itab1.
          itab1-line_color = ''.
          CLEAR st_menge.
        ENDAT.
      ENDLOOP.
      LOOP AT itab.
        gt_menge = gt_menge + itab-menge.
      ENDLOOP.
      itab1-mblnr = 'Total'.
      itab1-matnr = ''.
      itab1-werks = ''.
      itab1-menge = gt_menge.
      itab1-line_color = 'C310'.
      APPEND itab1.
    ENDFORM.                    "get_data
    *&      Form  display
          text
    FORM display.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         i_callback_program             = 'ZALV_LIST'
         is_layout                      = gd_layout
         it_fieldcat                    = t_fcat
        it_sort                        = t_subtot
         it_events                      = t_eve
        TABLES
          t_outtab                       = itab1
    EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "display
    *&      Form  top_of_page
          text
    FORM top_of_page.
      WRITE:/ 'Data'.
    ENDFORM.                    "top_of_page
    reward if useful....
    Edited by: Dhwani shah on Dec 20, 2007 1:20 PM

  • How to get a Footer text in alv grid?

    Hi,
    am using RESUE_ALV_COMMENTARy_write... it is getting only on top of page..
    suggest me to get Footer text in ALV GRiD.
    Regards,
    sodanapalli
    Moderator message: please do more research before asking, all points removed (both replies were copy/pasted anyway)
    Edited by: Thomas Zloch on May 19, 2011 5:41 PM

    Step1: Populate the ALV event table with 'END_OF_LIST' event
    Step2: Populate the footer text in to an internal table which is of type
    slis_t_listheader.
    Step3: Create a subroutine with name 'END_OF_LIST' and with in this form we have to call the function module u2018REUSE_ALV_COMMENTARY_WRITEu2019.
    Step4: Now call the function module REUSE_ALV_GRID_DISPLAYu2019 to display the ALV report. Whenever u2018END_OF_LIST' event is get fired it executes the subroutine END_OF_LIST and displays the text into the footer of the ALV GRID.
    Code:
    *& Report Z_TEST_ALV
    REPORT z_test_alv.
    TYPE-POOLS: slis.
    DATA: i_mara TYPE STANDARD TABLE OF mara INITIAL SIZE 0,
                i_events TYPE slis_t_event,
                i_end_of_page TYPE slis_t_listheader,
                w_events TYPE slis_alv_event,
                v_repid LIKE sy-repid.
    START-OF-SELECTION.
    SELECT * FROM
    mara INTO TABLE i_mara
    UP TO 100 ROWS.
    CHECK sy-subrc = 0.
    PERFORM populate_alv_event.
    PERFORM comment_build USING i_end_of_page[].
    PERFORM display_grid.
    *& Form POPULATE_ALV_EVENT
    FORM populate_alv_event .
    Populate event table
    w_events-name = 'END_OF_LIST'.
    w_events-form = 'END_OF_LIST'.
    APPEND w_events TO i_events.
    ENDFORM. " POPULATE_ALV_EVENT
    *& Form COMMENT_BUILD
    FORM comment_build USING p_i_end_of_page TYPE slis_t_listheader.
    DATA: ls_line TYPE slis_listheader.
    REFRESH p_i_end_of_page.
    CLEAR ls_line.
    ls_line-typ = 'H'.
    ls_line-info = 'This is end of list'(001).
    APPEND ls_line TO p_i_end_of_page.
    ENDFORM. " COMMENT_BUILD
    *& Form end_of_list
    FORM end_of_list.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = i_end_of_page.
    ENDFORM. "end_of_list
    *& Form DISPLAY_GRID
    FORM display_grid .
    v_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = v_repid
    i_structure_name = 'MARA'
    it_events = i_events
    TABLES
    it_outtab = i_mara
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    ENDIF.
    ENDFORM. " DISPLAY_GRID
    Check the output  where footer will be displayed as 'THIS IS END OF LIST'

  • Display the  long text in alv by using function modules

    Hi all,
    How to display the  long text in alv by using function modules ?
    Send me any sample code.
    Thanks in advance
    krupali.

    Hello KR,
    Use READ_TEXT and concatenate the first lines of the text.
    CALL FUNCTION 'READ_TEXT'
         EXPORTING
              id       = 'F01'
              language = sy-langu
              name     = lv_name " purchase order with leading zeroes
              object   = 'EKKO'
         TABLES
              lines    = t_lines
         EXCEPTIONS
              OTHERS   = 8.
    You can loop at t_lines and concatenate header in to some other field.
    Best Regards,
    Sasidhar Reddy Matli.
    Edited by: Sasidhar Reddy Matli on Aug 13, 2008 12:25 PM

  • Display additional Text in ALV Grid

    Hello,
    I have an ALV Grid display and need to display additional information on the top of the list. I have used the grid-title, but the field is defined as 70 characters and thats not enough.
    Is it possible to display more text with alv grid?
    Regards Michael

    Hi Ravi,
    I´m creating my alv object orientated and I don´t know, how to manage that now. Can You explain me, where and how I have to do it?
    My Dynpro has one custom container and I´m calling the method SET_TABLE_FOR_FIRST_DISPLAY in PBO.
    And I need the comment to be printed with the ALV by pressing the print button in the toolbar of the ALV
    Thank You!
    Message was edited by: Michael Schmidt

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

  • Subtotal Text in ALV Grid and hiding empty row

    Hello,
    ive got a ALV-Grid with a few fields .. Total on one field subtotal on VKORG, category or some other fields .
    after subtotal of one of the 2 named fields i'm reading the literal to the given fields and writing them in the table which is displayed and do a refresh.
    i can show the field literal in the alv by adding it into the field cat but than its displayed even if its not filled.
    i just want to display that column after filling it - the subtotal of the 2 columns.
    and i want to add the text of  the literal to the subtotal line. so if the alv grid is closed to display the totals. i want to see what the subtotal is for.
    for displaying i use        
    CALL METHOD lcl_alv_grid->set_table_for_first_display
          EXPORTING
            is_layout            = gs_layout
            is_variant           = gs_variant
            it_toolbar_excluding = gt_exclude
            i_save               = x_save
            i_default            = 'X'
          CHANGING
            it_outtab            = it_alvlist[]
            it_fieldcatalog      = gt_field_cat.
    for refresh 
        lv_lvc_s_stbl-row = 'X'.
        lv_lvc_s_stbl-col = 'X'.
        lv_soft_refresh = 'X'.
        CALL METHOD lcl_alv_grid->refresh_table_display
          EXPORTING
            is_stable      = lv_lvc_s_stbl
            i_soft_refresh = lv_soft_refresh
          EXCEPTIONS
            finished       = 1
            OTHERS         = 2.
    get the selected column to read literal
    CALL METHOD lcl_alv_grid->get_selected_columns
        IMPORTING
          et_index_columns = it_col_tab
        EXCEPTIONS
          OTHERS           = 1.
    Hope you can help me and understand my problem

    Hi,
    Use the No_out from Reusable types of fieldcat..For example.
    IF it_final-field is initial.
            READ TABLE IT_FIELDCAT5 WITH KEY FIELDNAME = 'BCD'.
            IF SY-SUBRC EQ 0.
              IT_FIELDCAT5-NO_OUT = 'X'.
              MODIFY IT_FIELDCAT5 INDEX SY-TABIX TRANSPORTING NO_OUT.
            ENDIF.
    else.
            READ TABLE IT_FIELDCAT5 WITH KEY FIELDNAME = 'BCD'.
            IF SY-SUBRC EQ 0.
              IT_FIELDCAT5-NO_OUT = ' '.
              MODIFY IT_FIELDCAT5 INDEX SY-TABIX TRANSPORTING NO_OUT.
            ENDIF.
    ENDIf.
    Cheers,
    Syed Maheboob.

  • Standard Purchase Order Long Text In ALV Report

    Hi Gurus,
    I am able to get the charecter space for long text in the ALV report but i could not able to get the text in that space out put.
    I have used ekko and ekpo tables.
    Please provide me the code are solution to display the Text in that particular space.
    Thanks,
    SR

    Hi all,
    I am able to see the PO text, But when i moved it to production system  i find
    1) it is taking too much time to execute. 2) I find the first  PO text in the purchase document is getting repeated for all other purchase documents in the run where their is no Po text .
    Please help me how to restrict the repeated Text.
    And also to improve the performance
    regards,
    dileep

  • Long text in alv

    Hi,
    Iam trying to display alv list with one internal table(itab1).
    I have another itab2 which is having very long text and which is appended as 4 lines.
    Now i want to combine this itab2 into itab1 to dispaly long text.
    Can any one explain me how to append this data.Here is the code.
    My object is to put long text in the ALV list.Iam using QM02 transaction to get the data.
    REPORT  YQM_NOTIFICATION MESSAGE-ID  ZM NO STANDARD PAGE HEADING
                                                          LINE-SIZE 255.
    TYPE-POOLS: SLIS.
    TABLES: QPCT,
            QPGT,
            QMEL,
            QMMA,
            IHPA.
    DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          ITAB_EXTAB   TYPE SLIS_T_EXTAB.
    DATA: IT_FIELD   TYPE SLIS_T_FIELDCAT_ALV,
          W_LAYOUT   TYPE SLIS_LAYOUT_ALV,
          IT_EXCLU   TYPE SLIS_T_EXTAB,
          GS_EXTAB  TYPE SLIS_EXTAB.
    DATA   : F_TDOBJECT LIKE THEAD-TDOBJECT,
             F_TDNAME   LIKE THEAD-TDNAME,
             F_TDID     LIKE THEAD-TDID,
             ITAB_LINES LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA   :  BEGIN OF ITAB OCCURS 10,
               DESC(72) TYPE C,
             END OF ITAB.
    DATA: BEGIN OF T_HDR OCCURS 0,
            GROUP LIKE QPGT-CODEGRUPPE,
            CODE LIKE QPCT-CODE,
            TEXT LIKE QPCT-KURZTEXT,
            NAME LIKE QPGT-KURZTEXT,
          END OF T_HDR.
    DATA: BEGIN OF T_DET OCCURS 0,
           SNO TYPE I,
           QMNUM LIKE QMEL-QMNUM,       " NOTIFICATION NUMBER(REF NO)
           REFNUM LIKE QMEL-REFNUM,      " CONTRACT NO
           PARNR LIKE IHPA-PARNR,
           QMTXT LIKE QMEL-QMTXT,
           QMGRP LIKE QMEL-QMGRP,
           QMCOD LIKE QMEL-QMCOD,
           OBJNR LIKE QMEL-OBJNR,
           DESC(72),
          END OF T_DET.
    DATA: SNO TYPE I.
    DATA: V_REPID TYPE SY-REPID.
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS:S_QMNUM FOR QMEL-QMNUM,
                      S_QMART FOR QMEL-QMART,
                      S_QMDAT FOR  QMEL-QMDAT.
    SELECTION-SCREEN END OF BLOCK A1.
    START-OF-SELECTION.
      PERFORM GET_DATA.
    PERFORM 2000_GET_MAIN.
      PERFORM DISPLAY_ALV.
    END-OF-SELECTION.
    *&      FORM  DISPLAY_ALV
          TEXT
    FORM DISPLAY_ALV.
      PERFORM FIELD_CAT USING FIELDCAT.
      V_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = V_REPID
          IT_FIELDCAT        = FIELDCAT
          IT_EXCLUDING       = ITAB_EXTAB
        TABLES
          T_OUTTAB           = T_DET
        EXCEPTIONS
          PROGRAM_ERROR      = 1
          OTHERS             = 2.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "DISPLAY_ALV
    *&      FORM  FIELD_CAT
          TEXT
         -->P_FIELDCAT TEXT
    FORM FIELD_CAT USING P_FIELDCAT.
    FIELD CATELOG FOR ALV DISPLAY.
      DATA: I_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
      CLEAR I_FIELDCAT.
      I_FIELDCAT-FIELDNAME    = 'SNO'.
      I_FIELDCAT-TABNAME      = 'T_DET'.
      I_FIELDCAT-NO_OUT       = '   '.
      I_FIELDCAT-SELTEXT_L    = 'S.NO'.
      I_FIELDCAT-OUTPUTLEN    = 4.
      APPEND I_FIELDCAT TO FIELDCAT.
      I_FIELDCAT-FIELDNAME    = 'QMNUM'.
      I_FIELDCAT-TABNAME      = 'T_DET'.
      I_FIELDCAT-NO_OUT       = '   '.
      I_FIELDCAT-SELTEXT_L    = 'REF.NO'.
      I_FIELDCAT-OUTPUTLEN    = 18.
      APPEND I_FIELDCAT TO FIELDCAT.
      I_FIELDCAT-FIELDNAME    = 'REFNUM'.
      I_FIELDCAT-TABNAME      = 'T_DET'.
      I_FIELDCAT-NO_OUT       = '   '.
      I_FIELDCAT-SELTEXT_L    = 'CONTRACT NO'.
      I_FIELDCAT-OUTPUTLEN    = 18.
      APPEND I_FIELDCAT TO FIELDCAT.
      I_FIELDCAT-FIELDNAME    = 'PARNR'.
      I_FIELDCAT-TABNAME      = 'T_DET'.
      I_FIELDCAT-NO_OUT       = '   '.
      I_FIELDCAT-SELTEXT_L    = 'A-DIV'.
      I_FIELDCAT-OUTPUTLEN    = 10.
      APPEND I_FIELDCAT TO FIELDCAT.
      I_FIELDCAT-FIELDNAME    = 'QMTXT'.
      I_FIELDCAT-TABNAME      = 'T_DET'.
      I_FIELDCAT-NO_OUT       = '   '.
      I_FIELDCAT-SELTEXT_L    = 'DESCRIPTION'.
      I_FIELDCAT-OUTPUTLEN    = 25.
      APPEND I_FIELDCAT TO FIELDCAT.
      I_FIELDCAT-FIELDNAME    = 'DESC'.
      I_FIELDCAT-TABNAME      = 'T_DET'.
      I_FIELDCAT-NO_OUT       = '   '.
      I_FIELDCAT-SELTEXT_L    = 'DEFECT'.
      I_FIELDCAT-OUTPUTLEN    = 100.
      APPEND I_FIELDCAT TO FIELDCAT.
    ENDFORM.                    "FIED_CAT
    *&      FORM  GET_DATA
          TEXT
    FORM GET_DATA.
    *TO GET HEADER
      SELECT CODEGRUPPE CODE KURZTEXT FROM QPCT INTO TABLE T_HDR.
      LOOP AT T_HDR.
        SELECT SINGLE * FROM QPGT WHERE CODEGRUPPE = T_HDR-GROUP.
        IF SY-SUBRC = 0.
          T_HDR-NAME = QPGT-KURZTEXT.
          MODIFY T_HDR.
          CLEAR T_HDR.
        ENDIF.
      ENDLOOP.
    *TO GET DETAILS
      SELECT QMNUM REFNUM QMDAT QMTXT OBJNR QMGRP QMCOD FROM QMEL
        INTO CORRESPONDING FIELDS OF TABLE T_DET
                                  WHERE QMNUM IN S_QMNUM AND
                                        QMART IN S_QMART AND
                                        QMDAT IN S_QMDAT.
      LOOP AT T_DET.
        SELECT SINGLE * FROM IHPA WHERE OBJNR = T_DET-OBJNR.
        IF SY-SUBRC = 0.
          T_DET-PARNR = IHPA-PARNR.
          MODIFY T_DET.
          CLEAR T_DET.
        ENDIF.
      ENDLOOP.
      LOOP AT T_DET.
        DELETE T_HDR WHERE GROUP NE T_DET-QMGRP.
      ENDLOOP.
      LOOP AT T_DET.
        SNO = SNO + 1.
        T_DET-SNO = SNO.
        MODIFY T_DET.
        CLEAR T_DET.
      ENDLOOP.
      CLEAR   : ITAB.
      REFRESH : ITAB.
      LOOP AT T_DET.
        F_TDID     = 'LTQM'.
        F_TDNAME   = T_DET-QMNUM.
        F_TDOBJECT = 'QMEL'.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            CLIENT   = SY-MANDT
            ID       = F_TDID
            LANGUAGE = SY-LANGU
            NAME     = F_TDNAME
            OBJECT   = F_TDOBJECT
          TABLES
            LINES    = ITAB_LINES.
        DESCRIBE TABLE ITAB_LINES LINES SY-TFILL.
        IF SY-TFILL > 0.
          LOOP AT ITAB_LINES.
            ITAB-DESC = ITAB_LINES-TDLINE.
            <b>APPEND ITAB</b>.    "itab2
            CLEAR ITAB.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
    <b>LOOP AT ITAB.</b>
       T_DET-DESC = ITAB-DESC.
       MODIFY T_DET.
       CLEAR T_DET.  "itab1
    <b>ENDLOOP.</b>
    ENDFORM.                    "GET_DATA<b></b><b></b><b></b>
    points guaranteed
    cheers
    kaki

    Hi again,
    1. I don't think it is directly possible in alv.
    2. bcos Notification is a simple field
    3. But Description  ?
       This is fetched into an INTERNAL Table
       having many rows.
    3. One option is :
       The internal table which uare displaying
       in alv (lets say ITAB)
       Populate it with some home-grown logic.
    4. lets say u have 3 Notifications
      each having Descriptions of 5 lines.
      ie 3 x 5 = 15 lines
    5. So loop thru all descriptions
       and populate both fields one by one.
    itab should something like this -
    make the notification field blank
            for lines starting from 2 (for each notification)
    6. NOT001     line1
                  line2
                  lin3
                  line4
      NOT002      line 1
                  line 2
                  line 3
                  line 4
      NOT0003     line1
                  line2
    etc etc.
    I hope it helps.
    Regards,
    Amit M.

  • Capture the text in ALV grid output

    Hi Friends,
    I have created a alv grid report, in that i have to edit one field by using EDIT, i am editign that field.
    Since i am working on interactive alv ( if user keeps the cursor on that row and he presses the push button) i want to capture that entered text in interactive alv.
    Can any one help me
    Regards,
    DVNS

    Hi,
    Please refer to SAP standard demo program BCALV_TEST_GRID_EDITABLE.
    Thanks,
    Sriram Ponna.

Maybe you are looking for

  • ITunes 90 day lock out on iMac - only one AppleID can use a Mac at any one time?

    Just found out, the hard way, about Apple's patently ridiculous "90 Day Lockout" policy on iTunes (Match, Purchases download and pretty much ALL the useful features). Apparently, at least according to Support - who feigned surprise that this was an i

  • Webmail services as alternative to Thunderbird?

    Are there any webmail providers that come to close to the functionality provided by Thunderbird? Here are my requirements: - The ability to display a list of shared accounts/mailboxes, and to be able to very easily access those mailboxes - The abilit

  • Can someone help with my laptop and projector connection?

    I have an old projector which I have easily connected to previous laptops and to bring up the image was simple i.e. click function+F4, but that does nothing on my new Toshiba laptop. Could someone please tell me how to bring the image up the projecte

  • I can't use After Effects CC

    Hey everybody ! I have some problem with "After Effects CC". I have the " Creative Cloud Student and Teacher Edition" and that's ok (photoshop, Illustrator, Premier pro, etc.) But I don't know why, I can't use After Effects. Something is wrong. Exemp

  • Starting HDAPSD Fail

    Hi, I struggle to enable APS on my ThinkPad T500, but hdapsd daemon doesn't seem to start. Here's what i've done: I installed hdapsd and tp_smapi-builder to build kernel module for my kernel -pf - it automatically executed "/etc/rc.d/tp_smapi setup"