How to set some rows in ALV to be editable or some non editable.

Dear all Gurus,
I'm facing a situation here, I need your assistance.
I'm creating a alv table where the user can enter a data and then this will be uploaded into the system. Now upon validation some records might fail and would need some changes and some records that had no problems would have been successfully posted.
When the program returns to the user i want the successful one's to be greyed out and not editable. I'm not sure on how i could acess the rows of the table. I tried few classes and an all i could manage was to change the table setting and configs.
Below i've pasted the code on how i've code my alv table. Please advice on how i could access the rows and disable the successfull ones. Please.
METHOD wddoinit .
  DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage,
        l_interface     TYPE REF TO iwci_salv_wd_table,
       l_model         TYPE ref to cl_salv_wd_config_table, "Contains all characteristics of a table(collumns, fields, etc)
        lt_columns      TYPE        salv_wd_t_column_ref,  " Table type
        lt_fields       TYPE        salv_wd_t_field_ref,   " Table type
        l_btn_ins       TYPE REF TO cl_salv_wd_fe_button,
        l_btn_del       TYPE REF TO cl_salv_wd_fe_button,
        l_btn_sell_all  TYPE REF TO cl_salv_wd_fe_button,
        l_btn_dell_all  TYPE REF TO cl_salv_wd_fe_button,
        l_btn_calc      TYPE REF TO cl_salv_wd_fe_button,
        l_btn_save      TYPE REF TO cl_salv_wd_fe_button,
        l_function      TYPE REF TO cl_salv_wd_function,
        l_column        TYPE REF TO cl_salv_wd_column,
        l_header        TYPE REF TO cl_salv_wd_column_header,
        lr_input_1      TYPE REF TO cl_salv_wd_uie_input_field,
        lr_input_2      TYPE REF TO cl_salv_wd_uie_input_field,
        lr_input_3      TYPE REF TO cl_salv_wd_uie_input_field,
        lr_input_4      TYPE REF TO cl_salv_wd_uie_input_field,
        lr_input_5      TYPE REF TO cl_salv_wd_uie_input_field,
        lr_input_6      TYPE REF TO cl_salv_wd_uie_input_field,
        lr_input_7      TYPE REF TO cl_salv_wd_uie_input_field,
        lr_input_8      TYPE REF TO cl_salv_wd_uie_input_field,
        lr_input_9      TYPE REF TO cl_salv_wd_uie_input_field,
        lr_input_10     TYPE REF TO cl_salv_wd_uie_input_field,
        lr_input_11     TYPE REF TO cl_salv_wd_uie_input_field,
        lr_input_12     TYPE REF TO cl_salv_wd_uie_input_field,
        l_link          TYPE REF TO cl_salv_wd_uie_button.
  CONSTANTS:
          zzto                        TYPE  string VALUE 'ZZTO',
          zzfrom                      TYPE  string VALUE 'ZZFROM',
          takeoff_date                TYPE  string VALUE 'TAKEOFF_DATE',
          read_date                   TYPE  string VALUE 'READ_DATE',
          takeoff_time                TYPE  string VALUE 'TAKEOFF_TIME',
          read_time                   TYPE  string VALUE 'READ_TIME',
          ac_hrs                      TYPE  string VALUE 'AC_HRS',
          le_hrs                      TYPE  string VALUE 'LE_HRS',
          re_hrs                      TYPE  string VALUE 'RE_HRS',
          ac_cycle                    TYPE  string VALUE 'AC_CYCLE',
          re_cycle                    TYPE  string VALUE 'RE_CYCLE',
          le_cycle                    TYPE  string VALUE 'LE_CYCLE',
          ltext                       TYPE  string VALUE 'LTEXT'.
  l_ref_cmp_usage =   wd_this->wd_cpuse_multi_alv( ).
  IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
    l_ref_cmp_usage->create_component( ).
  ENDIF.
*Map the interface.
  l_interface = wd_this->wd_cpifc_multi_alv( ).
  DATA:
    node_mdoc                           TYPE REF TO if_wd_context_node,
    elem_mdoc                           TYPE REF TO if_wd_context_element.
navigate from <CONTEXT> to <MDOC> via lead selection
  node_mdoc = wd_context->get_child_node( name = if_create_mass_entry=>wdctx_mdoc ).
  l_interface->set_data( r_node_data = node_mdoc ).
*Map the model
  wd_this->l_model = l_interface->get_model( ).
*Map the columns
  lt_columns = wd_this->l_model->if_salv_wd_column_settings~t_columns.
*Map the fields
  lt_fields = wd_this->l_model->if_salv_wd_field_settings~t_fields.
  cl_salv_wd_model_table_util=>if_salv_wd_table_util_stdfuncs~set_all(
                    EXPORTING r_model = wd_this->l_model
                              allowed = abap_false ). " try abap_true
*Enable or Disable the ALV desired outlook and design
  wd_this->l_model->if_salv_wd_table_settings~delete_header( ).
  wd_this->l_model->if_salv_wd_table_settings~set_selection_mode(
                                       value  = cl_wd_table=>e_selection_mode-auto ).
  wd_this->l_model->if_salv_wd_table_settings~set_width( value = '100%'  ).
  wd_this->l_model->if_salv_wd_table_settings~set_visible_row_count( value  = '10' ).
  wd_this->l_model->if_salv_wd_table_settings~set_read_only( value  = abap_false  ).
  wd_this->l_model->if_salv_wd_std_functions~set_filter_filterline_allowed( value  = abap_true ).
  wd_this->l_model->if_salv_wd_std_functions~set_sort_headerclick_allowed( value = abap_true ).
  wd_this->l_model->if_salv_wd_std_functions~set_export_allowed( value = abap_false ).
*Adding functionalities to the ALV
*'Insert Row' Button
  CREATE OBJECT l_btn_ins.
  l_btn_ins->set_text( 'Insert Row' ).
  l_btn_ins->set_tooltip( 'To enter a new row' ).
  l_btn_ins->set_image_source( value = 'ICON_INSERT_ROW'  ).
  l_function = wd_this->l_model->if_salv_wd_function_settings~create_function( id = 'INSERT'  ).
  l_function->set_position( value = '1' ).
  l_function->set_editor( value = l_btn_ins  ).
*'Delete Row' Button
  CREATE OBJECT l_btn_del.
  l_btn_del->set_text( 'Delete Row' ).
  l_btn_del->set_tooltip( 'Delete the selected row' ).
  l_btn_del->set_image_source( value = 'ICON_DELETE_ROW' ).
  l_function = wd_this->l_model->if_salv_wd_function_settings~create_function( id = 'DELETE'  ).
  l_function->set_position( value = '2' ).
  l_function->set_editor( value = l_btn_del  ).
*'Select All' Button
  CREATE OBJECT l_btn_sell_all.
  l_btn_sell_all->set_text( 'Select All' ).
  l_btn_sell_all->set_tooltip( 'Select all entered record' ).
  l_btn_sell_all->set_image_source( value = 'ICON_INSERT_ROW'  ).
  l_function = wd_this->l_model->if_salv_wd_function_settings~create_function( id = 'SELECT'  ).
  l_function->set_position( value = '3' ).
  l_function->set_editor( value = l_btn_sell_all ).
*'Deselect All' Button
  CREATE OBJECT l_btn_dell_all.
  l_btn_dell_all->set_text( 'Deselect All' ).
  l_btn_dell_all->set_tooltip( 'Deselect all records selected' ).
  l_btn_dell_all->set_image_source( value = 'ICON_DESELECT_ALL'  ).
  l_function = wd_this->l_model->if_salv_wd_function_settings~create_function( id = 'DESELECT'  ).
  l_function->set_position( value = '4' ).
  l_function->set_editor( value = l_btn_dell_all  ).
*'Calculate' Button
  CREATE OBJECT l_btn_calc.
  l_btn_calc->set_text( 'Calculate Hours' ).
  l_btn_calc->set_tooltip( 'Calculate hours of each record' ).
  l_btn_calc->set_image_source( value = 'ICON_CALCULATION'  ).
  l_function = wd_this->l_model->if_salv_wd_function_settings~create_function( id = 'CALC'  ).
  l_function->set_position( value = '5' ).
  l_function->set_editor( value = l_btn_calc  ).
*'Save' Button
  CREATE OBJECT l_btn_save.
  l_btn_save->set_text( 'Save All' ).
  l_btn_save->set_tooltip( 'Save all' ).
  l_btn_save->set_image_source( value = 'ICON_SYSTEM_SAVE'  ).
  l_function = wd_this->l_model->if_salv_wd_function_settings~create_function( id = 'SAVE'  ).
  l_function->set_position( value = '6' ).
  l_function->set_editor( value = l_btn_save  ).
  FIELD-SYMBOLS: <fs_column>  TYPE salv_wd_s_column_ref.
  LOOP AT lt_columns ASSIGNING <fs_column>.
    l_column = <fs_column>-r_column.
    l_column->get_header( RECEIVING value = l_header ).
    l_header->set_ddic_binding_field( value  = if_salv_wd_c_column_settings=>ddic_bind_none ).
    CASE <fs_column>-id .
      WHEN zzfrom.
        CREATE OBJECT lr_input_1  EXPORTING  value_fieldname = zzfrom.
        l_header->set_text( value = 'Flt Fr' ).
        l_column->set_position( value = '1'  ).
        l_column->set_cell_editor( lr_input_1 ).
       l_column->set_visible( '0' ).
      WHEN zzto.
        CREATE OBJECT lr_input_2  EXPORTING  value_fieldname = zzto.
        l_header->set_text( value = 'Flt To' ).
        l_column->set_position( value = '2'  ).
        l_column->set_cell_editor( lr_input_2 ).
      WHEN takeoff_date.
        CREATE OBJECT lr_input_3  EXPORTING  value_fieldname = takeoff_date.
        l_header->set_text( value = 'Takeoff Date' ).
        l_column->set_position( value = '3'  ).
        l_column->set_cell_editor( lr_input_3 ).
      WHEN read_date.
        CREATE OBJECT lr_input_4  EXPORTING  value_fieldname = read_date.
        l_header->set_text( value = 'Landing Date' ).
        l_column->set_position( value = '4'  ).
        l_column->set_cell_editor( lr_input_4 ).
      WHEN takeoff_time.
        CREATE OBJECT lr_input_5  EXPORTING  value_fieldname = takeoff_time.
        l_header->set_text( value = 'Takeoff Time' ).
        l_column->set_position( value = '5'  ).
        l_column->set_cell_editor( lr_input_5 ).
      WHEN read_time.
        CREATE OBJECT lr_input_6  EXPORTING  value_fieldname = read_time.
        l_header->set_text( value = 'Landing Time' ).
        l_column->set_position( value = '6'  ).
        l_column->set_cell_editor( lr_input_6 ).
      WHEN ac_hrs.
        CREATE OBJECT lr_input_7  EXPORTING  value_fieldname = ac_hrs.
        l_header->set_text( value = 'Flt Time' ).
        l_column->set_position( value = '7'  ).
        l_column->set_cell_editor( lr_input_7 ).
      WHEN le_hrs.
        CREATE OBJECT lr_input_8  EXPORTING  value_fieldname = le_hrs.
        l_header->set_text( value = 'LH Eng Runtime' ).
        l_column->set_position( value = '8'  ).
        l_column->set_cell_editor( lr_input_8 ).
      WHEN re_hrs.
        CREATE OBJECT lr_input_9  EXPORTING  value_fieldname = re_hrs.
        l_header->set_text( value = 'RH Eng Runtime' ).
        l_column->set_position( value = '9'  ).
        l_column->set_cell_editor( lr_input_9 ).
      WHEN ac_cycle.
        CREATE OBJECT lr_input_10  EXPORTING  value_fieldname = ac_cycle.
        l_header->set_text( value = 'No. of Landings' ).
        l_column->set_position( value = '10'  ).
        l_column->set_cell_editor( lr_input_10 ).
      WHEN re_cycle.
        CREATE OBJECT lr_input_11  EXPORTING  value_fieldname = re_cycle.
        l_header->set_text( value = 'RH Eng Start' ).
        l_column->set_position( value = '11'  ).
        l_column->set_cell_editor( lr_input_11 ).
      WHEN le_cycle.
        CREATE OBJECT lr_input_12  EXPORTING  value_fieldname = le_cycle.
        l_header->set_text( value = 'LH Eng Start' ).
        l_column->set_position( value = '12'  ).
        l_column->set_cell_editor( lr_input_12 ).
      WHEN ltext.
        CREATE OBJECT l_link.
        l_link->set_image_source( value = 'ICON_CREATE_TEXT'  ).
        l_link->set_text_fieldname( ltext ).
        l_link->set_tooltip( value = 'Create Log'   ).
        l_header->set_text( value = 'Enter Log').
        l_column->set_cell_editor( l_link ).
        l_column->set_h_align( cl_wd_table_column=>e_h_align-center ).
        l_column->set_position( value = '13' ).
      WHEN OTHERS.
        l_column->set_visible( '01' ).
    ENDCASE.
  ENDLOOP.
ENDMETHOD.
Your any help is highly appreciated. Thank you.
Regards,
Vinod

Ok, here you go.
In your context, apart from your display fields, add another attribute READ_ONLY, type char01. And lets assume you want the field by name field_1 to be editable or not based on some validation. Your code will be like this to initialize the ALV.
DATA:
          l_alv_model               TYPE REF TO cl_salv_wd_config_table,
          lr_column_settings        TYPE REF TO if_salv_wd_column_settings,
          lr_column                 TYPE REF TO cl_salv_wd_column,
          lt_col                    TYPE SALV_WD_T_COLUMN_REF,
          ls_col                    TYPE SALV_WD_S_COLUMN_REF,
          lr_input_field            type ref to cl_salv_wd_uie_input_field.
    l_alv_model = l_ref_interfacecontroller->get_model( ).
    l_alv_model->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_false ).
    lr_column_settings ?= l_alv_model.
    lt_col = lr_column_settings->get_columns( ).
    LOOP AT lt_col INTO ls_col where ID = 'FIELD_1'.
         create object lr_input_field exporting value_fieldname = ls_col-id.
         lr_input_field->set_read_only_fieldname( 'READ_ONLY' ).
         ls_col-r_column->set_cell_editor( lr_input_field ).
    ENDLOOP.
In your event handler, you read your node, do a get_static_attributes_table. Perform all validations. Loop through your internal table and set the field READ_ONLY as 'X' when validation succeeds. Do READ_ONLY = space when validation fails. Then do a bind_elements. Now the rows for which read_only is false, will be editable and vice versa.
Hope I was clear enough. Get back if you have any doubts.
Regards,
Nithya

Similar Messages

  • How to set selected row in alv display?

    Hi,
    How do I select some particular row in alv - say at first display i want to highlight 4th row. How can i do that?
    Thanks,
    Sheel

    try to use method set_selected_rows just after method for first display.

  • Set specific rows in ALV grid ready for input

    Hi everyone,
      I have a question about how to set specific rows in ALV grid ready for input.
      I know that I can make some columns ready for input before the ALV displayed,but I have no idea how to make specific rows displayed in the ALV ready for input.

    Hello Aaron
    For editable columns we can use the fieldcatalog (LVC_S_FCAT-EDIT = 'X') but for rows you need to define editability on cell level.
    The required steps are documented in sample report BCALV_EDIT_02. Below I point out a few crucial points:
    *§1.Extend your output table for a field, e.g., CELLTAB, that holds
    *   information about the edit status of each cell for the
    *   corresponding row (the table type is SORTED!).
    DATA: BEGIN OF gt_outtab occurs 0.  "with header line
            include structure sflight.
    DATA: celltab type LVC_T_STYL.
    DATA: END OF gt_outtab.
    *§3.Provide the fieldname of the celltab field by using field
    *   STYLEFNAME of the layout structure.
       gs_layout-stylefname = 'CELLTAB'.
       CALL METHOD grid1->set_table_for_first_display
             EXPORTING i_structure_name = 'SFLIGHT'
                       is_layout        = gs_layout
             CHANGING  it_outtab        = gt_outtab[].
    Note: in the sample report only field SEATSMAX is editable. In your case you need
    to fill CELLTAB for all fields in a row.
    *§2.After selecting data, set edit status for each row in a loop
    *   according to field SEATSMAX.
      LOOP AT gt_outtab.
        l_index = sy-tabix.
        refresh lt_celltab.
        if gt_outtab-seatsmax ge 300.
            perform fill_celltab using 'RW'
                                 changing lt_celltab.
        else.
            perform fill_celltab using 'RO'
                                 changing lt_celltab.
        endif.
    *§2c.Copy your celltab to the celltab of the current row of gt_outtab.
        INSERT LINES OF lt_celltab INTO TABLE gt_outtab-celltab.
        MODIFY gt_outtab INDEX l_index.
      ENDLOOP.
    ENDFORM.                               " SELECT_DATA_AND_INIT_STYLE
    NOTE: LVC_T_STYL is a SORTED table type. Thus, take care that you are using the
    INSERT ... INTO TABLE statement and not APPEND (because then nothing is appended
    to the CELLTAB itab).
      IF p_mode EQ 'RW'.
    *§2a.Use attribute CL_GUI_ALV_GRID=>MC_STYLE_ENABLED to set a cell
    *    to status "editable".
        l_mode = cl_gui_alv_grid=>mc_style_enabled.
      ELSE. "p_mode eq 'RO'
    *§2b.Use attribute CL_GUI_ALV_GRID=>MC_STYLE_DISABLED to set a cell
    *    to status "non-editable".
        l_mode = cl_gui_alv_grid=>mc_style_disabled.
      ENDIF.
      ls_celltab-fieldname = 'SEATSMAX'.
      ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
      INSERT ls_celltab INTO TABLE pt_celltab.
    Regards
      Uwe

  • How to select multiple row in ALV report

    Hi friends,
    1. How to select multiple row in ALV report
                   ( How to set tab in ALV report and want to select multiple line.)
    Thanking you.
    Subash

    Hi Sahoo,
    If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
    in layout structure you will find field SEL_MODE
    pass :
    LS_LAYOUT-SEL_MODE = 'A'.
    In PAI.
      CALL METHOD GRID->GET_SELECTED_ROWS
        IMPORTING
          ET_INDEX_ROWS = T_ROWS
          ET_ROW_NO     = T_ROWID.
    Hope these will solve your problem.
    Regards,
    Kumar M.

  • How to set special rows in jtable not selectable

    Hello programmers,
    anybody knows how to set special rows(p.E. row 0) in jtable not selectable.
    in advance thanks for your answers

    table = new JTable(...)
         public void changeSelection(int row, int column, boolean toggle, boolean extend)
              if (row == 0)
                   return;
              else
                   super.changeSelection(row, column, toggle, extend);
    };

  • How to set max row display rows in PO's PLD

    Hi,
    How to set max row display rows in PO's PLD
    Thanks and Best Regards
    Bruce

    Hi
    Max. Rows per Page is depend on PLD Settings and Depend on Repetitive Area Fieds Height.
    Try this,
    1st Case:
    ->> Administration Module.
    ->> System Initialization.
    ->> Open the Print Perferences Window.
    ->> Click General Tab on Print Perferences Window.
    ->> Assign the Max. Rows per Page - 99 (or) your wishes.
    ->> Update the Print Perferences.
    2nd Case:
    ->> Open your PLD.
    ->> Choose Repetitive Area on Field Index Window.
    ->> Click Format Tab on Properties Area Window.
    ->> Assign the Lines in Repetitive Area - Your Wishes .
    ->> Save the PLD.
    Regards,
    Madhan.

  • How to edit only some rows in ALV

    Hi Experts,
    I have editable ALV. I need to allow edit only for some rows, not generaly all of them.
    Do you have any idea how to do it?
    I use ALV through FM module REUSE_ALV_GRID_DISPLAY.
    Thenks&regards,
    Jirka

    Hi,
    You need to use events. Sample code from sdn.
    TYPE-POOLS:SLIS.
    DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA: IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA:IT_EVENTS TYPE SLIS_T_EVENT.
    data: begin of it_chg occurs 0,
          index type sy-tabix,
          end of it_chg.
    DATA:  X_EVENTS    TYPE SLIS_ALV_EVENT.
    DATA: BEGIN OF ITAB OCCURS 0,
          NAME(10) TYPE C,
          ZTERM TYPE C,
          END OF ITAB.
    PERFORM FILL_TABLE.
    loop at itab where zterm = 'A'.
    it_chg-index = sy-tabix + 3. 
    " addition 3 IS FOR FIELD LABELS
    append it_chg.
    clear it_chg.
    endloop.
    DATA:L_POS TYPE I VALUE 1.
    CLEAR: L_POS.
    L_POS = L_POS + 1.
    **fieldcatalog
    X_FIELDCAT-FIELDNAME = 'NAME'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-OUTPUTLEN = '10'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    X_FIELDCAT-FIELDNAME = 'ZTERM'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-OUTPUTLEN = '10'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    **events
    REFRESH:IT_EVENTS.
    CLEAR:X_EVENTS,IT_EVENTS.
    X_EVENTS-NAME = SLIS_EV_END_OF_LIST.
    X_EVENTS-FORM = 'MODIFY_LIST'.
    APPEND X_EVENTS TO IT_EVENTS.
    CLEAR X_EVENTS.
    END-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = SY-REPID
          IT_FIELDCAT        = IT_FIELDCAT
          IT_EVENTS          = IT_EVENTS
        TABLES
          T_OUTTAB           = ITAB
        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.
    *&      Form FILL_TABLE
          text
    FORM FILL_TABLE.
      ITAB-NAME = 'vijay'.
      ITAB-ZTERM = 'A'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = 'ABC'.
      ITAB-ZTERM = 'B'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = 'TEST'.
      ITAB-ZTERM = 'C'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = 'DILIP'.
      ITAB-ZTERM = 'D'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = '123'.
      ITAB-ZTERM = 'E'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = 'GEN'.
      ITAB-ZTERM = 'A'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = 'ALV'.
      ITAB-ZTERM = 'F'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = 'ALVTEST'.
      ITAB-ZTERM = 'A'.
      APPEND ITAB.
      clear itab.
    ENDFORM.                    "FILL_TABLE
    *&      Form  MODIFY_LIST
          text
    FORM MODIFY_LIST.
    data: l_lines type i.
    describe table itab lines l_lines.
      L_LINES  = L_LINES + 3.
      "because we have 3 lines extra occupied by lables.
      "if we have header,i mean top of page add the no.of lines
      "how many ever top of page have + 3 for labels.
      DO L_LINES TIMES.
        read table it_chg with key INDEX = sy-index.
        if sy-subrc = 0.
    **This code is for reading the out put line
    **and modify accordinlg to our requiremnet.
    **don't chnage this.
          READ LINE SY-INDEX INDEX SY-LSIND.
          IF SY-SUBRC = 0.
            MODIFY LINE SY-INDEX INDEX SY-LSIND
                       FIELD FORMAT ITAB-NAME INPUT.
          ENDIF.
        ENDIF.
      ENDDO.
    ENDFORM.                    "MODIFY_LIST

  • Hotspot click for only some rows in ALV grid for a particular column ?

    Hi there,
            In ALV grid, we can make Hotspot enable for all rows in a specified column
    by specifying in the fieldcatalog with Hotspot attribute set as true.
    But I want to enable Hotspot only for certain rows in the particular column. I tried with MC_STYLE4_LINK , but I didnt got the required result.
    So , how could I achieve that in ALV grid.
    Points would be rewarded for helpful answers.
    Regards,
    Anil .

    Hi,
    You can do it for a column. Please refer to the code snippet below,
      DATA : it_fcat TYPE lvc_t_fcat,
             wa_fcat LIKE LINE OF it_fcat.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
       EXPORTING
      I_BUFFER_ACTIVE              =
         i_structure_name             = 'SMMW_ALERTS_ICON_S'
      I_CLIENT_NEVER_DISPLAY       = 'X'
      I_BYPASSING_BUFFER           =
      I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = it_fcat
       EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 2
         OTHERS                       = 3
    LOOP AT it_fcat INTO wa_fcat.
      IF wa_fcat-fieldname = 'STATUS'.
        wa_fcat-hotspot = 'X'.
        MODIFY it_fcat FROM wa_fcat.
        CLEAR wa_fcat.
      ENDIF.
    ENDLOOP.
    CALL METHOD l_obj_alv_grid->set_table_for_first_display
          EXPORTING
        i_structure_name              = 'SMMW_ALERTS_ICON_S'
       CHANGING
            it_outtab                     = lt_alerts_st
            it_fieldcatalog               = it_fcat.
    In the above replace the structure 'SMMW_ALERTS_ICON_S' with your structure and column 'STATUS' with your desired column.
    Hope this helps,
    Regards,
    Vinodh

  • How to set a row as default row in adf table

    Hi,
    I have a requirement: when page is launched there are multiple records with different status displayed on the page and i had to make the first record with Status = XXX as default selected row in adf table. How to code it?
    Thanks!
    Susan

    Hi Frank,
    Thanks a lot for your quick response!
    We are using Jdev 11g. After received your response, i went through all of your responses in ADF coner and OTN for the related topics (setting detail row) and got some ideas(Specially, i got your detail coding for moving makeCurrent expression into selection listener method into backing bean, etc ) and was ready for coding this function. But our PM changed their mind and we dont need this function. So, I had to move to another area......
    Your articles and your responses really help me!
    Thanks again for your help!
    Susan

  • How to set summable field in ALV

    Dear ABAPers,
    I find report that use ALV to show the output. Using my id the field with number type is summable (using ALV sum functionality) but using other id, it can't. Does anyone know how to set this functionality? I read several posting that this one is achieveable by setting up t_field_cat-do_sum = 'X'. But with this set up, it shouldn't have difference when I run by my id and other. I suppose there is something in ALV setting that need to be configured. Please let me know if there are any idea about this issue.
    Thanks a lot.
    Regards
    Hadi

    Hi Karthik,
    We don't set user specific layout. I am afraid there is some authorization code set in the program and it determine ALV activities on different user. Are there possibility of it in ALV?
    However thanks alot for your suggestion.
    Regards
    Hadi

  • How to set max rows in flowed textfield?

    Is there a way to limit the rows allowed to input on a flowed textarea? I now we can limit the length of max chars, but that would not help me.

    Hi Rishit,
    Thanks for your answer!
    Had a long holiday, so didn't give a feedback in time. Sorry for that!
    There is a tab 'Controls' in Universe Parameter, where there is a setting used to limit the size of result set.
    Then what's the priority between this setting and the similar setting in WebI query properties?
    However, acutally my question is how to set the limitation by user security profile in CMC.
    Do you have any idea about it?
    Qing
    Edited by: Qing Zhou on Jun 21, 2010 11:12 AM

  • Resolved:how to set default LAYOUT for ALV list display

    hey guys,
      In my alv report there are 20 cloumns.
    after display i usualy choose 12 of them from CHOOSE LAYOUT option and then give it to print...
    how to set this LAYOUT as default
    sorry guys i figured it out..
    but can we give it programiticlay?
    Edited by: kumar gaurav on May 27, 2008 8:15 AM

    hi,
    you can do it.
    after declaring the catlog table you will give as
    wa_catlog-seltext_l = 'material'.
    wa_catlog-datatype = 'char'.
    wa_catlog-outputlen = 18.
    wa_catlog-fieldname = 'matnr'.
    append wa_catlog to i_catlog.
    clear wa_catlog.
    wa_catlog-seltext_l = 'plantl'.
    wa_catlog-datatype = 'char'.
    wa_catlog-outputlen = 4.
    wa_catlog-fieldname = 'werks'.
    append wa_catlog to i_catlog.
    clear wa_catlog.
    similarly what sequence you give here i.e. material  ,  plant  etc. you get the output in the same oder you can even give only the fields you want in the output.
    rewards points if useful.
    siri

  • How to merge the Rows in ALV table?

    Hi All,
    I want to merge the Rows in my ALV table(SALV_WD_TABLE). Is it possible?
    Regards,
    Yugesh A.

    Yogi1729 wrote:
    Hi All,
    how to Restrict the Row in the Pivot table.
    My Requirement is like this.
    i have to show the top 10 values in the pivot table but My report is show all the values.
    how can we achieve this.
    any quick solution for this appreciated.
    Thanks,
    Yogi.You can't really restrict the rows in a pivot table, but you can do this:
    http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/

  • How to set one row or node 's height in the jtree?

    How to set height of one row or node in the jtree?
    I found the method :jTree.setRowHeight(height);.
    But I want to set height of one row ,not all rows of a jtree.
    Thanks for help!

    Who can help me?

  • How to set Max Rows Retrieved by user security profile in CMC?

    Hi
    As we know, it is possible to set Max Rows Retrieved with query property (in the area 'Limits').
    However, it is mentioned in official documents that this setting can be overwritten by the BOE administrator in user security profile. Could any one tell me how this is done in CMC?
    Thanks in advance!
    Qing

    Hi Rishit,
    Thanks for your answer!
    Had a long holiday, so didn't give a feedback in time. Sorry for that!
    There is a tab 'Controls' in Universe Parameter, where there is a setting used to limit the size of result set.
    Then what's the priority between this setting and the similar setting in WebI query properties?
    However, acutally my question is how to set the limitation by user security profile in CMC.
    Do you have any idea about it?
    Qing
    Edited by: Qing Zhou on Jun 21, 2010 11:12 AM

  • How to set the rows of dataTable using loadBundle tag?

    Hi,
    Can i set the rows property of a <h:dataTable> using the value from a <f:loadBundle> tag?
    I tried the following code
    <f:loadBundle basename="com.message.NumberOfRows" var="numRows"/>
    I have NumberOfRows.properties file with the following entry
    rows=5
    The dataTable code
    <h:dataTable value="#{mastData.list}" rows="#{numRows.rows}" align="center" var="mastBean">
    </h:dataTable>
    This code is generating ClassCast Exception.
    Please comment on this issue.
    Thanks,
    Renju

    Hi,
    Exactly Reymond, See Renju you already using mastData bean for datatable. In that create a bean method something like rows & create a getter/setter method returning int. In getter method try this code as
    ResourceBundle bundle = ResourceBundle.getBundle("ur resource bundle");
    rows = Integer.parseInt(bundle.getString("rows_to_display"));
    return rows.
    Hope you can now get some clear idea i guess
    Regards,
    A.

Maybe you are looking for

  • How to get the User ID's details in SRM Workflow EBP system

    Hi Team How to get the User ID's details in SRM Workflow EBP system. Example like i have User ID "BTEMPEST" but i want his full name . so please suggst me how to get the full name of user id where it is maintained. Thanks. Puneet.

  • Current Date in WPC webform

    Hi Community, I need to get Current date into the Custom WPC webform. I used the following code in my XSL: <xsl:value-of disable-output-escaping="yes" select="date:date()"/> and the NameSpace: xmlns:date="http://exslt.org/dates-and-times" I am gettin

  • New lines in a file

    I'm trying to find a good way to get new lines in a file, and while this works it also uses 100% CPU and is driving me nuts. At least the profiler says this is .run is using the most, and taskmanager gives it 100%. The file name changes every day. pa

  • Use pages to transfer word doc to itunes

    I purchased the 'pages' app by apple under the impression that I would be able to transfer microsoft word documents to my ipad and edit it. However, I have not seen any option for that functionality. Can anyone help please?

  • Download numbers, pages and keynote for free

    I bought a MacBook Pro in Nov. 2013. It was delivered with numbers, pages and keynote. As there where problems with the MacBook, I had to delete everything and set up the system again by deleting the hard disk and installing OSX mavericks again. I th