How to add title to an ALV List

Hi ,
I want to add a title to an ALV List.How to do it.
   I_GRID_TITLE                  = 'QUARTERS'
I did  the above but the pgm is gettting terminated.
Kindly help.

try this logic
*& Report  ZDEMO_ALVGRID                                               *
*& Example of a simple ALV Grid Report with grand total                *
*& The basic requirement for this demo is to display a number of       *
*& fields from the EKKO table.                                         *
REPORT  zdemo_alvgrid                 .
TABLES:     ekko.
type-pools: slis.                                 "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
  ebeln TYPE ekpo-ebeln,
  ebelp TYPE ekpo-ebelp,
  statu TYPE ekpo-statu,
  aedat TYPE ekpo-aedat,
  matnr TYPE ekpo-matnr,
  menge TYPE ekpo-menge,
  meins TYPE ekpo-meins,
  netpr TYPE ekpo-netpr,
  peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
      wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
      gd_tab_group type slis_t_sp_group_alv,
      gd_layout    type slis_layout_alv,
      gd_repid     like sy-repid.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform display_alv_report.
perform top-of-page.
*&      Form  BUILD_FIELDCATALOG
      Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you  more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
              I.e. Field type may be required in-order for
                   the 'TOTAL' function to work.
  fieldcatalog-fieldname   = 'EBELN'.
  fieldcatalog-seltext_m   = 'Purchase Order'.
  fieldcatalog-col_pos     = 0.
  fieldcatalog-outputlen   = 10.
  fieldcatalog-emphasize   = 'X'.
  fieldcatalog-key         = 'X'.
fieldcatalog-do_sum      = 'X'.
fieldcatalog-no_zero     = 'X'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'EBELP'.
  fieldcatalog-seltext_m   = 'PO Item'.
  fieldcatalog-col_pos     = 1.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'STATU'.
  fieldcatalog-seltext_m   = 'Status'.
  fieldcatalog-col_pos     = 2.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'AEDAT'.
  fieldcatalog-seltext_m   = 'Item change date'.
  fieldcatalog-col_pos     = 3.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MATNR'.
  fieldcatalog-seltext_m   = 'Material Number'.
  fieldcatalog-col_pos     = 4.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MENGE'.
  fieldcatalog-seltext_m   = 'PO quantity'.
  fieldcatalog-col_pos     = 5.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MEINS'.
  fieldcatalog-seltext_m   = 'Order Unit'.
  fieldcatalog-col_pos     = 6.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'NETPR'.
  fieldcatalog-seltext_m   = 'Net Price'.
  fieldcatalog-col_pos     = 7.
  fieldcatalog-outputlen   = 15.
  fieldcatalog-do_sum      = 'X'.        "Display column total
  fieldcatalog-datatype     = 'CURR'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'PEINH'.
  fieldcatalog-seltext_m   = 'Price Unit'.
  fieldcatalog-col_pos     = 8.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
endform.                    " BUILD_FIELDCATALOG
*&      Form  BUILD_LAYOUT
      Build layout for ALV grid report
form build_layout.
  gd_layout-no_input          = 'X'.
  gd_layout-colwidth_optimize = 'X'.
  gd_layout-totals_text       = 'Totals'(201).
gd_layout-totals_only        = 'X'.
gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                        "click(press f2)
gd_layout-zebra             = 'X'.
gd_layout-group_change_edit = 'X'.
gd_layout-header_text       = 'helllllo'.
endform.                    " BUILD_LAYOUT
*&      Form  DISPLAY_ALV_REPORT
      Display report using ALV grid
form display_alv_report.
  gd_repid = sy-repid.
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
           i_callback_user_command = 'USER_COMMAND'
           i_grid_title           = outtext
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
           it_special_groups       = gd_tabgroup
           IT_EVENTS                = GT_XEVENTS
            i_save                  = 'X'
           is_variant              = z_template
       tables
            t_outtab                = it_ekko
       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_REPORT
*&      Form  DATA_RETRIEVAL
      Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
  from ekpo
  into table it_ekko.
endform.                    " DATA_RETRIEVAL
Form  TOP-OF-PAGE                                                 *
ALV Report Header                                                 *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
      wa_header type slis_listheader,
      t_line like wa_header-info,
      ld_lines type i,
      ld_linesc(10) type c.
Title
  wa_header-typ  = 'H'.
  wa_header-info = 'EKKO Table Report'.
  append wa_header to t_header.
  clear wa_header.
Date
  wa_header-typ  = 'S'.
  wa_header-key = 'Date: '.
  CONCATENATE  sy-datum+6(2) '.'
               sy-datum+4(2) '.'
               sy-datum(4) INTO wa_header-info.   "todays date
  append wa_header to t_header.
  clear: wa_header.
Total No. of Records Selected
  describe table it_ekko lines ld_lines.
  ld_linesc = ld_lines.
  concatenate 'Total No. of Records Selected: ' ld_linesc
                    into t_line separated by space.
  wa_header-typ  = 'A'.
  wa_header-info = t_line.
  append wa_header to t_header.
  clear: wa_header, t_line.
  call function 'REUSE_ALV_COMMENTARY_WRITE'
       exporting
            it_list_commentary = t_header.
           i_logo             = 'ideas'.
endform.
If usefull reward points helpful....

Similar Messages

  • How to add push button in alv list

    Dear all,
         I am doing ALV report, in that i have some requirements as mentioned below
    6.     In the main report screen, each row should have a selection button at the left end. The entire row should be selectable by clicking on this button. By clicking on the button a second time the row gets deselected. The user should be able to select only one row at a time (i.e. he should not be able to select multiple rows simultaneously).
    7.     All Report screens should have standard SAP Navigation buttons.
    8.     The main Report Screen should have a “Refresh” Button. When the user clicks on this Refresh button the program should remember and re-execute (i.e. refresh) the “last selection of the user in the Selection Screen above” and the Main Report Screen should be re-displayed accordingly.
    pleae help on me,
    Regards ,
    Sudhakar.

    hi
    good
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    http://www.sap-img.com/abap/what-are-the-events-in-alv.htm
    reward point if helpful.
    thanks
    mrutyun^

  • How to add SharePoint 2013 Promoted link list view web part in page programatically with Tiles view using CSOM.

    How to add SharePoint 2013 Promoted link list view web part in page programatically with Tiles view using CSOM. I found that it can be
    done by using XsltListViewWebPart class but how can I use this one by using shraepoint client api.
    shiv

    Nice, can you point me to the solution please ?
    I'm  trying to do this but I get an error : 
    Web Part Error: Cannot complete this action. Please try again. Correlation ID: blablabla
    StackTrace:    at Microsoft.SharePoint.SPViewCollection.EnsureViewSchema(Boolean fullBlownSchema, Boolean bNeedInitallViews)     at Microsoft.SharePoint.SPList.GetView(Guid viewGuid)   
    All help really appreciated.

  • How to add .js link in custom list form through sharepoint designer 2013

    hi friends
    so far i was adding jquery code to script editor webpart in custom list form.
    but i need to know how to add .js link in custom list form through sharepoint designer 2013
    please help me.

    Hi,
    We can add the "JS Link Property" in the “WebPart” node in the custom list form page through SharePoint designer 2013.
    Here is an example for your reference:
    <JSLink xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm">~site/Style Library/js/custom.js</JSLink>
    Noticed that, we should not lose the 'xmlns="http://schemas.microsoft.com/WebPart/v2/ListForm' attribute.
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How to add values to drop down list in adobe forms

    how to add values to drop down list in adobe forms

    Hi,
    If you are using WD Java following are steps of filling values in DD Box:
    1 Create a simple type in the Dictionary.
    2 Create an attribute "CountryNew" in the Context of type created by you.
    3 Write following code in the init method of the form:
    IWDAttributeInfo countryinfo =
                   wdContext.nodeEmployee().getNodeInfo().getAttribute("CountryNew");
    ISimpleTypeModifiable Country = countryinfo.getModifiableSimpleType();
    IModifiableSimpleValueSet countryValueSet =
                   Country.getSVServices().getModifiableSimpleValueSet();
    countryValueSet.put("IN", "INDIA");
    countryValueSet.put("US "USA");
    4 Add a Enumrated DD box in the form and bind it to the attribute "CountryNew"
    Hope this helps
    Amit

  • How to hide ,unhide columns  in ALV List

    Hi all,
    How to hide ,unhide columns  in ALV List..
    Plz guide me.
    Thanks in advance..
    Albert

    Hi Joseph,
    Check the following thread:
    Hide Unhide columns of ALV grid Report.
    Regards,
    Archana

  • HT201301 how to add app to file sharing list ?

    how to add app to file sharing list ?
    For expamle, i have autocad ws app on iPad. When i had previous version of iTunes i saw this program in file sharing list.
    After upgrading iTunes AutoCad have gone from this list, how can I return this back?
    Thank You.

    From what I read in the app description in iTunes on my computer, you need some sort of account and you use this with a desktop program as well. Files are uploaded to a server???
    I see no mention of file sharing in the app description.
    https://itunes.apple.com/app/autocad-ws/id393149734?mt=8
    BTW, you cannot add an app to file sharing - it has to suppport file sharing on it's own - it must be built into the app. If the app supports file sharing, it will be in the file sharing apps list in iTunes.

  • Does anyone know how to Add a date drop down list to a pdf file?

    Can someone tell me how to add a Date drop down list in a form

    There's no built-in function that does that in Acrobat, but there are some third-party tools that do.
    The two most known ones are by FormRouter, which is free and based on form fields (but also a bit buggy), and a non-free version created by Max Wyss, which is based on a dialog object.

  • How to edit particular field in alv list display-urgent

    HI ALL,
    my requirement is i am displaying output using alv list display. now my rewuirement :
    i am displaying out in edit mode only. when user clicks one particular field
    for example record is like
    runrate a01 maheed  -> if user clicks on a01 this field should be editable. i have a following code
      w_field-edit = w_edit.
      w_field-input = 'X'.    -> using this code i can able to display entire colomn in edit mode. this not suits my requirement.anybody can send me the sample code please.
    thanks,
    maheedhar.t

    Can you please send me the sample code plz.
    i am sending my code below.
    type-pools : slis.
    tables : zuser_secobjects.
    data : t_header1 like zuser_secobjects.
    data : begin of it_secobjects occurs 0.
            include structure t_header1.
    data :   checkbox type c value 'X',
            action type c,
          end of it_secobjects.
    data : begin of it_secobjects1 occurs 0.
            include structure ZUSER_SECOBJECTS.
    data :   checkbox type c VALUE 'X',
          end of it_secobjects1.
    data : wa_ita like line of it_secobjects.
    data : i_field type slis_t_fieldcat_alv with header line.
    data : w_field like line of i_field.
    data : i_sort type slis_t_sortinfo_alv.
    data : w_sort like line of i_sort.
    data : it_filt1 type slis_t_filter_alv with header line.
    data:
    i_tabname type tabname,
    i_repid like sy-repid,
    is_lout type slis_layout_alv.
    data :   it_filt type slis_t_filter_alv   with header line,
             it_evts type slis_t_event        with header line.
    DATA : is_vari type disvariant.
    constants :   c_default_vari value 'X',
                  c_save_vari    value 'U',
                   c_checkfield type slis_fieldname     value 'ACTION',
                   c_f2code     type sy-ucomm           value '&ETA'.
    data : chk_box type slis_fieldname.
    selection-screen: begin of block b1 with frame title text-t01.
    parameters : p_appln type zuser_secobjects-appln.
    parameters : p_user type usr02-bname, "zuser_secobjects-appln_user,
    p_partnr type zuser_secobjects-appln_partner,
    p_ptype type zuser_secobjects-partner_type default '02',
    p_upostn type zuser_secobjects-user_position,
    p_sdate like likp-erdat default sy-datum,
    p_edate(10) default '12/31/9999',
    p_revnum type zuser_secobjects-revnum,
    p_cted type zuser_secobjects-created_by,
    p_cdate type zuser_secobjects-creation_date,
    p_ctime type zuser_secobjects-creation_time,
    p_chnby type zuser_secobjects-changed_by,
    p_cdate1 type zuser_secobjects-changed_date,
    p_ctime1 type zuser_secobjects-changed_time.
    selection-screen: end of block b1.
    form user_command using p_ucomm like sy-ucomm
    rs_selfield type slis_selfield.
      case p_ucomm.
        when 'SELECT_ALL'. " SELALL is the FCODE of ur push button
          loop at it_secobjects into wa_ita.
            wa_ita-checkbox = 'X'.
            modify it_secobjects from wa_ita.
          endloop.
      rs_selfield-refresh = 'X'.   "<-  ADD THIS
      when 'DESLCT_ALL'.
        loop at it_secobjects into wa_ita.
            wa_ita-checkbox = ' '.
            modify it_secobjects from wa_ita.
          endloop.
    rs_selfield-refresh = 'X'.   "<-  ADD THIS
       is_lout-f2code               = c_f2code.
       is_lout-box_fieldname        = c_checkfield.
       is_lout-get_selinfos         = 'X'.
       is_lout-detail_popup         = 'X'.
       is_lout-detail_initial_lines = 'X'.
    maheed-start.
    *when 'SAVE'.
    *LOOP AT IT_SECOBJECTS WHERE CHECKBOX = 'X'.
    MOVE-CORRESPONDING IT_SECOBJECTS TO IT_SECOBJECTS1.
    APPEND IT_SECOBJECTS1.
    CLEAR IT_SECOBJECTS1.
    DELETE IT_SECOBJECTS.
    *ENDLOOP.
    *DELETE ZUSER_SECOBJECTS FROM TABLE IT_SECOBJECTS1.
    WHEN 'DELETE'.
        loop at it_SECOBJECTS where checkbox eq 'X'.
            delete it_SECOBJECTS.
        endloop.
    *RS_SELFIELD-REFRESH = 'X'.
    maheed-end.
    maheed-start.  apr 13
    WHEN 'DELETE'.
    loop at it_SECOBJECTS where checkbox eq 'X'.
    MOVE-CORRESPONDING IT_SECOBJECTS TO IT_SECOBJECTS1.
    APPEND IT_SECOBJECTS1.
    delete it_SECOBJECTS.
    endloop.
    RS_SELFIELD-REFRESH = 'X'.
    when 'SAVE'.
    DELETE ZUSER_SECOBJECTS FROM TABLE IT_SECOBJECTS1.
    commit work.
    refresh :IT_SECOBJECTS1.
    maheed-end.    apr 13
    *when 'SAVE'.
    *LOOP AT IT_SECOBJECTS WHERE CHECKBOX = 'X'.
    MOVE-CORRESPONDING IT_SECOBJECTS TO IT_SECOBJECTS1.
    APPEND IT_SECOBJECTS1.
    CLEAR IT_SECOBJECTS1.
    DELETE IT_SECOBJECTS.
    *ENDLOOP.
    *DELETE ZUSER_SECOBJECTS FROM TABLE IT_SECOBJECTS1.
    ENDCASE.
    endform.
    *&      Form  delete
    form delete.
      data : begin of is_secobjects occurs 0.
              include structure zuser_secobjects.
      data : checkbox type c.
      data : end of is_secobjects.
      is_secobjects-checkbox = 'X'.
      modify is_secobjects
        from it_secobjects
        transporting checkbox
      where checkbox = 'X'.
    endform.
    *&      Form  get_data
    form get_data.
      select * from zuser_secobjects
      into table it_secobjects.
    endform.                    " get_data
    *&      Form  prepare_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form prepare_fieldcatalog." USING w_edit TYPE any.
    data : w_edit type c.
    clear w_edit.
      clear: w_field,i_field.
      refresh:i_field.
      i_field-key = 'X'.
      i_field-col_pos = 1.
      i_field-ddictxt = 'S'.
      i_field-seltext_s = '@11@'.
    i_field-checkbox = 'X'.
      i_field-input = 'X'.
      i_field-fieldname = 'HEADER'.
      i_field-outputlen = 0.
      append i_field.
      clear i_field.
      w_field-fieldname = 'APPLN'.
      w_field-tabname = 'IT_SECOBJECTS'.
      w_field-seltext_l = text-m01.
      w_field-outputlen = '10'.
      w_field-EDIT = 'X'.      "maheed
      w_field-col_pos = 1.
      append w_field to i_field.
      clear w_field.
      w_field-fieldname = 'APPLN_USER'.
      w_field-tabname = 'IT_SECOBJECTS'.
      w_field-just = 'C'.
      w_field-seltext_l = text-m02.
      w_field-outputlen = '7'.
      w_field-col_pos = 2.
      append w_field to i_field.
      clear w_field.
      w_field-fieldname = 'APPLN_PARTNER'.
      w_field-tabname = 'IT_SECOBJECTS'.
      w_field-just = 'C'.
      w_field-seltext_l = text-m03.
      w_field-edit = w_edit.
      w_field-input = 'X'.
      w_field-outputlen = '7'.
      w_field-col_pos = 2.
      append w_field to i_field.
      clear w_field.
      w_field-fieldname = 'INACTIVE'.
      w_field-tabname = 'IT_SECOBJECTS'.
      w_field-just = 'C'.
      w_field-seltext_l = text-m02.
      w_field-outputlen = '7'.
      w_field-col_pos = 3.
      append w_field to i_field.
      clear w_field.
    endform.                    " prepare_fieldcatalog
    *&      Form  ALV_LIST_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    form alv_list_display.
    DATA : LC_GLAY TYPE LVC_S_GLAY.
    LC_GLAY-EDT_CLL_CB = 'X'.
      i_repid = sy-repid.
      is_lout-box_fieldname = 'CHECKBOX'.
      it_filt-fieldname = 'ACTION'.
      call function 'REUSE_ALV_LIST_DISPLAY'
           exporting
                i_callback_program       = i_repid
                i_callback_pf_status_set = 'PF_STATUS_SET'
                i_callback_user_command  = 'USER_COMMAND'
                is_layout                = is_lout
                it_fieldcat              = i_field[]
                it_filter                = it_filt[]
                 it_events                = it_evts[]
                i_default                = c_default_vari
                i_save                   = c_save_vari
                is_variant               = is_vari
           tables
                t_outtab                 = it_secobjects.
    endform.                    " ALV_LIST_DISPLAY
    *&      Form  display
          text
         -->P_I_OBJECT  text
    form display using    object.
      case object.
    ENDCASE.
    endform.                    " display
    thanks,
    maheedhar.t

  • How to read modifed data in ALV List

    Hi,
    I have one input enabled field in my ALV list.  User can modify the values of that field.  How i can get what are all the records are modified by the user.
    Thanks
    stallin

    Hi,
    Try this code...
    REPORT ZTEST_EDIT_ALV                             .
    *Data Declaration
    DATA: BEGIN OF T_EKKO,
      EBELN TYPE EKPO-EBELN,
      EBELP TYPE EKPO-EBELP,
    *  FLAG TYPE C,
    *  HANDLE_STYLE TYPE LVC_T_STYL,
    END OF T_EKKO.
      DATA: GD_REPID LIKE SY-REPID, "Exists
      REF_GRID TYPE REF TO CL_GUI_ALV_GRID. "new
    DATA: BEGIN OF IT_EKKO OCCURS 0.
            INCLUDE STRUCTURE T_EKKO.
    DATA: END OF IT_EKKO.
    DATA: BEGIN OF IT_BACKUP OCCURS 0.
            INCLUDE STRUCTURE T_EKKO.
    DATA: END OF IT_BACKUP.
    *ALV data declarations
    TYPE-POOLS: SLIS.                                 "ALV Declarations
    DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          GD_LAYOUT    TYPE SLIS_LAYOUT_ALV.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM DATA_RETRIEVAL.
      PERFORM BUILD_FIELDCATALOG.
      PERFORM BUILD_LAYOUT.
      IT_BACKUP[] = IT_EKKO[].
      PERFORM DISPLAY_ALV_REPORT.
    *&      Form  build_fieldcatalog
    *       text
    FORM BUILD_FIELDCATALOG.
      REFRESH FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'EBELN'.
      FIELDCATALOG-SELTEXT_M   = 'Purchase Order'.
      FIELDCATALOG-INPUT     = 'X'.
      FIELDCATALOG-EDIT     = 'X'.
      FIELDCATALOG-COL_POS     = 2.
      APPEND FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'EBELP'.
      FIELDCATALOG-SELTEXT_M   = 'PO Item'.
      FIELDCATALOG-COL_POS     = 3.
      APPEND FIELDCATALOG.
      CLEAR  FIELDCATALOG.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    FORM BUILD_LAYOUT.
      "Permet d'ajuster les colonnes au text
    *  gd_layout-colwidth_optimize = 'X'.
    *  GD_LAYOUT-TOTALS_TEXT       = 'Totals'(201).
    *  gd_layout-box_fieldname = 'SELECT'.
    *  gd_layout-box_tabname   = 'IT_EKKO'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    FORM DISPLAY_ALV_REPORT .
      GD_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM        = GD_REPID
    *            i_callback_top_of_page   = 'TOP-OF-PAGE'
                I_CALLBACK_PF_STATUS_SET  = 'SET_PF_STATUS'
                I_CALLBACK_USER_COMMAND   = 'USER_COMMAND'
    *            i_grid_title             = 'My Title'
                IS_LAYOUT                 = GD_LAYOUT
                IT_FIELDCAT               = FIELDCATALOG[]
           TABLES
                T_OUTTAB                  = IT_EKKO
           EXCEPTIONS
                PROGRAM_ERROR             = 1
                OTHERS                    = 2.
      IF SY-SUBRC <> 0.
        WRITE:/ SY-SUBRC.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    FORM DATA_RETRIEVAL.
      SELECT EBELN EBELP
       UP TO 10 ROWS
        FROM EKPO
        INTO CORRESPONDING FIELDS OF TABLE  IT_EKKO.
    ENDFORM.                    " DATA_RETRIEVAL
    *                      FORM SET_PF_STATUS                              *
    FORM SET_PF_STATUS USING RT_EXTAB   TYPE  SLIS_T_EXTAB.
      SET PF-STATUS 'STANDARD_FULLSCREEN1' EXCLUDING RT_EXTAB.
    ENDFORM.                    "set_pf_status
    *&      Form  user_command
    *       text
    *      -->R_UCOMM    text
    *      -->RS_SELFIELDtext
    FORM USER_COMMAND  USING R_UCOMM LIKE SY-UCOMM
                             RS_SELFIELD TYPE SLIS_SELFIELD.
    *then insert the following code in your USER_COMMAND routine...
    <b> IF REF_GRID IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            E_GRID = REF_GRID.
      ENDIF.
      IF NOT REF_GRID IS INITIAL.
        CALL METHOD REF_GRID->CHECK_CHANGED_DATA
      ENDIF.</b>*modify
      CASE R_UCOMM.
        WHEN '&IC1'.
          CHECK RS_SELFIELD-TABINDEX > 0.
          IF RS_SELFIELD-VALUE EQ '6000000001'.
            CALL TRANSACTION 'ZTEST'.
          ENDIF.
        WHEN 'REFRESH'.
          READ TABLE IT_EKKO INDEX  RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            READ TABLE IT_BACKUP INDEX RS_SELFIELD-TABINDEX.
            IF SY-SUBRC = 0.
              IF IT_EKKO <> IT_BACKUP.
    *  then do your check
              ENDIF.
            ENDIF.
          ENDIF.
          PERFORM DATA_RETRIEVAL.
          RS_SELFIELD-REFRESH = 'X'.
      ENDCASE.
    ENDFORM.                    "user_command
    Regards
    vijay

  • How to display header for secondrary alv list

    HI ALL,
    WHEN I RAN THIS REPORT HEADER IS COMING FOR FIRST ALV.WHEN I DOUBLE CLICK ON SALES ORDER NUMBER IT SHOWS SECONDARY LIST. FOR THIS SECONDARY LIST HEADER IS NOT COMING.ANY BODY CAN SUGGEST HOW TO FIXZ THIS PROBLEM
    REPORT ZMAHI1 LINE-SIZE 30.
    TYPE-POOLS : SLIS.
    *TYPES : BEGIN OF I_VBAK,
           VBELN TYPE VBAK-VBELN,
           ERDAT TYPE VBAK-ERDAT,
           ERNAM TYPE VBAK-ERNAM,
           ERZET TYPE VBAK-ERZET,
           VTWEG TYPE VBAK-VTWEG,
           VKORG TYPE VBAK-VKORG,
          END OF I_VBAK.
    DATA : BEGIN OF IT_VBAK OCCURS 0,
            VBELN TYPE VBAK-VBELN,
            ERDAT TYPE VBAK-ERDAT,
            ERNAM TYPE VBAK-ERNAM,
            ERZET TYPE VBAK-ERZET,
            VTWEG TYPE VBAK-VTWEG,
            VKORG TYPE VBAK-VKORG,
           END OF IT_VBAK.
    *DATA : IT_VBAK TYPE STANDARD TABLE OF I_VBAK INITIAL SIZE 0,
          WA_VBAK TYPE I_VBAK.
    *TYPES : BEGIN OF I_VBAP,
           VBELN TYPE VBAP-VBELN,
           MATNR TYPE VBAP-MATNR,
           ERZET TYPE VBAP-ERZET,
           POSNR TYPE VBAP-POSNR,
          END OF I_VBAP.
    DATA : BEGIN OF IT_VBAP OCCURS 0,
            VBELN TYPE VBAP-VBELN,
            MATNR TYPE VBAP-MATNR,
            ERZET TYPE VBAP-ERZET,
            POSNR TYPE VBAP-POSNR,
           LINE_COLOR(4) TYPE C,     "Used to store row color attributes
          END OF IT_VBAP.
    *DATA : IT_VBAP TYPE STANDARD TABLE OF I_VBAP INITIAL SIZE 0,
          WA_VBAP TYPE I_VBAP.
    DATA : EVENTCAT TYPE SLIS_T_EVENT.
    DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          GD_TAB_GROUP TYPE SLIS_T_SP_GROUP_ALV,
          GD_LAYOUT    TYPE SLIS_LAYOUT_ALV,
          GD_REPID     LIKE SY-REPID.
    DATA:  I_TITLE_VBAK TYPE LVC_TITLE VALUE 'ALV LIST FIRST'.
    DATA:  I_TITLE_VBAP TYPE LVC_TITLE VALUE 'ALV LIST SECOND'.
    DATA: V_REPID LIKE SY-REPID .
    DATA :    HEADING TYPE  SLIS_T_LISTHEADER.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-T01.
    PARAMETERS : P_VBELN TYPE VBAK-VBELN.
    SELECTION-SCREEN END OF BLOCK B1.
    INITIALIZATION.
      V_REPID = SY-REPID.
    START-OF-SELECTION.
      PERFORM GET_DATA.
      PERFORM BUILT_FIELDCATALOG.
      PERFORM E03_EVENTTAB_BUILD USING EVENTCAT[].
      PERFORM COMMENT_BUILD USING HEADING[].
      PERFORM GRID_DISPLAY.
    *&      Form  GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DATA.
      SELECT VBELN
             ERDAT
             ERNAM
             ERZET
             VTWEG
             VKORG
         FROM VBAK
         INTO TABLE IT_VBAK
      WHERE VBELN EQ P_VBELN.
    ENDFORM.                    " GET_DATA
    *&      Form  BUILT_FIELDCATALOG
          text
    -->  p1        text
    <--  p2        text
    FORM BUILT_FIELDCATALOG.
      CLEAR I_FIELDCAT.
      REFRESH : I_FIELDCAT[].
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-SELTEXT_M = 'SALES DOC NO'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      WA_FIELDCAT-FIELDNAME = 'ERDAT'.
      WA_FIELDCAT-SELTEXT_M = 'Creation Date'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      WA_FIELDCAT-FIELDNAME = 'ERNAM'.
      WA_FIELDCAT-SELTEXT_M = 'NAME'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      WA_FIELDCAT-FIELDNAME = 'ERZET'.
      WA_FIELDCAT-SELTEXT_M = 'TIME'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      WA_FIELDCAT-FIELDNAME = 'VTWEG'.
      WA_FIELDCAT-SELTEXT_M = 'DIS CHANNEL'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      WA_FIELDCAT-FIELDNAME = 'VKORG'.
      WA_FIELDCAT-SELTEXT_M = 'SALES ORG'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    " BUILT_FIELDCATALOG
    *&      Form  GRID_DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM GRID_DISPLAY.
      V_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM      = V_REPID
                I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
                I_CALLBACK_TOP_OF_PAGE  = 'TOP-OF-PAGE'
                IT_FIELDCAT             = I_FIELDCAT[]
                I_SAVE                  = 'A'
                IT_EVENTS               = EVENTCAT[]
           TABLES
                T_OUTTAB                = IT_VBAK
           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.                    " GRID_DISPLAY
    for header
    *&      Form  HEADER
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                IT_LIST_COMMENTARY = HEADING.
    ENDFORM.                    " HEADER
    *&      Form  E03_EVENTTAB_BUILD
    FORM E03_EVENTTAB_BUILD USING    E03_LT_EVENTS TYPE  SLIS_T_EVENT.
      DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                I_LIST_TYPE = 3
           IMPORTING
                ET_EVENTS   = E03_LT_EVENTS.
      READ TABLE E03_LT_EVENTS
      WITH KEY NAME = SLIS_EV_TOP_OF_PAGE INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE 'TOP_OF_PAGE' TO LS_EVENT-FORM.
        APPEND LS_EVENT TO E03_LT_EVENTS.
      ENDIF.
      DELETE E03_LT_EVENTS WHERE FORM IS INITIAL.
    ENDFORM.                    " E03_EVENTTAB_BUILD
    *&      Form  COMMENT_BUILD
    FORM COMMENT_BUILD USING LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
      DATA: W_HEADING TYPE SLIS_LISTHEADER.
      DATA: W_HEADING1 TYPE SLIS_LISTHEADER.
      CLEAR   : W_HEADING, LT_TOP_OF_PAGE.
      REFRESH : LT_TOP_OF_PAGE.
      W_HEADING-INFO = 'Synopsys World' .
      W_HEADING-TYP = 'H'.
      APPEND  W_HEADING  TO LT_TOP_OF_PAGE .
      CLEAR  W_HEADING  .
    ENDFORM.                    " COMMENT_BUILD
    end of header portion.
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'.
          IF RS_SELFIELD-FIELDNAME = 'VBELN'.
            PERFORM GETDATA_FROM_VBAP.
            PERFORM BUILD_FIELDCATLOG_IT_VBAP.
            PERFORM BUILD_LAYOUT.
            PERFORM E03_EVENTTAB_BUILD USING EVENTCAT[].
            PERFORM COMMENT_BUILD USING HEADING[].
            PERFORM GRID_DISPLAY1.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  GETDATA_FROM_VBAP
          text
    -->  p1        text
    <--  p2        text
    FORM GETDATA_FROM_VBAP.
      DATA: LD_COLOR(1) TYPE C.
      SELECT VBELN
             MATNR
             ERZET
             POSNR
         FROM VBAP
         INTO TABLE IT_VBAP
         FOR ALL ENTRIES IN IT_VBAK
      WHERE VBELN = IT_VBAK-VBELN.
      LOOP AT IT_VBAP .
        LD_COLOR = LD_COLOR + 1.
        IF LD_COLOR = 8.
          LD_COLOR = 1.
        ENDIF.
        CONCATENATE 'C' LD_COLOR '10' INTO IT_VBAP-LINE_COLOR.
        MODIFY IT_VBAP  TRANSPORTING LINE_COLOR.
      ENDLOOP.
    ENDFORM.                    " GETDATA_FROM_VBAP
    *&      Form  BUILD_FIELDCATLOG_IT_VBAP
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_FIELDCATLOG_IT_VBAP.
      CLEAR FIELDCATALOG.
      REFRESH : FIELDCATALOG[].
      FIELDCATALOG-FIELDNAME   = 'VBELN'.
      FIELDCATALOG-SELTEXT_M   = 'SALES DOC NO'.
      FIELDCATALOG-COL_POS     = 0.
      FIELDCATALOG-OUTPUTLEN   = 10.
      FIELDCATALOG-EMPHASIZE   = 'X'.
      FIELDCATALOG-KEY         = 'X'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'POSNR'.
      FIELDCATALOG-SELTEXT_M   = 'PO Item'.
      FIELDCATALOG-COL_POS     = 1.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'MATNR'.
      FIELDCATALOG-SELTEXT_M   = 'MAT NO'.
      FIELDCATALOG-COL_POS     = 2.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'ERZET'.
      FIELDCATALOG-SELTEXT_M   = 'TIME'.
      FIELDCATALOG-COL_POS     = 3.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
    ENDFORM.                    " BUILD_FIELDCATLOG_IT_VBAP
    *&      Form  GRID_DISPLAY1
          text
    -->  p1        text
    <--  p2        text
    FORM GRID_DISPLAY1.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM     = GD_REPID
                I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
                IS_LAYOUT              = GD_LAYOUT
                IT_FIELDCAT            = FIELDCATALOG[]
                I_SAVE                 = 'A'
                IT_EVENTS              = EVENTCAT[]
           TABLES
                T_OUTTAB               = IT_VBAP
           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.                    " GRID_DISPLAY1
    *&      Form  BUILD_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_LAYOUT.
      GD_LAYOUT-NO_INPUT          = 'X'.
      GD_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      GD_LAYOUT-TOTALS_TEXT       = 'Totals'(201).
      GD_LAYOUT-INFO_FIELDNAME =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT

    In ur report,
    in the rountine <b>GRID_DISPLAY1</b>.
    <b> GD_REPID = SY-REPID.</b>
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM     = GD_REPID
                I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
                IS_LAYOUT              = GD_LAYOUT
                IT_FIELDCAT            = FIELDCATALOG[]
                I_SAVE                 = 'A'
                IT_EVENTS              = EVENTCAT[]
           TABLES
                T_OUTTAB               = IT_VBAP
           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.

  • How to print check box in ALV list display and how to pick selected ones

    Hi
    i am displaying one ALV list dispaly. for that im adding one check box fields by filling the fieldcat as below:
      wa_fldcat-checkbox = 'X'.
      wa_fldcat-edit = 'X'.
    but the check box is showing disable mode only. i want to display that check box and if i select that check box i want pick that records. for ALV grid i found one FM to pick records of selectedones as below.
    DATA ref_grid TYPE REF TO cl_gui_alv_grid.
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
      IF ref_grid IS NOT INITIAL.
        CALL METHOD ref_grid->check_changed_data.
      ENDIF.
    but how can i do for list display to pick those selected one records.
    Can any one sugget regarding this.
    Thanks in advance.
    Rahul.

    Hi,
    Thanks. now it's enabled. but how can we pick the records from that list whichever i selected through that check box.
    i found this one for ALV grid:
    DATA ref_grid TYPE REF TO cl_gui_alv_grid.
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
      IF ref_grid IS NOT INITIAL.
        CALL METHOD ref_grid->check_changed_data.
      ENDIF.
    but how for ALV normal list display.
    Thanks.
    rahul

  • How to get subtotal value in ALV list display

    Hi all,
    How to give condition on the value of subtotal line in ALV list display,
    i.e.if value of subtotal of plan quantity = actual quantity (in red oval) it should show the message
    'ON TIME DELIVERY' else it should not show messagee.In my case(shown in red oval) its
    showing for each subtotal value. I know how to change the subtotal text but i want to change
    with respect to value of the subtotal.(plz refer attachment)
    Any input regard to this will be achieved great.
    Many thanks in advance.
    samadhan shinde.

    Hi Samadhan,
    I am awaiting for solution for this problem.....but as i think dynamically displaying sub total based on
    matching actual quantity and planned quantity is bit complicated.
    My idea is to display matched quantities in one block and unmatched  quantities in another. I mean using blocked list.
    awaiting suggestions.
    regards,

  • How to add title/caption to each image in Bridge web gallery

    Hi,
    I am creating a web gallery within Bridge and I want to add a title and caption to each image in my web gallery. How do I do that? The only thing I see is the Site Info. section and that adds a title and caption to the entire web gallery (including each image) and I want different titles and captions for each image. There must be a simple way to do this I just haven't figured it out yet. Any help would be greatly appreciated. Thank you!
    ashmic19

    Thanks Curt Y for your help. The thing is I have to use only Bridge. I looked up this problem on http://www.experts-exchange.com/ and they said it was not possible to add titles and captions for individual images (slides) in a web gallery in Bridge. They seemed to imply that this was overlooked. So I input what I could based on what was provided by Bridge and turned it in. Thanks to all who viewed and replied to this post. I appreciate it.
    ashmic19

  • How to add titles to multiple pictures at same time in iphoto11

    I am having difficulty navigating in iphoto11.
    Can not figure out how to add keywords to multiple photos
    or how to add the same title to multiple photos.

    Titles: Photos menu -> Batch Change.
    Keywords: Select a batch of pics. Apply keyword to one, it's applied to all
    Regards
    TD

Maybe you are looking for