Hiding values in ALV Grid

Hi all,
        I need to hide values of one particular field in ALV Grid.But I need only subtotal of the hidden values.
Is there any option in ALV Grid.
For Example.
it_final-menge
100
125
175
200
400
400 is the subtotal value.Values 100,125,175,200 needs to be hidden for some specific purpose.
I need
it_final-menge
blank
blank
blank
blank
400
blank indicates space.
Please Suggest some ideas.
Regards,
Bathri

Hi,
Using SAP R/3 field catalog or layout this is not possible. However you can do this manually, by taking a varaible for subtotal and calculating it manually instead of the sub_tot  field in the catalog.
You can hide an entire column, but all rows except the subtotal is not possible.
Regards,
Mansi.

Similar Messages

  • How to merge rows with similar values in alv grid display in webdynpro

    Hi experts,
                   i want to know about how to merge rows with similar values in alv grid display of webdynpro.grouping rows is possible in table display in webdynpro but i am not able to do row grouping in the alv grid display in webdynpro.
    kindly suggest.
    thanks ,
    Anita.

    Hi Anita,
    did you find a solution for this? I have opened a Thread, if you know the answer maybe you could help me out:
    Is there an ALV function similar to the TABLE Row grouping?
    Thanx in advanced!!!
    Kind Regards,
    Gerardo J

  • How to change sub total value in ALV Grid.

    Hi All,
    Can u please explain how to change SUBTOTAL Value in ALV Grid display based on another field value.
    EX; F1 subtotal is  initial then we have to modify the F2 sub total to 9999.9.
    Thanks
    Radha.

    Hi Radha,
    I doubt if that can be changed....because the event that i was referring to in my previous post works with ALV List display...But in any case you can try that.....
    There is an event in SLIS....(As i told you, i dont remember the name and currently i dont have access to SAP system, so i am not able to verify and let you know that event name).....
    Other thatn TOP and END of PAGE events, there is an event for sub-total text......i think it would start with "SUBTOTAL"...
    you need to use that event in your events table and pass it to ALV Grid display.
    Then create a sub-routine with that name (As you do for TOP-OF-PAGE event)....and in this event you can change the values in runtime (PROVIDED, this event gets triggered for ALV GRID).....
    If this does not work, i think calculating sub-totals while you build the internal table would be a better option....(If you have time constraint....else you can do some more research on the same)........
    Best Regards,
    Ram.

  • EDIT THE FIELV VALUE IN ALV GRID DISPLAY

    Hi Guru ,
    How can I edit the value of a particular one or two fields in ALV GRID DISPLAY .
    Please reply me

    hi,
    1.Set status of all cells to editable using the layout structure.
    2.Use SET_READY_FOR_INPUT to activate the edit feature initially.
       (state "editable activated").
    3.Use IS_READY_FOR_INPUT to fetch current substate of editable cells.
    4.Use SET_READY_FOR_INPUT to switch between the substates.
        CALL METHOD g_grid->set_table_for_first_display
             EXPORTING i_structure_name = 'SFLIGHT'
                       is_layout        = gs_layout
             CHANGING  it_outtab        = gt_outtab.
    *§2.Use SET_READY_FOR_INPUT to allow editing initially.
    *   (state "editable and ready for input").
        CALL METHOD g_grid->set_ready_for_input
              EXPORTING i_ready_for_input = 1.
    *Use IS_READY_FOR_INPUT to fetch current substate of editable cells.
      IF g_grid->is_ready_for_input( ) EQ 0.
    *Use SET_READY_FOR_INPUT to switch between the substates.
        CALL METHOD g_grid->set_ready_for_input
                         EXPORTING i_ready_for_input = 1.
      ELSE.
        CALL METHOD g_grid->set_ready_for_input
                         EXPORTING i_ready_for_input = 0.
      ENDIF.

  • Value in ALV Grid ?

    Hello,
    is there a method which sets the cell value of a certain cell in a alv grid.
    I've to set a vallue of a cell after the user has entered a value in a special cell.

    Hi,
    Refer this program:-
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = v_rep_id       " report id
         i_callback_pf_status_set          = 'PF'           " for PF-STATUS
         i_callback_user_command           = 'USER_COMMAND' " for User-Command
         it_fieldcat                       = it_field       " field catalog
        TABLES
          t_outtab                          = it_final      " internal table
    *&      Form  pf
    *       SUB-ROUTINE PF IS USED TO SET THE PF-STATUS OF THE SCREEN
    *       ON WHICH THE ALV GRID IS DISPLAYED
    FORM pf USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZTG_STAT'.
    ENDFORM.                    "pf
    *&      Form  USER_COMMAND
    *       SUB-ROUTINE USER_COMMAND IS USED TO HANDLE THE USER ACTION
    *       AND EXECUTE THE APPROPIATE CODE
    FORM user_command USING lv_okcode LIKE sy-ucomm l_selfield TYPE slis_selfield.
    * assign the function code to variable v_okcode
      lv_okcode = sy-ucomm.
    * handle the code execution based on the function code encountered
      CASE lv_okcode.
    * when the function code is SAVE then save records into internal table
        WHEN 'SAVE'.
    * to reflect the data changed into internal table
          DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
          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.
    "now at this time you have modified internal table
    * refresh the ALV Grid output from internal table
          l_selfield-refresh = 'X'.
    "alv output is refreshed as per changes in internal table
    "now you can include code to modify your ztable from internal table
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    Regards,
    Tarun

  • Update values in AlV grid display after entering value

    Hi,
         I have an issue in ALV grid display.
        Let me explain.
        i have 8 fields to display in which one is editiable.
       Fields are: date
                       material,
                       material Description,
                       Opening Stock,
                       Closing stock-  (  this field is editiable)
                       Closing stock,
                       Received Stock,
                       Actual production.
    Actual production = Closing stock + removal stock
                                 - receipt stock - opening stock.
    when i change the value of closing stock and press enter, actual production should get update, the new values should display.
    Thany you in advance.

    Hi,
    Please refer the code below:
    REPORT z_demo_alv_jg.*******************************************************************
    * TYPE-POOLS                                                      *
    TYPE-POOLS: slis. *******************************************************************
    * INTERNAL TABLES/WORK AREAS/VARIABLES     *
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
          i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
          w_field TYPE slis_fieldcat_alv,
          p_table LIKE dd02l-tabname,
          dy_table TYPE REF TO data,
          dy_tab TYPE REF TO data,
          dy_line TYPE REF TO data.*******************************************************************
    * FIELD-SYMBOLS                                                   *
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa> TYPE ANY,
                   <dyn_field> TYPE ANY,
                   <dyn_tab_temp> TYPE STANDARD TABLE.*******************************************************************
    * SELECTION SCREEN                                                *
    PARAMETERS: tabname(30) TYPE c,
                lines(5)  TYPE n.*******************************************************************
    * START-OF-SELECTION                                              *
    START-OF-SELECTION.* Storing table name
      p_table = tabname.* Create internal table dynamically with the stucture of table name
    * entered in the selection screen
      CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_table->* TO <dyn_table>.
      IF sy-subrc <> 0.
        MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.    LEAVE TO LIST-PROCESSING.
      ENDIF.
    * Create workarea for the table
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.* Create another temp. table
      CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_tab->* TO <dyn_tab_temp>.  SORT i_fieldcat BY col_pos.* Select data from table
      SELECT * FROM (p_table)
      INTO TABLE <dyn_table>
      UP TO lines ROWS.  REFRESH <dyn_tab_temp>.* Display report
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_structure_name         = p_table
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_PF_STATUS'
        TABLES
          t_outtab                 = <dyn_table>
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.  IF sy-subrc <> 0.  ENDIF.*&-----------------------------------------------------------------*
    *&      Form  SET_PF_STATUS
    *       Setting custom PF-Status
    *      -->RT_EXTAB   Excluding table
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.  SET PF-STATUS 'Z_STANDARD'.ENDFORM.                    "SET_PF_STATUS*&----------------------------------------------------------------*
    *&      Form  user_command
    *       Handling custom function codes
    *      -->R_UCOMM      Function code value
    *      -->RS_SELFIELD  Info. of cursor position in ALV
    FORM user_command  USING    r_ucomm LIKE sy-ucomm
                               rs_selfield TYPE slis_selfield.* Local data declaration
      DATA: li_tab TYPE REF TO data,
            l_line TYPE REF TO data.* Local field-symbols
      FIELD-SYMBOLS:<l_tab> TYPE table,
                    <l_wa>  TYPE ANY.* Create table
      CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN li_tab->* TO <l_tab>.* Create workarea
      CREATE DATA l_line LIKE LINE OF <l_tab>.
      ASSIGN l_line->* TO <l_wa>.  CASE r_ucomm.*   When a record is selected
        WHEN '&IC1'.*     Read the selected record
          READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
          rs_selfield-tabindex.      IF sy-subrc = 0.*       Store the record in an internal table
            APPEND <dyn_wa> TO <l_tab>.*       Fetch the field catalog info
            CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
              EXPORTING
                i_program_name         = 'Z_DEMO_PDF_JG'
                i_structure_name       = p_table
              CHANGING
                ct_fieldcat            = i_fieldcat
              EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
            IF sy-subrc = 0.*         Make all the fields input enabled except key fields
              w_field-input = 'X'.          MODIFY i_fieldcat FROM w_field TRANSPORTING input
              WHERE key IS INITIAL.        ENDIF.*       Display the record for editing purpose
            CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
              EXPORTING
                i_callback_program    = sy-repid
                i_structure_name      = p_table
                it_fieldcat           = i_fieldcat
                i_screen_start_column = 10
                i_screen_start_line   = 15
                i_screen_end_column   = 200
                i_screen_end_line     = 20
              TABLES
                t_outtab              = <l_tab>
              EXCEPTIONS
                program_error         = 1
                OTHERS                = 2.        IF sy-subrc = 0.*         Read the modified data
              READ TABLE <l_tab> INDEX 1 INTO <l_wa>.*         If the record is changed then track its index no.
    *         and populate it in an internal table for future
    *         action
              IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
                <dyn_wa> = <l_wa>.
                i_index = rs_selfield-tabindex.
                APPEND i_index.
              ENDIF.
            ENDIF.      ENDIF.*   When save button is pressed
        WHEN 'SAVE'.*     Sort the index table
          SORT i_index.*     Delete all duplicate records
          DELETE ADJACENT DUPLICATES FROM i_index.      LOOP AT i_index.*       Find out the changes in the internal table
    *       and populate these changes in another internal table
            READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
            IF sy-subrc = 0.
              APPEND <dyn_wa> TO <dyn_tab_temp>.
            ENDIF.      ENDLOOP.*     Lock the table
          CALL FUNCTION 'ENQUEUE_E_TABLE'
            EXPORTING
              mode_rstable   = 'E'
              tabname        = p_table
            EXCEPTIONS
              foreign_lock   = 1
              system_failure = 2
              OTHERS         = 3.      IF sy-subrc = 0.*       Modify the database table with these changes
            MODIFY (p_table) FROM TABLE <dyn_tab_temp>.        REFRESH <dyn_tab_temp>.*       Unlock the table
            CALL FUNCTION 'DEQUEUE_E_TABLE'
              EXPORTING
                mode_rstable = 'E'
                tabname      = p_table.      ENDIF.
      ENDCASE.  rs_selfield-refresh = 'X'.ENDFORM.                    "user_command
    Thanks,
    Sriram Ponna.

  • How to capture changed value in ALV Grid

    Hi Guys,
    I have an ALV grid report where I have 'Edit On' for one of the quantity fields in the report. How do I capture the new (changed) value in the suboutine for user command when user changes the value in the report and clicks on a button ?
    Points assured for helpful replies.

    FORM USER_COMMAND USING P_UCOMM LIKE SY-UCOMM...........
    Data ref1 type ref to cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    E_GRID = ref1.
    call method ref1->check_changed_data
    ENDFORM.
    Also chk the blog
    /people/community.user/blog/2007/01/10/displaychange-mode-of-editable-fields-in-alv-using-function-modules-but-not-custom-containers

  • Validations and default Values in ALV Grid

    All,
    I am using "set_table_for_first_display" to display a grid with empty editable rows wherein which users can enter data and process certain transactions.
    My requirement is to know if we can provide drop-downs and default values in this grid. for ex. if user want to insert a row, that row should automatically have some default values like company code, sales org etc.
    Also, if there is an error while validating the data, I should be able to set the focus on that field while displaying the error message. I was able to display error message but could not set the focus on the field that need to be corrected.
    Your earlier response is much appreciated.
    Regards
    Kasi

    Hi kasi,
    check these links:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/an easy reference for alv grid control.pdf
    http://www.abap4.it/download/ALV.pdf
    hope this helps,
    keerthi.

  • Display seletion screen values in alv grid output

    Hi,
    I am changing from alv list to alv grid. In ALV list after displaying output, in application tool bar one button is there that is "Display selections", when i click it, is giving all selection screen values in a popup. i want same funtionality in ALV grid.
    By
    jagan

    Hi,
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program     = l_repid
          i_callback_top_of_page = 'TOP_OF_PAGE'
    FORM top_of_page .
      PERFORM populate_top_of_page .
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = ig_header.
    ENDFORM.                    " top_of_page
    *&      Form  populate_top_of_page
    FORM populate_top_of_page .
      REFRESH ig_header.
      CLEAR wg_header .
      wg_header-typ  = c_h.
      wg_header-info = 'Selection Criteria:'(004).
      APPEND wg_header TO ig_header.
      CLEAR: wg_header.
      IF NOT s_lgort IS INITIAL.
        CONCATENATE s_lgort-low '-'(111) s_lgort-high
               INTO g_text1 SEPARATED BY space .
      ENDIF.
      wg_header-typ  = c_s.
      wg_header-key = 'Storage Location :'(005).
      wg_header-info = g_text1 .
      APPEND wg_header TO ig_header.
      CLEAR: wg_header.
      CLEAR g_text1.
      IF NOT s_ekgrp IS INITIAL.
        CONCATENATE s_ekgrp-low '-'(111) s_ekgrp-high
               INTO g_text1 SEPARATED BY space .
      ENDIF.
      wg_header-typ  = c_s.
      wg_header-key = 'Purchasing Group :'(006).
      wg_header-info = g_text1 .
      APPEND wg_header TO ig_header.
      CLEAR: wg_header.
      CLEAR g_text1.
      IF NOT s_werks IS INITIAL.
        CONCATENATE s_werks-low '-'(111) s_werks-high
               INTO g_text1 SEPARATED BY space .
      ENDIF.
      wg_header-typ  = c_s.
      wg_header-key = 'Plant :'(007).
      wg_header-info = g_text1 .
      APPEND wg_header TO ig_header.
      CLEAR: wg_header.
      CLEAR g_text1.
    ENDFORM.                    " populate_top_of_page
    Hope this is helpful...
    Regards
    Milan

  • Changing Values on ALV Grid (using Classes)

    Hi all,
        I have ALV Grid output, on which ZMENG (Target Qty) column is editable. So user will enter in value in ZMENG column and press ENTER. Then TOTAL column should be populated with ZMENG * NETWR columns. I have tried with changing/ entering values with char data type columns like MAKTX etc.. Its working fine with them. But when I entered in value in ZMENG, the actual value which I have entered is not flowing into LS_GOOD-VALUE. For char data types its been populated with user entered values.
          Can anyone please tell why its not happening with Quantity or Currency fields.
      method handle_data_changed.
        DATA: ls_good TYPE lvc_s_modi,
              l_netwr TYPE vbap-netwr,
              l_total TYPE vbap-netwr,
              l_zmeng TYPE vbap-zmeng.
        LOOP AT er_data_changed->mt_good_cells INTO ls_good.
          CASE ls_good-fieldname.
            WHEN 'ZMENG'.
              <<<<l_zmeng = ls_good-value.>>>>
              call method er_data_changed->get_cell_value
                             exporting i_row_id = ls_good-row_id
                                       i_fieldname = 'NETWR'
                             importing e_value = l_netwr.
              l_total = l_zmeng * l_netwr.
              call method er_data_changed->modify_cell
                        exporting i_row_id = ls_good-row_id
                                  i_fieldname = 'TOTAL'
                                  i_value     = l_total.
          ENDCASE.
      ENDLOOP.
    ENDMETHOD.
    Fieldcatlog for Quantity field:
      l_fcat-tabname = 'IT_VBAP'.
      l_fcat-fieldname = 'ZMENG'.
      l_fcat-coltext = 'Qty'.
      l_fcat-outputlen = 17.
      l_fcat-edit = 'X'.
      APPEND l_fcat TO ct_fcat.
      CLEAR l_fcat.

    Hi Jaker 
    Try calling cl_gui_alv_Grid->refresh_table_display.
    refresh table display when ever the qty is changed.
    It should work.
    Venkat.

  • Decimal with initial value in ALV GRID

    I am using ALV GRID and one of the fields displays quantity. When I have values ​​in this field, it is displayed correctly, but when I do not have value, instead of displaying "0.00000" displays an empty space. How do I display "0.00000"?
    Used following code:
        wa_fieldcat-tabname       = lv_tabname         .
         wa_fieldcat-fieldname     = 'QUANTITY'         .
         wa_fieldcat-ref_fieldname = 'QUANTITY'         .
         wa_fieldcat-ref_tabname   = lv_tabname         .
         wa_fieldcat-just          = 'R'                .
         wa_fieldcat-col_pos       = i                  .
         wa_fieldcat-seltext_l     = text-011           .
         wa_fieldcat-seltext_m     = text-011           .
         wa_fieldcat-seltext_s     = text-011           .
         wa_fieldcat-outputlen     = 20                 .
         wa_fieldcat-qfieldname    = 'ZMENGE_D'.
         APPEND wa_fieldcat TO t_fieldcat.
    ZMENGE_D' is data element with QUAN data type lenght 5, decimal plaes 5. This data element is used in QUANTITY ref_fieldname.

    Hi Zhang,
         I Set wa_fieldcat-qfieldname and display "0.00000", However, all other fields were plain when you have values​​. In the second row, for example, a value of "8.000,00000" is displayed with "8000.00000". I need the initial valir appears with "0,00000" and the values ​​filled in the format "8.000,00000".

  • Hiding Fields in ALV-Grid Display

    Hi Experts,
    Can anybody help me on the below logic?
    I have 16 different transactions in GLPCT Table. Based on given Period(1 to 16 in Select Options), these transactions(HSL01, HSL02...HSL16) should get display. Other than entered Period, Fields should be Hidden inthe output.
    Currently, I am populating all the Sixteen Fields.
    I am finding difficulty in doing this.
    Thanks
    Praveen

    Hello,
    Based on the periods selected, you need to mark the redundant fields as "technical". Based on the ALV display technique this is what you've to do:
    1. REUSE* FMs & GUI ALV Grid Class :
    it_fieldcat-tech = 'X'.
    2. SALV Class:
    CL_SALV_COLUMN->SET_TECHNICAL(IF_SALV_C_BOOL_SAP=>TRUE).
    Check the forums for further details.
    BR,
    Suhas

  • Display listbox key value in ALV GRID method

    Hi All,
    I have a program in which columns are generted dynamically based on number of fields. The column name is dynamic as it depends on its text while The value in Column's can be 1, 2, 3, 4, 5.
    I am trying to display this in a list box along with the text which are maintained as fixed values at domain level.
    space Walking
    1       Archery   
    2       Boxing
    3       Cycling
    4       Rowing
    Also I am displaying by using 'DD_DOMVALUEs_GET, looping through all the fixed values and concatenate
    domvalue_l   ddtext separated by cl_abap_char_utilities=>horizontal_tab. No tab space is coming between key and value.
    Also for the 1st value which is space it is not coming properly as space is condensed.
    The point is that after I am putting values in the grid. The system event data changed is called where the value selected is  1 Archery and it is going to bad cells, error protocol display . I want only the 1st character. How to modify the content in the grid before the system event gets called.
    Regards,
    DPM

    Hi,
    try follow code to setup fieldcat of that DROP DOWN field.
    FCAT-DOMNAME = ' '.
    FCAT-CHECKTABLE= '!'.

  • Get checkbox values from alv grid

    Hi,
    I'm using the function REUSE_ALV_GRID_DISPLAY and I'm showing a table with a field like a checkbox.
    In USER_COMMAND FORM to get selected values do as follow:
        CALL METHOD REF_GRID->CHECK_CHANGED_DATA.
    And then:
    loop at i_pos (my table) with checkbox eq 'X'.
    endloop.
    The first time I execute the ALV every thing is OK but if I do any action (I use the function 'BAPI_GOODSMVT_CREATE' ...), I refresh the data and I raise the alv again. In USER COMMAND FORM the code is the same and I can not get checkbox values.
    Can someone help me please?
    Thanks and regards.

    Hi,
    Check this
        call function 'REUSE_ALV_GRID_DISPLAY'
          exporting
            it_fieldcat                 = pt_grpfcat[]
            it_excluding                = p_grpexcltab2[]
            is_layout                   = pt_grplayout2
            i_callback_program          = sy-repid
            i_callback_html_top_of_page = p_header
            i_callback_pf_status_set    = v_status_set1
            i_callback_user_command     = f_user_command1
            i_screen_start_column       = 25
            i_screen_start_line         = 5
            i_screen_end_column         = 80
            i_screen_end_line           = 20
            it_events                   = i_events[]
          tables
            t_outtab                    = i_grpoutput.
    form f_user_command1 using p_ucomm type sy-ucomm
                         rs_selfield type  slis_selfield.
      data p_ref1 type ref to cl_gui_alv_grid.
      call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        importing
          e_grid = p_ref1.
      call method p_ref1->check_changed_data.
      case p_ucomm.
        when 'YCNC'.
          leave to screen 0.
       endcase.
      rs_selfield-refresh = c_x.   " Grid refresh  < You need to fill up this
    endform.                                 " F_user_command1
    aRs

  • Hiding columns in ALV Grid output

    Hi all,
    Please find below my piece of code. I want to hide couple of columns in the grid output. Could you please tell me how to achieve it.
      DATA: gr_alv        TYPE REF TO cl_salv_table,
            lr_display    TYPE REF TO cl_salv_display_settings,
            lr_columns    TYPE REF TO cl_salv_columns_table,
            lr_column     TYPE REF TO cl_salv_column_table,
            lr_functions  TYPE REF TO cl_salv_functions_list,
            lr_sorts      TYPE REF TO cl_salv_sorts,
            lr_print      TYPE REF TO cl_salv_print,
            lr_column_f   TYPE REF TO cl_salv_columns,
            gr_error      TYPE REF TO cx_salv_not_found ,
            lr_event      TYPE REF TO cl_salv_events_table,
            lr_handler    TYPE REF TO znew_gc_event_handler,
            lr_layout     TYPE REF TO cl_salv_layout.
      DATA: key     TYPE salv_s_layout_key,
            gr_msg  TYPE string.
      TRY.
    * Create ALV instance - use CALL METHOD since this is a static method
          CALL METHOD cl_salv_table=>factory
            IMPORTING
              r_salv_table = gr_alv
            CHANGING
              t_table      = lt_to_header.
          lr_display = gr_alv->get_display_settings( ).
          lr_display->set_list_header( text-ttl ).
    * Get functions object and then set all the functions to be allowed
          lr_functions = gr_alv->get_functions( ).
          lr_functions->set_all( ).
          DATA: lv_field TYPE lvc_fname.
    * Get column settings object and then optimize the column widths to the
    * data
          lr_columns = gr_alv->get_columns( ).
          lr_columns->set_optimize( ).
    *--- set column header for custom field Todays Date
          TRY.
              lr_column ?= lr_columns->get_column( 'ZZDATE' ).
              lr_column->set_output_length('12').
              lr_column->set_long_text( 'Todays Date' ).
            CATCH cx_salv_not_found INTO gr_error.
              gr_msg = gr_error->get_text( ).
              MESSAGE gr_msg TYPE 'I'.
          ENDTRY.
    *--- set column header for custom field Age of Open
          TRY.
              lr_column ?= lr_columns->get_column( 'ZZ_AGE_OF_OPEN' ).
              lr_column->set_output_length('12').
              lr_column->set_long_text( 'Age of Open' ).
            CATCH cx_salv_not_found INTO gr_error.
              gr_msg = gr_error->get_text( ).
              MESSAGE gr_msg TYPE 'I'.
          ENDTRY.
    *--- set column header for custom field Age when Confirmed
          TRY.
              lr_column ?= lr_columns->get_column( 'ZZ_AGE_CONFIRMED' ).
              lr_column->set_output_length('18').
              lr_column->set_long_text( 'Age when Confirmed' ).
            CATCH cx_salv_not_found INTO gr_error.
              gr_msg = gr_error->get_text( ).
              MESSAGE gr_msg TYPE 'I'.
          ENDTRY.
          lr_event = gr_alv->get_event( ).
          CREATE OBJECT lr_handler.
          SET HANDLER: lr_handler->on_double_click FOR lr_event.
    *... Set Sort
          lr_sorts = gr_alv->get_sorts( ).
    *        " Optimize the column widths for printing.
          lr_print = gr_alv->get_print( ).
          lr_print->set_print_parameters_enabled( value = 'X' ).
          lr_print->set_column_optimization( value = 'X' ).
    *--- This code is to get the layout,save the layout and display the
    *    layout
          lr_layout = gr_alv->get_layout( ).
          key-report = sy-repid.
          lr_layout->set_key( key ).
          lr_layout->set_save_restriction( cl_salv_layout=>restrict_none )
          DATA: init_layout TYPE slis_vari.
          init_layout = p_layout.
          lr_layout->set_initial_layout( init_layout ).
    *--- display report
          gr_alv->display( ).
        CATCH cx_salv_msg.
          WRITE: 'Error displaying grid! - cx_salv_msg'.
        CATCH cx_salv_not_found.
          WRITE: 'Error displaying grid! - cx_salv_not_found'.
        CATCH cx_salv_data_error.
          WRITE: 'Error displaying grid! - cx_salv_data_error'.
        CATCH cx_salv_existing.
          WRITE: 'Error displaying grid! - cx_salv_existing'.
      ENDTRY.
    Thanks,
    Salil

    HI
    THIS IS THE LOGIC
    SELECTION-SCREEN BEGIN OF BLOCK charly
                     WITH FRAME TITLE text-100.
    PARAMETERS: rb_dis RADIOBUTTON GROUP rb DEFAULT 'X'
                                      USER-COMMAND ucomm ,
                rb_hid RADIOBUTTON GROUP rb .
               P_DEL TYPE VBAK-VKGRP .
    SELECTION-SCREEN END   OF BLOCK charly.
    *SELECTION sCREEN FOR PO TABLE
    SELECTION-SCREEN BEGIN OF BLOCK b2
                     WITH FRAME TITLE v_text.
    SELECT-OPTIONS : s_xblnr  FOR  zmshub-xblnr MODIF ID gr2,
                     s_bstkd   FOR  zmshub-bstkd MODIF ID gr2,
                     s_posex   FOR  zmshub-posex_e MODIF ID gr2,
                     s_kdmat  FOR  zmshub-kdmat MODIF ID gr2.
    PARAMETERS : p_upload LIKE ibipparms-path LENGTH 90  MODIF ID gr3 ,
                 p_down LIKE ibipparms-path  DEFAULT 'C:\output_log.txt'
                                           MODIF ID gr3.
    SELECTION-SCREEN END OF BLOCK b2.
    *SELECTION sCREEN FOR  DOWNLOADING
    SELECTION-SCREEN BEGIN OF BLOCK b4
                     WITH FRAME TITLE text-105.
    PARAMETERS :
              rb_n_d_f  RADIOBUTTON GROUP rb1 DEFAULT 'X' ,
              rb_ftp   RADIOBUTTON GROUP rb1 ,
              p_f_n TYPE c LENGTH 25 DEFAULT 'FILE NAME .TXT',
              rb_ws_d  RADIOBUTTON GROUP rb1 ,
              p_dw_f_n TYPE c LENGTH 25 DEFAULT 'C:
    TEMP\FILE.TXT',
              rb_op_ds RADIOBUTTON GROUP rb1 ,
              p_log_p LIKE filename-pathintern  DEFAULT 'ZHKWEB01',
              p_pa_fn LIKE rlgrap-filename MODIF ID gr1
                     DEFAULT  '//SOME-DIR/FILE.TXT',
              rb_ob_dw    RADIOBUTTON GROUP rb1,
             p_file LIKE filename-pathintern   "logical path
                        DEFAULT 'ZHKWEB01',       "name
             p_fname LIKE rlgrap-filename MODIF ID gr1     "path &
    *filename
                     DEFAULT text-t02,             "/some-dir/file.txt
              p_f_name TYPE c LENGTH 25 DEFAULT
    SOME-SERVERNAME\SOME-DIR\SOME-FILE.TXT'.
    SELECTION-SCREEN END OF BLOCK b4.
    AT SELECTION-SCREEN OUTPUT.
      IF NOT rb_dis IS INITIAL.
        LOOP AT SCREEN.
          IF screen-group1 = 'GR3'.
            screen-invisible = 1.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = 'GR2'.
            screen-invisible = 0.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.

Maybe you are looking for

  • Issue with Input Parameters & Variables

    Hello Gurus, I have a situation where, when the user enter "Parent Company"   say for ex: ABC, then the over all Result should filter by 'ABC', and then there is key figure column where I need to consider not equal to ABC and then sum the key figure.

  • What is the "Smart Encoding Adjustments" option?

    While choosing my importing settings, I couldn't help but notice the option "Smart Encoding Adjustments" at the bottom of the MP3 Encoder settings (just above the High-Pass Filter option and buttons). I searched the discussions, I searched Google, an

  • Unable to Use Proofing Tools in Portuguese after Installation

    Good Afternoon! I am wondering if someone might be able to point me in the right direction with this.   Our computers all run Windows 7 x64 Enterprise, with Office 2010 Professional Plus.  I have one user, who has enabled her Portuguese keyboard and

  • How to view the CIP4 metadata on the exported PDF?

    Hi All, I've a sample plugin from the InDesign SDK (PDFVT). This plugin writes some CIP4 metadata in the exported PDF. My question is how can we view these CIP4 metadata using Acrobat? Is there some other tool/software to view these metadata informat

  • Adobe Reader Won't Show up in Chrome

    Adobe plugin does not show up in my Chrome:Plugins menu. I turned off the the Google Chrome PDF viewer, and now the Adobe plugin has disappeared. Suggestions?