ALV -------- editable column

Hi expert,
Have any idea  'how do i make any column of an ALV report editable?
I donot have any idea.tell me possible  or not.
Thanks in advance
Debjani Lahiri

Hi Debjani,
  kindly dont use those old function modules any more -- they've all been "deprecated" or in other words made obsolete by the new OO class cl_gui_alv_grid.
Using classes you can easily define dynamic tables, dynamic fcats, have editable grids for data entry etc etc.
Here's a program using OO which gives you all the functionality.
PROGRAM zdynfieldcat.
class zcltest definition deferred. "For field symbol reference.
* The ultimate ALV program
* this program demos the following
* 1) Build Dynamic ITAB with fields NOT defined in DDIC
* 2) Build Dynamic FieldCat. Table structure is obtained *via
* the new RTTI functionality
* 3) Add the CELL colour table as a deep structure to our dynamic table
* so we can colour individual cells.
* 4) Inherit a class so protected attributes
* of class cl_gui_alv_grid
* can be accessed
* 5) Add events so we can can program functionality when * the user presses
* the ENTER key,
* or selects an action from the toolbar.
* 6) Display one line of a grid from our dynamic table with some cells coloured.
* 6) Set the Grid editable.
* 7) if user enters data then colou
* cells of entered data.
* 8) show contents of new table
* after all data has been entered.
* To use program copy the source and
* Create a blank screen 100 with a
* custom container called CCONTAINER1.
* with the screen logic shown below
* As we are using EVENTS we actually
* don't need a PAI module so it
* doesn't contain any code.
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100
* James Hawthorne
* Define field symbols as these can't be defined in classes
field-symbols: <dyn_table> type standard table,
<g2> type ref to zcltest,
<g1> type ref to cl_gui_custom_container,
<data_changed> type ref to cl_alv_changed_data_protocol,
<actual_tab> type standard table,
<outtab> type table,
<fs1> type ANY,
<FS2> TYPE TABLE,
<fs3> type table,
<fs4> type table,
<fs5> type table,
<wa_dyn_table> TYPE ANY,
<w_field1> type any,
<w_field2> type any,
<w_field3> type any,
<w_field4> type any,
<w_field5> type any,
<t_colours> type any,
<t_clrs> type line of lvc_t_scol,
<t_cellcolors> TYPE lvc_t_scol,
<t_cellcolors1> type lvc_t_scol.
class zcltest definition inheriting from cl_gui_alv_grid.
public section.
types: g4 type ref to cl_gui_custom_container.
types: g3 type ref to cl_alv_changed_data_protocol.
data: i_parent type g4,
lr_rtti_struc TYPE REF TO cl_abap_structdescr, "RTTI
zog like line of lr_rtti_struc->components. "RTTI
types: struc like zog.
types: struc1 type table of struc.
methods:
constructor
importing i_parent type g4,
disp_tab
importing p_er_data_changed type g3,
create_dynamic_fcat
importing zogt type struc1
exporting it_fldcat type lvc_t_fcat.
Protected section.
private section.
data: stab type ref to data,
wa_it_fldcat type lvc_s_fcat,
c_index type sy-index,
lt_good_cells type lvc_t_modi,
ls_good type lvc_s_modi,
ls_good_cells type lvc_s_modi,
et_good_cells type LVC_T_MODI,
e_row type i,
e_value type c,
e_col type i,
es_row_id type lvc_s_row,
es_col_id type lvc_s_col,
es_row_no type LVC_S_ROID,
wa_cellcolors TYPE LINE OF lvc_t_scol,
wa_modified_cells type line of LVC_T_MODI,
es_layout type LVC_S_LAYO.
endclass.
class zcltest implementation.
METHOD constructor.
CALL METHOD super->constructor
EXPORTING
i_appl_events = 'X'
i_parent = i_parent.
endmethod.
method disp_tab.
* mt_outtab is the data table held
* as a protected attribute
* in class cl_gui_alv_grid.
assign me->mt_outtab->* TO <outtab>. "Original data
assign p_er_data_changed->mp_mod_rows TO <FS1>.
stab = p_er_data_changed->mp_mod_rows.
assign p_er_data_changed->mt_inserted_rows to <fs3>.
assign p_er_data_changed->mt_deleted_rows to <fs4>.
assign p_er_data_changed->mt_mod_cells to <fs5>.
assign stab->* TO <fs2>.
* some functions --chose what you want
* This method gets the last (or current cell)
call method me->get_current_cell
importing e_row = e_row
e_value = e_value
e_col = e_col
es_row_id = es_row_id
es_col_id = es_col_id
es_row_no = es_row_no.
* For an example let's change the colour
* of any data entered including
* inserted rows.
* Proceed as follows
* read table <fs5> which gives us the
* row number and field name of
* the modified cell(s) including inserted rows
* For deleted rows we don't have to do anything
* Update the cell's colour characteristic table
* remember we added a colour table
* to the dynamic data table we built
* note that it's a DEEP structure.
* On REFRESH the alv will look at the
* updated colour table for the cells.
* we don't actually have to modify the data table but just the colour
* table
* recapping
* 1) Create your Field catalog WITHOUT
* the colour table for the ALV grid display
* 2) Add the colour table to a 2nd field catalog
* which you use to build the actual data
* dynamic table
* 3) add the name of the colour table to the layout
* (struct_grid_lset-ctab_fname
* = 'T_CELLCOLORS')
* Refresh Grid and new cell colours will work
* now let's change the colour of the selected cells.
ASSIGN COMPONENT 'T_CELLCOLORS'
OF STRUCTURE <wa_dyn_table> TO <t_cellcolors1>.
loop at <fs5> into wa_modified_cells.
read table <dyn_table> into <wa_dyn_table> index wa_modified_cells-row_id.
case sy-subrc.
when 0.
read table <t_cellcolors1> into wa_cellcolors
with key fname = wa_modified_cells-fieldname.
if sy-subrc = 0.
if not wa_modified_cells-value is initial.
wa_cellcolors-fname = wa_modified_cells-fieldname.
wa_cellcolors-color-col = '5'.
MODIFY <t_cellcolors1> from wa_cellcolors .
endif.
else.
if not wa_modified_cells-value is initial.
wa_cellcolors-fname = wa_modified_cells-fieldname.
wa_cellcolors-color-col = '5'.
append wa_cellcolors to <t_cellcolors1>.
endif.
endif.
when others.
loop at <fs2> into <wa_dyn_table>.
append <wa_dyn_table> to <dyn_table>.
endloop.
read table <dyn_table> into <wa_dyn_table> index wa_modified_cells-row_id.
clear wa_cellcolors.
if not wa_modified_cells-value is initial.
wa_cellcolors-fname = wa_modified_cells-fieldname.
wa_cellcolors-color-col = 5.
append wa_cellcolors to <t_cellcolors1>.
endif.
endcase.
MODIFY <dyn_table> FROM <wa_dyn_table> index wa_modified_cells-row_id.
endloop.
endmethod.
method create_dynamic_fcat.
loop at zogt into zog.
c_index = c_index + 1.
clear wa_it_fldcat.
wa_it_fldcat-fieldname = zog-name .
wa_it_fldcat-datatype = zog-type_kind.
wa_it_fldcat-inttype = zog-type_kind.
wa_it_fldcat-intlen = zog-length.
wa_it_fldcat-decimals = zog-decimals.
wa_it_fldcat-coltext = zog-name.
wa_it_fldcat-lowercase = 'X'.
append wa_it_fldcat to it_fldcat .
endloop.
endmethod. "create_dynamic_fcat
endclass. "zcltest IMPLEMENTATION
class lcl_grid_event_receiver definition.
public section.
data: data_c type ref to cl_alv_changed_data_protocol.
methods:
handle_data_changed
for event data_changed of zcltest
importing er_data_changed,
handle_data_changed_finished
for event data_changed_finished of zcltest
importing E_MODIFIED
ET_GOOD_CELLS,
toolbar
for event toolbar of zcltest
importing e_object
e_interactive,
user_command
for event user_command of zcltest
importing e_ucomm.
endclass.
class lcl_grid_event_receiver implementation.
method handle_data_changed.
call method <g2>->disp_tab
EXPORTING
p_er_data_changed = er_data_changed.
endmethod. "handle_data_changed
method handle_data_changed_finished.
* at this point our data dynamic table
* <dyn_table> now contains the actual updated values from
* the grid including the cell color info create in the on data changed
* event method call AND IN THE CORRECT ORDER.
* use this method to update say SAP data bases or other
* data from the GRID entered data.
* Data entry validation can be done here as well.
* Enter your own code here.
endmethod.
method toolbar.
data : ls_toolbar type stb_button.
clear ls_toolbar.
<b>move 0 to ls_toolbar-butn_type.
<b>move 'EDIT' to ls_toolbar-function.
move space to ls_toolbar-disabled.
move 'Edit' to ls_toolbar-text.</b>
move icon_change_text to ls_toolbar-icon.
move 'Click2Edit' to ls_toolbar-quickinfo.
append ls_toolbar to e_object->mt_toolbar.</b>
clear ls_toolbar.
move 0 to ls_toolbar-butn_type.
move 'UPDA' to ls_toolbar-function.
move space to ls_toolbar-disabled.
move 'Update' to ls_toolbar-text.
move icon_system_save to ls_toolbar-icon.
move 'Click2Update' to ls_toolbar-quickinfo.
append ls_toolbar to e_object->mt_toolbar.
clear ls_toolbar.
move 0 to ls_toolbar-butn_type.
move 'EXIT' to ls_toolbar-function.
move space to ls_toolbar-disabled.
move 'Exit' to ls_toolbar-text.
move icon_system_end to ls_toolbar-icon.
move 'Click2Exit' to ls_toolbar-quickinfo.
append ls_toolbar to e_object->mt_toolbar.
endmethod. "toolbar
method user_command.
case e_ucomm .
when 'EDIT'. "From Tool bar
perform set_input.
perform refresh_disp.
when 'UPDA'. "From Tool bar
perform refresh_disp.
when 'EXIT'. "From Tool bar
leave program.
endcase.
endmethod. "user_command
endclass. "lcl_grid_event_receiver IMPLEMENTATION
* program data
include <icon>.
* define any old internal structure NOT in DDIC
types: begin of s_elements,
anyfield1(20) type c,
anyfield2(20) type c,
anyfield3(20) type c,
anyfield4(20) type c,
anyfield5(11) type n,
end of s_elements.
data: wa_element type s_elements,
wa_cellcolors TYPE LINE OF lvc_t_scol,
wa_data type s_elements,
wa_dyn_table TYPE REF TO data.
* Note new RTTI functionality allows field detail retrieval
* at runtime for dynamic tables.
data:
grid1 type ref to zcltest,
grid_handler type ref to lcl_grid_event_receiver,
c_dec2 type s_elements-anyfield5,
wa_it_fldcat type lvc_s_fcat,
it_fldcat type lvc_t_fcat,
it_fldcat1 type lvc_t_fcat,
lr_rtti_struc TYPE REF TO cl_abap_structdescr, "RTTI
lt_comp TYPE cl_abap_structdescr=>component_table,"RTTI
ls_comp LIKE LINE OF lt_comp, "RTTI
zog like line of lr_rtti_struc->components, "RTTI
struct_grid_lset type lvc_s_layo,
l_valid type c,
new_table type ref to data.
types: struc like zog,
col_tab type lvc_t_scol.
data: zogt type table of struc,
grid_container1 type ref to cl_gui_custom_container,
g_event_receiver type ref to lcl_grid_event_receiver,
ok_code like sy-ucomm,
t_colours type table of col_tab,
i4 type int4.
start-of-selection.
call screen 100.
module status_0100 output.
if grid_container1 is initial.
create object grid_container1
exporting
container_name = 'CCONTAINER1'.
assign grid_container1 to <g1>.
create object grid1
exporting i_parent = grid_container1.
* we need reference to this instance so we can use
* Methods etc of zcltest class and alv (superclass)
* in our event receiver class.
assign grid1 to <g2>.
create object grid_handler.
* set handler for events
set handler:
grid_handler->user_command for grid1,
grid_handler->toolbar for grid1,
grid_handler->handle_data_changed_finished for grid1.
perform register_enter_event. "For ENTER key press
* Get the Internal table structure
lr_rtti_struc ?= cl_abap_structdescr=>describe_by_data( wa_data ).
* Build field catalog just use basic data here
* colour specific columns as well
zogt[] = lr_rtti_struc->components.
call method grid1->create_dynamic_fcat
EXPORTING
zogt = zogt
IMPORTING
it_fldcat = it_fldcat.
* Save field cat without cell info deep structure for Grid
it_fldcat1[] = it_fldcat.
* now add deep structure for cell colour to field catalog
* for dynamic table creation
assign t_colours to <t_colours>.
wa_it_fldcat-fieldname = 'T_CELLCOLORS'.
wa_it_fldcat-ref_field = 'COLTAB'.
wa_it_fldcat-ref_table = 'CALENDAR_TYPE'.
* use this table as it has a DDIC built in ref structure for cell colour info
APPEND wa_it_fldcat TO it_fldcat1.
* Create dynamic internal table and assign to field symbol.
* Use dynamic field catalog just built.
call method cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fldcat1
IMPORTING
ep_table = new_table.
perform populate_dynamic_itab.
perform init_grid.
i4 = 0.
call method grid1->set_ready_for_input
EXPORTING
i_ready_for_input = i4.
endif.
perform refresh_disp.
endmodule. "status_0100 OUTPUT
module user_command_0100 input.
*PAI not needed in OO ALV anymore as User Commands are handled as events
*in method user_command.
*we can also get control if the Data entered and the ENTER is pressed by
*raising an event.
* Control then returns to method handle_data_changed.
endmodule. "user_command_0100 INPUT
form populate_dynamic_itab.
* load up a line of the dynamic table
c_dec2 = c_dec2 + 11.
assign new_table->* to <dyn_table>.
create data wa_dyn_table like line of <dyn_table>.
assign wa_dyn_table->* to <wa_dyn_table>.
assign component 'ANYFIELD1' of structure <wa_dyn_table> to <w_field1>
<w_field1> = 'Tabbies'.
assign component 'ANYFIELD2' of structure <wa_dyn_table> to
<w_field2>.
<w_field2> = 'Ger Shepards'.
assign component 'ANYFIELD3' of structure <wa_dyn_table> to <w_field3>.
<w_field3> = 'White Mice'.
assign component 'ANYFIELD4' of structure <wa_dyn_table> to <w_field4>.
<w_field4> = 'Any old Text'.
assign component 'ANYFIELD5' of structure <wa_dyn_table> to <w_field5>.
<w_field5> = c_dec2..
APPEND <wa_dyn_table> TO <dyn_table>.
loop at <dyn_table> into <wa_dyn_table>.
clear wa_cellcolors.
ASSIGN COMPONENT 'T_CELLCOLORS'
OF STRUCTURE <wa_dyn_table> TO <t_cellcolors>.
wa_cellcolors-fname = 'ANYFIELD2'.
wa_cellcolors-color-col = '1'.
APPEND wa_cellcolors TO <t_cellcolors>.
clear wa_cellcolors.
wa_cellcolors-fname = 'ANYFIELD3'.
wa_cellcolors-color-col = '2'.
APPEND wa_cellcolors TO <t_cellcolors>.
clear wa_cellcolors.
wa_cellcolors-fname = 'ANYFIELD4'.
wa_cellcolors-color-col = '6'.
APPEND wa_cellcolors TO <t_cellcolors>.
MODIFY <dyn_table> FROM <wa_dyn_table>.
endloop.
endform. "populate_dynamic_itab
form exit_program.
call method grid_container1->free.
call method cl_gui_cfw=>flush.
leave program.
endform. "exit_program
form refresh_disp.
call method grid1->refresh_table_display.
endform. "refresh_disp
form set_input.
i4 = 1.
call method grid1->set_ready_for_input
EXPORTING
i_ready_for_input = i4.
endform. "set_input
form switch_input.
if i4 = 1.
i4 = 0.
else.
i4 = 1.
endif.
call method grid1->set_ready_for_input
EXPORTING
i_ready_for_input = i4.
endform. "switch_input
form init_grid.
* Enabling the grid to edit mode,
* Set ALV controls for cell coloring table.
struct_grid_lset-edit = 'X'. "To enable editing in ALV
struct_grid_lset-grid_title = 'Jimbos Test'.
struct_grid_lset-ctab_fname = 'T_CELLCOLORS'.
* struct_grid_lset-sel_mode = 'D'.
call method grid1->set_table_for_first_display
EXPORTING
is_layout = struct_grid_lset
CHANGING
it_outtab = <dyn_table>
it_fieldcatalog = it_fldcat.
endform. "init_grid
form register_enter_event.
call method grid1->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
* Instantiate the event or it won't work.
create object g_event_receiver.
set handler g_event_receiver->handle_data_changed for grid1.
endform. "register_enter_event
Reward pts if found usefull
Regards
Sathish

Similar Messages

  • Alv editable columns

    Hello i wan't to put a column of an alv in non editable state depending a value introduced in another column. I have done it adding the cellstyles table to the internal table shown in the alv.
    This is working fine, but in my alv i have the possibility of adding new lines and here is where i'm having trouble. When i add my first line and i introduce the value that must make another column non editable it works, but when i try to add a new line, the first row i addes loses it state and its shown editable.
    Any idea?
    Thanks

    here is my code:
    FORM f_handle_data_changed
                    USING  pi_data TYPE REF TO cl_alv_changed_data_protocol.
      DATA: ls_modi TYPE lvc_s_modi.
      FIELD-SYMBOLS: <fs_value> TYPE ANY,
                     <fs>       TYPE ty_co04_0019.
      SORT pi_data->mt_mod_cells BY row_id .
      LOOP AT pi_data->mt_mod_cells INTO ls_modi.
        READ TABLE i_planifci ASSIGNING <fs> INDEX ls_modi-row_id.
        ASSIGN COMPONENT ls_modi-fieldname OF STRUCTURE <fs>
          TO <fs_value>.
        IF sy-subrc = 0.
          <fs_value> = ls_modi-value.
          UNASSIGN <fs_value>.
          IF ls_modi-fieldname = 'TIPO_PLAN'.
      cambiar la editabilidad de las columnas en base al valor del tipo 1
       READ TABLE i_planifci INTO w_planifci INDEX ls_modi-row_id.
            PERFORM f_hacer_no_editables   USING    ls_modi-row_id
                                                    ls_modi-value
                                           CHANGING <fs>.
          ENDIF.
          MODIFY i_planifci INDEX ls_modi-row_id FROM <fs>.
        ENDIF.
      ENDLOOP.
      PERFORM f_refresh_table_display USING v_grid.
    is it possible to loss the info of the cellstyles table cos i'm doing it on the handle_data_changed

  • How to set column names in OVS search help of ALV EDIT

    Hi All,
    I have a OVS search help for my ALV EDIT column.This OVS will have two columns,I need to give the names(name1 , name2)  to the columns.
    I am writing the below codo in phase 0.
          ls_text-name = 'Column1'.
          ls_text-value = 'name1'.
          INSERT ls_text INTO TABLE lt_column_texts.
          ls_text-name = 'Column2'.
          ls_text-value = 'name2'.
          INSERT ls_text INTO TABLE lt_column_texts.
          ovs_callback_object->set_configuration(
                    label_texts  = lt_label_texts
                    column_texts = lt_column_texts
                    group_header = lv_group_header
                    window_title =  lv_window_title
                    table_header = lv_table_header
                    col_count    = 2
                    row_count    = 20 ).
    Below code in Phase 3.
          Assign ovs_callback_object->selection->* to <ls_selection>.
          if <ls_selection> is assigned.
            ovs_callback_object->context_element->set_attribute(
            name = `ATR1`
            value = <ls_selection>-Column1 ).
          endif.
    But,the column names are not getting set.Please provide your inputs.
    Regards,
    Salma

    hi,
    About your requirement, i don't know why you need to code in "Phase 3" of OVS.
    "Phase 3" is used for transporting your selected value to Your ALV.
    I think, the reason why you loose the result table including your customized column title, is that you loose the "Phase 2".
    Generally, in the past i used OVS as the following code simply.Just one example:
    * declare data structures for the fields to be displayed and
    * for the table columns of the selection list, if necessary
      types:
        begin of lty_stru_input,
    *   add fields for the display of your search input here
          carrid type string,
          connid type string,
        end of lty_stru_input.
      types:
        begin of lty_stru_list,
    *   add fields for the selection list here
          carrid type string,
          connid type string,
          text   type string,
        end of lty_stru_list.
      data: ls_search_input  type lty_stru_input,
            lt_select_list   type standard table of lty_stru_list,
            ls_text          type wdr_name_value,
            lt_label_texts   type wdr_name_value_list,
            lt_column_texts  type wdr_name_value_list,
      case ovs_callback_object->phase_indicator.
        when if_wd_ovs=>co_phase_0.  "configuration phase, may be omitted
    *   in this phase you have the possibility to define the texts,
    *   if you do not want to use the defaults (DDIC-texts)
          ls_text-name = 'CARRID'.  "must match a field name of search
          ls_text-value = 'Search Field-Carrid'.
          insert ls_text into table lt_label_texts.
          ls_text-name = 'CONNID'.  "must match a field name of search
          ls_text-value = 'Search Field-Connid'.
          insert ls_text into table lt_label_texts.
          ls_text-name = 'CARRID'.  "must match a field in list structure
          ls_text-value = 'Result-Carrid'.
          insert ls_text into table lt_column_texts.
          ls_text-name = 'CONNID'.  "must match a field in list structure
          ls_text-value = 'Result-Connid'.
          insert ls_text into table lt_column_texts.
          ls_text-name = 'TEXT'.  "must match a field in list structure
          ls_text-value = 'Result-Text'.
          insert ls_text into table lt_column_texts.
          lv_group_header = 'Group Header'.
          lv_window_title = 'Window Title'.
          lv_table_header = 'Table Header'.
          ovs_callback_object->set_configuration(
                    label_texts  = lt_label_texts
                    column_texts = lt_column_texts
                    group_header = lv_group_header
                    window_title = lv_window_title
                    table_header = lv_table_header
                    col_count    = 3
                    row_count    = 8 ).
    when if_wd_ovs=>co_phase_2.
    *   If phase 1 is implemented, use the field input for the
    *   selection of the table.
    *   If phase 1 is omitted, use values from your own context.
          if ovs_callback_object->query_parameters is not bound.
    ******** TODO exception handling
          endif.
          assign ovs_callback_object->query_parameters->*
                                  to <ls_query_params>.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_select_list FROM ZTABLE_FLIGHT
                           WHERE CARRID LIKE lw_carrid
                                 AND CONNID LIKE lw_connid
    *ovs_callback_object->set_output_table( output = lt_select_list ).*
    Hope it can help.
    Best wishes.

  • ALV: columns in read-only mode look like editable columns in edit mode

    Hi,
    My application contains an ALV table which should be toggled between display and edit mode like the rest of the fields.
    The evident solution was to use
    if_salv_wd_table_settings~set_read_only( abap_true or abap_false)
    However, unlike the rest of the fields, when the application changes into display mode and the fields get grey like in any SAP application, the columns in the table which were editable remain white, and those which were not editable and thus grey, get now white, too, instead of the other way round. So it will look to the normal user, as if now all columns would be editable!
    Of course, he would realize that they are not when he tries to edit them, but this is irritating.
    See following link with screenshots (only active for 3 weeks from now on):
    [Link to my webmail space/SDN: .|https://businesswebmail.telekom.at/filestorage/MzYxMTk1OTMx/]
    I have looked
    through my books ("Einstieg in Web Dynpro for ABAP", "Praxisbuch Webdynpro for ABAP", ...)
    through the wiki for Webdynpro for ABAP here in SDN as well as through this forum (by searching with "ALV edit")
    through the notes in BC-WD-CMP-ALV
    but could not find any solution. Most tables in those PDF articles found here in the WD4A wiki also show white cells although they are probabliy in read-only mode (e.g. the imitation of the SE16N browser article).
    The attributes to the LO_CELL_EDITOR for both Inputfields and textview columns contain exactly the same values when toggling between display and edit mode (read-only in table settings), so also no chance to change here anything.
    Also changing the cell design is not a solution as there is no design that looks like grey for not editable according to WDUI_TABLE_CELL_DESIGN  ([SAP Help - WDUI_TABLE_CELL_DESIGN|http://help.sap.com/saphelp_nw2004s/helpdata/en/56/5e9041d3c72e7be10000000a1550b0/frameset.htm].
    I do not know if I have made an error, as this is my 3rd Web Dynpro (after the first 2 of the introduction book), or SAP is really inconsistent in User interface between "normal" fields and ALV table fields.
    Can you please help me?
    Thanks in advance,
    Erlend

    Hi,
    In my application aslo, i have 30 columns out of which 10 are input fields. But, i'm showing the table as ABAP_TRUE incase of Non-editable otherwise to abap_false. Now i'm getting everything as in WHITE cells.
    Do you want to show it is Grey mode with Non-editable feature. Is that so.
    How many columns are there which has Input fields.
    Get the column references.
    Now, based on the mode of display create the object as Input or Textview field.
    For that column -
    If mode eq 'D'.
    Create an object for Textview(cl_salv_wd_uie_text_view)
    else.
    Create an Object for Inputfield(cl_salv_wd_uie_input_field)
    endif.
    The Append row is a standard button or custom one on ALV toolbar.
    Do you want to hide the toolbar or just disable these buttons.
    If you want to hide the toolbar then refer my wiki -
    http://wiki.sdn.sap.com/wiki/display/WDABAP/NullreferenceforUPDATETOOLBARerrorsofALVinthewebdynpro+ABAP
    Regards,
    Lekha.
    Edited by: Lekha on Sep 30, 2009 8:06 PM

  • Editable ALV Grid column behavior under ITS standalone

    Hello experts,
    I have a straight forward implementation of an ALV Grid with 3 columns. Two columns are display only and the third is editable. My question only involves the editable column and its behavior in a web browser served by a standalone ITS server. The underlying data type is CURR. The enterable amounts are restricted to a format of 9.99. Even so, a web user can accidentally enter a non-numeric value such as 1.x0 .  We have coded a data changed event handler to check the input value for expected amounts. The event handler logic readily identifies the non-numeric value and handles the exception. Although we have full control of the internal table value, there are two problems encountered within the web browser interface:
    1) We cannot return the cursor to the problem cell to prevent the user from continuing before correcting the problem.
    2) We cannot reset/change to displayed value to the original internal table value (it will only refresh after a save or refresh action). So the user has no visual cue that they've entered a bad value unless they pay close attention.
    Running the transaction in SAPGUI, we can force the cursor back to the erroneously cell using  "CALL METHOD alv_grid->set_scroll_info_via_id" . This technique does not appear to affect the cursor within the web browser.
    After searching SDN forums and SAP documentation it appears that there is no way to programmatically control the ALV Grid active cell within the web browser interface. I'm wondering if the experts can confirm this issue? If that is the way it works within the browser interface could members please suggest "user friendly" approaches to notifying the user of a data entry problem? For example, is POPUP_TO_INFORM to only option? Perhaps there is a JavaScript routine that can enforce the edit format? Please keep in mind that the standard ALV Grid techniques that work in SAPGUI don't necessarily behave the same way in the web browser. I'm most interested in advice regarding the web browser using standalone ITS as it will be another year before we can leverage WebDynPro in this scenario.
    Thanks and best regards,
    Gary

    Hi Gary,
    can you please create a short report which recreates the issue and post the ABAP here. The goal is that webgui and SAPGUI behaves the same way. If they don't we will try to fix it.
    Best regards,
    Klaus

  • ALV grid disply with edit columns in output

    Hi all,
      i am using   CALL METHOD MY_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    to display the output in alv format.there is  3 edit columns in output display.
       if i fill one field & then put 'ENTER' then other two fields of that row should be filled with the appropriate data from the program.still control should be in output display.
    which method i should use to go inside the program when i put 'ENTER' on any field of ALV output disply & how to use those methods inside the program.
    i need some materials regarding OOPS (class, method ) . now i want to put OOPS concept in alv display.
    correct answers will be rewarded.
    Thanks & regards

    Hi,
    Check,
    OOPS
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    ABAP Objects
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/35eaef9c-0b01-0010-dd8b-e3b0f9ed7ccb#section7 [original link is broken]
    check the below links lot of info and examples r there for OOPS
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    <b>Reward if helpful.</b>

  • Group feature at ALV grid with editable columns

    Am I right ?
    Group function by using a sorted layout is disabled while having one (or more) editable columns, isn't it ?
    ... or is there a possibility to use gouped rows ?
    Greetings
    Markus

    Also...
    *& Report ZDEMO_ALVGRID_EDIT *
    *& Example of a simple ALV Grid Report *
    *& The basic ALV grid, Enhanced to display specific fields as *
    *& editable depending on field value *
    REPORT ZDEMO_ALVGRID_EDIT .
    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,
    field_style TYPE lvc_t_styl, "FOR DISABLE
    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.
    DATA: it_fieldcat TYPE lvc_t_fcat, "slis_t_fieldcat_alv WITH HEADER LINE,
    wa_fieldcat TYPE lvc_s_fcat,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE lvc_s_layo, "slis_layout_alv,
    gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM data_retrieval.
    PERFORM set_specific_field_attributes.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_alv_report.
    *& Form BUILD_FIELDCATALOG
    Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    wa_fieldcat-fieldname = 'EBELN'.
    wa_fieldcat-scrtext_m = 'Purchase Order'.
    wa_fieldcat-col_pos = 0.
    wa_fieldcat-outputlen = 10.
    wa_fieldcat-emphasize = 'X'.
    wa_fieldcat-key = 'X'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'EBELP'.
    wa_fieldcat-scrtext_m = 'PO Item'.
    wa_fieldcat-col_pos = 1.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'STATU'.
    wa_fieldcat-scrtext_m = 'Status'.
    wa_fieldcat-col_pos = 2.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'AEDAT'.
    wa_fieldcat-scrtext_m = 'Item change date'.
    wa_fieldcat-col_pos = 3.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'MATNR'.
    wa_fieldcat-scrtext_m = 'Material Number'.
    wa_fieldcat-col_pos = 4.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'MENGE'.
    wa_fieldcat-scrtext_m = 'PO quantity'.
    wa_fieldcat-col_pos = 5.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'MEINS'.
    wa_fieldcat-scrtext_m = 'Order Unit'.
    wa_fieldcat-col_pos = 6.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'NETPR'.
    wa_fieldcat-scrtext_m = 'Net Price'.
    wa_fieldcat-edit = 'X'. "sets whole column to be editable
    wa_fieldcat-col_pos = 7.
    wa_fieldcat-outputlen = 15.
    wa_fieldcat-datatype = 'CURR'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'PEINH'.
    wa_fieldcat-scrtext_m = 'Price Unit'.
    wa_fieldcat-col_pos = 8.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    ENDFORM. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    Build layout for ALV grid report
    FORM build_layout.
    Set layout field for field attributes(i.e. input/output)
    gd_layout-stylefname = 'FIELD_STYLE'.
    gd_layout-zebra = 'X'.
    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'
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
    i_callback_program = gd_repid
    i_callback_user_command = 'USER_COMMAND'
    is_layout_lvc = gd_layout
    it_fieldcat_lvc = it_fieldcat
    i_save = 'X'
    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 CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM. " DATA_RETRIEVAL
    *& Form set_specific_field_attributes
    populate FIELD_STYLE table with specific field attributes
    form set_specific_field_attributes .
    DATA ls_stylerow TYPE lvc_s_styl .
    DATA lt_styletab TYPE lvc_t_styl .
    Populate style variable (FIELD_STYLE) with style properties
    The NETPR field/column has been set to editable in the fieldcatalog...
    The following code sets it to be disabled(display only) if 'NETPR'
    is gt than 10.
    LOOP AT it_ekko INTO wa_ekko.
    IF wa_ekko-netpr GT 10.
    ls_stylerow-fieldname = 'NETPR' .
    ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
    "set field to disabled
    APPEND ls_stylerow TO wa_ekko-field_style.
    MODIFY it_ekko FROM wa_ekko.
    ENDIF.
    ENDLOOP.
    endform. " set_specific_field_attributes
    REWARD POINTS IF usefful !!

  • Saving editable column contents in Std. Table using ALV

    Hi All,
       I developed a ALV report which displays list of sales orders of particular customer, in this report created by name is editable column. Now i want to save the created by name after user changes the contents of this column and click on save button. I am getting all the data to be saved in field "RS_SELFIELD" (RS_SELFIELD TYPE SLIS_SELFIELD)  Kindly help me to get out of this issue.  
    Advance thanks for your response.

    Try this code.
    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_ALV'
                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

  • ALV Editable not working

    Hello Abapers,
    I am not getting the desired output as per example.
    I have followed all the steps as per the example but still a looser can anyone help me in this.
    When I execute the program I get the following run time error
    Field symbol has not been assigned.
    I tried commenting the subroutine call
    1} perform Change_fieldcatalogue and fetch data.
    and i was getting the 2 custom container (top, bottom)  on the screen output this time.
    I have also created a screen 600 with all the attributes.
    But i have doubt with this statement
    Create a Custom container and name it CCONT and OK code as OK_CODE.
    Save check and Activate the screen painter.
    I hope on the layout screen the one which says custom control is only the custom container but i see that the fct code box is not highlighted then how can i assign a fctcode.
    Could you plz also clear this.
    Thanks in advance.
    Ranjith Nambiar
    Program code below
    A small note about this program
    *& AS : ALV report which displays the contents of the table T006
    *& (as a docking container in the bottom) along with the
    *& editable ALV which contains the ALV fieldcatalogue table structure.
    *& With the available toolbar options of the editable ALV in the output,
    *& user can change the fieldcatalogue as per his requirement.
    *& When the user clicks 'SUBMIT',the display of the ALV with table T006
    *& gets modified and customised accordingly to the user's requirement.
    REPORT  ZNRD_ALV_EDITABLE.
    * Structure declaration for t006
    types : begin of ty_t006.
            include structure t006.
    types : end of ty_t006.
    * Internal table and work area declaration for t006.
    data : it_t006 type standard table of ty_t006,
           wa_t006 type ty_t006.
    * Declaration for ALV
    data : ok_code type sy-ucomm,            " Ok code.
           it_fcat type lvc_t_fcat,          " Fieldcatalogue.
           it_fieldcat type lvc_t_fcat,      "  Fieldcatalogue for Fieldcatalogue itself.
           it_layout type lvc_s_layo.
    *Declaration for toolbar functions
    data : it_excl_func type ui_functions,
    * Controls to display it_t006 and its fieldcatalogue
           cont_dock type ref to cl_gui_docking_container,
           cont_alvgd type ref to cl_gui_alv_grid,
    * Controls to display fieldcatalogue as editable alv gridand container
           cont_cust type ref to cl_gui_custom_container,
           cont_editalvgd type ref to cl_gui_alv_grid.
    initialization.
    start-of-selection.
    * Local class definition for data changed in fieldcatalogue alv
    CLASS lcl_event_receiver definition.
    public section.
      methods handle_data_changed
      for event data_changed of cl_gui_alv_grid
        importing er_data_changed.
    endclass.        " lcl_event_receiver definition.
    * Local class implementation for data changed in fieldcatalogue alv
    CLASS lcl_event_receiver implementation.
      method handle_data_changed.
      endmethod.     " handle_data_changed.
    endclass.        "lcl_event_receiver implementation
    * Data declaration for event receiver
    data : event_receiver type ref to lcl_event_receiver.
    end-of-selection.
    * Setting the screen for alv output for table display and changed fieldcatalogue display
    set screen 600.
    *&      Module  STATUS_0600  OUTPUT
    *       text
    MODULE STATUS_0600 OUTPUT.
      SET PF-STATUS 'STATUS600'.
      SET TITLEBAR 'TITLE600'.
    * Create ALV grid if doesn't exits.
    if cont_dock is initial.
      perform Create_alv.
    endif.
    ENDMODULE.                 " STATUS_0600  OUTPUT
    *&      Form  Create_alv
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM Create_alv.
    * Create a docking container and dock the control at the bottom
    create object cont_dock
      exporting
        dynnr = '600'
        extension = 100
        side = cl_gui_docking_container=>dock_at_bottom.
    * Create ALV grid for displaying the table
    create object cont_alvgd
      exporting
        i_parent = cont_dock.
    * Create custom container for ALV
    create object cont_cust
      exporting
        container_name = 'CCONT'.
    * Create alv editable grid
    create object cont_editalvgd
    exporting
       i_parent = cont_cust.
    * Register events for the editable alv
    create object event_receiver.
    set handler event_receiver->handle_data_changed for cont_editalvgd.
    call method cont_editalvgd->register_edit_event
      exporting
        i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    *Building fieldcatalogue for the initial display
    perform Build_fieldcatalogue changing it_fcat it_fieldcat.
    * Building the fieldcatalogue after the user has changed it
    perform Change_fieldcatalogue changing it_fieldcat.
    * Fetch data from the table.
    perform Fetch_data.
    * Get excluding functions for the alv editable tool bar
      APPEND cl_gui_alv_grid=>mc_fc_loc_append_row TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_loc_insert_row TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_loc_cut TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_sort TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_sort_asc TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_sort_dsc TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_subtot TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_sum TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_graph TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_info TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_print TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_filter TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_views TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_mb_export TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_mb_sum TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_mb_sum TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_mb_paste TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_find TO it_excl_func.
      APPEND cl_gui_alv_grid=>mc_fc_loc_copy  TO it_excl_func.
    *Alv display for the T006 table at the bottom
      CALL METHOD cont_alvgd->set_table_for_first_display
        CHANGING
          it_outtab       = it_t006[]
          it_fieldcatalog = it_fcat[].
    * optimize column width of grid displaying fieldcatalog
      it_layout-cwidth_opt = 'X'.
    * Get fieldcatalog of table T006 - alv might have
    * modified it after passing.
      CALL METHOD cont_alvgd->get_frontend_fieldcatalog
        IMPORTING
          et_fieldcatalog = it_fcat[].
    *to Send Buffered Automation Queue to Frontend
      CALL METHOD cl_gui_cfw=>flush.
    * Display fieldcatalog of table T006 in editable alv grid
      CALL METHOD cont_editalvgd->set_table_for_first_display
        EXPORTING
          is_layout            = it_layout
          it_toolbar_excluding = it_excl_func
        CHANGING
          it_outtab            = it_fcat[]
          it_fieldcatalog      = it_fieldcat[].
    ENDFORM.                    " Create_alv
    *&      Module  USER_COMMAND_0600  INPUT
    *       text
    MODULE USER_COMMAND_0600 INPUT.
    case ok_code.
      when 'SUBMIT'.
    * To get the current fieldcatalogue from the front end
        call method cont_alvgd->set_frontend_fieldcatalog
        exporting
          it_fieldcatalog = it_fieldcat.
        call method cont_alvgd->refresh_table_display.
        call method cl_gui_cfw=>flush.
      when 'EXIT'.
        leave program.
    endcase.
    ENDMODULE.                 " USER_COMMAND_0600  INPUT
    *&      Form  Build_fieldcatalogue
    *       text
    *      <--P_IT_FCAT  text
    *      <--P_IT_FIELDCAT  text
    FORM Build_fieldcatalogue  CHANGING P_IT_FCAT
                                        P_IT_FIELDCAT.
    * Fieldcatalog for table T006: it_fldcat
    * to generate the fields automatically
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'T006'
        CHANGING
          ct_fieldcat            = it_fieldcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    * Fieldcatalog for table LVC_T_FCAT:it_fcat
    * Generate fieldcatalog of fieldcatalog structure.
    * This fieldcatalog is used to display fieldcatalog 'it_fldcat'
    * on the top of the screen.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'LVC_S_FCAT'
        CHANGING
          ct_fieldcat            = it_fcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    ENDFORM.                    " Build_fieldcatalogue
    *&      Form  Change_fieldcatalogue
    * After the user has modified the fieldcatalogue we build another fieldcat
    * for the modified alv display
    *      <--P_IT_FIELDCAT  text
    FORM Change_fieldcatalogue  CHANGING P_IT_FIELDCAT.
      DATA ls_fcat TYPE lvc_s_fcat.
      LOOP AT it_fcat INTO ls_fcat.
        ls_fcat-coltext = ls_fcat-fieldname.
        ls_fcat-edit = 'X'.
        IF ls_fcat-fieldname = 'COL_POS' OR ls_fcat-fieldname = 'FIELDNAME'.
          ls_fcat-key = 'X'.
        ENDIF.
        MODIFY it_fcat FROM ls_fcat.
      ENDLOOP.
    ENDFORM.                    " Change_fieldcatalogue
    *&      Form  Fetch_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM Fetch_data .
      select * from t006 into table it_t006 up to 50 rows.
    ENDFORM.                    " Fetch_data

    comment this particular section deals with top container.
    CALL METHOD cont_editalvgd->set_table_for_first_display
        EXPORTING
          is_layout            = it_layout
          it_toolbar_excluding = it_excl_func
        CHANGING
          it_outtab            = it_fcat[]
          it_fieldcatalog      = it_fieldcat[].
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'LVC_S_FCAT'  "This is deep strucure
        CHANGING
          ct_fieldcat            = it_fcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    LVC_S_FCAT is a deep structure , so try to comment that section and see. if you want that part , populate the fieldcatalog manually.

  • How to handle 'ENTER' Key on ALV Editable Grid on sub screen (Tabstrips)

    Hello Experts ,
    I have 2 questions with ALV Editable grid;
    please help me if you have answers.
    I created ALV grid on one of sub screens on a Tab Strip,
    As soon as user types one of the columns of the ALV grid and press u2018ENTERu2019 key, it has to return corresponding details for that line.
    I tried to implement this logic in ALV grid event u2018handle_data_changedu2019, but ALV internal table is not getting populated with new entry entered in the grid. but u2018double_clicku2019 event working my purpose, but user might need enter key.
    and I thought I would do implement that logic in PAI event of the sub screen, u2018ENTERu2019 key not getting trigger on PAI event of the screen until cursor is on grid.
    Another question 2:  How do I control and not to be deleted a line on the grid (based on validation), where do I validate and by pass the delete function for a particular line, or suggest me to gray out only one line on the grid .
    I would like to have delete function to work as it is ,except for some validations..
    Can I implement using PAI event of the sub screen or any by ALV event.
    Please suggest me..
    Edited by: Ravindranath Arusam on May 13, 2010 2:42 PM

    In DATA_CHANGED event, you will get the modified row into the attribute MP_MOD_ROWS of the impoerting object ER_DATA_CHANGED. Since this MP_MOD_ROWS is the Object reference to Data, you need to have the field symbol to get the value.
      FIELD-SYMBOLS:  <lft_mod_output>  TYPE t_t_output.
      ASSIGN  er_data_changed->mp_mod_rows->* TO <lft_mod_output>.
    You can get the Value of the Cell by using the method GET_CELL_VALUE of the same ER_DATA_CHANGED object and use the method MODIFY_CELL To update the value back to ALV.
    To Restrict the row deletion:
    When the row is deleted it is being added to Attribute mt_deleted_rows of the object ER_DATA_CHANGED. You can put the data back to the table in the DATA_CHANGE_FINISHED event. Visit this post http://help-abap.blogspot.com/2008/10/alv-disable-delete-key-on-keyboard-in.html for more information.
    Regards,
    Naimesh Patel

  • How to use enter in Editable column of Reuse_alv_gird_display

    Hello gurus,
    I have a requirement , a editable column in alv display, where user enters an amount and hits 'enter' it i will multiply with other column in the report and give display in next column.  Now i can do it easily by using USER Command in Reuse alv grid display but when i use SY-UCOMM  &DATA_SAVE. and user needs to press save button.  Is ther any possibility so that if user hits enter then this requirement can be achieved.
    Thanks.

    Hi,
    Write a code like below..
    WA_FLDCAT-EDIT = 'X'.
    F SY-UCOMM = 'SAVE' .
    *** to reflect the data changed into internal table
         IF REF_GRID IS INITIAL.
           CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
             IMPORTING
               E_GRID = REF_GRID.
         ENDIF.
         IF NOT REF_GRID IS INITIAL.
    ***** To check whether the ALV Grid is Modified
    ***** And also to Modify the internal table based on Modification in ALV
           CALL METHOD REF_GRID->CHECK_CHANGED_DATA
             IMPORTING
               E_VALID = L_VALID.
         ENDIF.
    Arivazhagan S

  • Edit column issue in Premiere Elements 9

    Is there an issue with the Edit Column feature in the project window of Premiere Elements 9?
    When I add a Description or Comment column, changes are not saved when I close and reopen the program.
    Also, I cannot write any text in these columns to describe my videos (if I click on the space for writing comments, it just opens up a window to view the video) whereas I was able to do it with version 4 and earlier.
    I am using the trial version before buying and would like to know if the purchased version has this problem or not and if it can be fixed?

    I could be mis-remembering, but I think that Steve Grisetti has confirmed about what you indicate. I do not know if this was some sort of change in Adobe's thinking, and they did not clean up after themselves, or if this is just a Bug, that needs to be addressed.
    Personally, I would file a Bug Report, with the full details, and hope to get a fix in the works.
    Also, if I am mis-remembering, I am sure that Steve G. will correct me.
    Good luck,
    Hunt

  • Export TO XXL from ALV Grid - Column order mismatch

    Hi All,
    The user is trying to download data from Option -> Export -> Spreadsheet which will create XXL.
    But while downloading there is mismatch in the order of columns displayed on the alv grid & columns downloaded.
    All character fields are displayed on left, then date fields then quantity fields are downloaded to XXL. but in ALV Grid user has chosen a layout in which date fields come first.
    Please help me to find solution

    Grid display using    'REUSE_ALV_GRID_DISPLAY'. From the alv grid output, user is trying to download data using export -> Excel . so for download there is no custom code.
    We have copied standard report and added few more fields to the custom report. strangely Standard report also has this issue.
    I searched for SAP notes also..no clue

  • Reordering of rows - issue with drag and drop of editable columns in table

    JDeveloper: 11.1.1.6.0
    ADF Faces - Drag and Drop for reordering of rows within the same af:table
    I have a requirement for reordering rows in a table using drag and drop. This table is loaded using a list and I am able to programmatically do the reordering of the rows based on the events of drag and drop by manipulating the list. Reordering of rows is working fine if all the columns are read only. For all the input text and input date columns the values are not getting reordered. Anyone has any idea on what the issue may be with reordering of the rows for editable columns/rows (af:inputText and af:inputDate) in af:table. Below is what Iam doing on drop event which is a collection drop target.
    public DnDAction dropCollection(DropEvent dropEvent) {
    try
    Object dropSite = dropEvent.getDropSite();
    Transferable transferable = dropEvent.getTransferable();
    DataFlavor<RowKeySet> rowKeySetFlavor = DataFlavor.getDataFlavor(RowKeySet.class, "rowmove");
    RowKeySet rowKeySet = transferable.getData(rowKeySetFlavor);
    RichTable table = (RichTable) dropEvent.getDragComponent();
    if (rowKeySet != null)
    CollectionModel dragModel = transferable.getData(CollectionModel.class);
    Object dragM = dragModel.getRowData(0);
    Object currKey = rowKeySet.iterator().next();
    dragModel.setRowKey(currKey);
    table.setRowKey(currKey);
    OrderData orderData = (OrderData)this.prodReportTableData.get(Integer.parseInt(currKey.toString()));
    this.prodReportTableData.remove(Integer.parseInt(currKey.toString()));
    this.prodReportTableData.add(Integer.parseInt(dropSite.toString()), orderData);
    OrderData orderDataAdded = this.prodReportTableData.get(Integer.parseInt(dropSite.toString()));
    JSFUtils.addPartialTarget(this.getProdReportTableBinding());
    catch(Exception e)
    e.printStackTrace();
    return DnDAction.MOVE;
    Code snippet from UI:
    <af:table value="#{pageFlowScope.prodReportBackingBean.prodReportTableData}"
    var="row" styleClass="AFStretchWidth" rowBandingInterval="0"
    rows="40" emptyText="No data to display." id="t1"
    partialTriggers=":::cb1" columnStretching="column:c3"
    binding="#{pageFlowScope.prodReportBackingBean.prodReportTableBinding}" summary="PROD TABLE">
    <af:dragSource actions="MOVE" defaultAction="MOVE"
    discriminant="rowmove"
    dragDropEndListener="#{pageFlowScope.prodReportBackingBean.afterDragAndDrop}"/>
    <af:collectionDropTarget dropListener="#{pageFlowScope.prodReportBackingBean.dropCollection}"
    actions="MOVE"
    modelName="rowmove"/>

    Hi,
    not sure its the reason but you have huge bummer in your configuration.
    <af:table value="#{pageFlowScope.prodReportBackingBean.prodReportTableData}"
    var="row" styleClass="AFStretchWidth" rowBandingInterval="0"
    rows="40" emptyText="No data to display." id="t1"
    partialTriggers=":::cb1" columnStretching="column:c3"
    *binding="#{pageFlowScope.prodReportBackingBean.prodReportTableBinding}"* summary="PROD TABLE">
    JSF component bindings should not be to beans in a scope larger than request to avoid stale component instances.
    Frank

  • Editable columns in table don't select the whole row

    I am new to the forums and posted this to the wrong one the first time and I am not sure how to move it so I am just reposting it here. Sorry.
    I have a table with 7 columns. 2 of them are non-editable and the rest are either radio buttons or check boxes. When I click on the 2 non-editable columns, the whole row gets highlighted. When I click on any of the editable columns, the button is selected, but the whole row is not highlighted. If I made the editable columns non-editable then the whole row gets highlighted when the column is clicked on. I want the button selected and the row highlighted when the editable columns are clicked on. Here is some relevant code:
    class PackageTable extends JPanel
        public PackageTable(String pathfile)
           fieldsok = true;
           errorfield = new JTextField(250);
           startfield = new JTextField(250);
           stopfield = new JTextField(250);
           tableModel = new MyTableModel();
           table = new JTable(tableModel)
             public Component prepareRenderer(TableCellRenderer renderer, int rowIndex, int vColIndex)
               Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
               if (vColIndex == 0)
                 c.setBackground(new Color(238,238,238));
               else
                 c.setBackground(new Color(255,255,255));
               boolean selected = isRowSelected(rowIndex);
               if (selected)
                 c.setBackground(Color.yellow);
               return c;
           table.setPreferredScrollableViewportSize(new Dimension(300, 1000));
           table.setRowSelectionAllowed(true);
           table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
           TableColumn column = null;
           for (int col = 0; col < 7; col++)
              column = table.getColumnModel().getColumn(col);
              if (col == 0)
                column.setPreferredWidth(30);
              else if (col == 1)
                column.setPreferredWidth(300);
              else if (col == 2)
                column.setPreferredWidth(10);
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellEditor(new RadioButtonEditor(new JCheckBox()));
              else if (col == 3)
                column.setPreferredWidth(10);
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellEditor(new RadioButtonEditor(new JCheckBox()));
              else if (col == 4)
                column.setPreferredWidth(10);
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellEditor(new RadioButtonEditor(new JCheckBox()));
              else if ((col == 5) || (col == 6))
                column.setPreferredWidth(10);
      class RadioButtonRenderer implements TableCellRenderer
        public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column)
          if (isSelected)
            setForeground(table.getSelectionForeground());
            setBackground(table.getSelectionBackground());
          else
            setForeground(table.getForeground());
            setBackground(table.getBackground());
          if (value == null)
            return null;
          return (Component) value;
      class RadioButtonEditor extends DefaultCellEditor implements ItemListener
        private JRadioButton button;
        public RadioButtonEditor(JCheckBox checkBox)
          super(checkBox);
        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
          if (value == null)
            return null;
          button = (JRadioButton) value;
          button.addItemListener(this);
          return (Component) value;
        public void addCellEditorListener(CellEditorListener listener)
          listenerList.add(CellEditorListener.class, listener);
        public void removeCellEditorListener(CellEditorListener listener)
          listenerList.remove(CellEditorListener.class, listener);
        protected void fireEditingStopped()
          CellEditorListener listener;
          Object[] listeners = listenerList.getListenerList();
          for (int i = 0; i < listeners.length; i++)
            if (listeners[i] == CellEditorListener.class)
              listener = (CellEditorListener)listeners[i+1];
              listener.editingStopped(changeEvent);
        protected void fireEditingCanceled()
          CellEditorListener listener;
          Object[] listeners = listenerList.getListenerList();
          for (int i = 0; i < listeners.length; i++)
            if (listeners[i] == CellEditorListener.class)
              listener = (CellEditorListener)listeners[i+1];
              listener.editingCanceled(changeEvent);
        public void cancelCellEditing()
          fireEditingCanceled();
        public boolean stopCellEditing()
          fireEditingStopped();
          return true;
        public Object getCellEditorValue()
          return button;
        public boolean isCellEditable(EventObject event)
          return true;
        public boolean shouldSelectCell(EventObject event)
          return true;
        public void itemStateChanged(ItemEvent e)
          super.fireEditingStopped();
      class MyTableModel extends AbstractTableModel
        String[] columnNames = {"","Configuration Files","Sorts","Plots","Both","Print","Alerts"};
        public MyTableModel() { }
        public int getColumnCount()
          return columnNames.length;
        public int getRowCount()
          return totaldata.size();
        public String getColumnName(int col)
          return columnNames[col];
        public Object getValueAt(int row,int col)
          return(((Vector)totaldata.get(row)).get(col));
        public Class getColumnClass(int c)
          return getValueAt(0, c).getClass();
        public boolean isCellEditable(int row, int col)
          if ((col == 0) || (col == 1))
            return false;
          else
            return true;
        public void setValueAt(Object value, int row, int col)
          Vector v1 = new Vector();
          v1 = (Vector)totaldata.get(row);
          v1.set(col,value);
          if (col == 1)
             if (((String)value).indexOf("/") == -1)
               JOptionPane.showMessageDialog(pdsframe, "The CONFIG file that was entered on line " + (row+1) + " is not valid.");
               v1.set(col,(Object)"");
               return;
          fireTableCellUpdated(row, col);
          fireTableChanged(new TableModelEvent(this));
        public void addNewRow(Vector newRow)
          totaldata.add(newRow);
          fireTableRowsInserted(totaldata.size()-1, totaldata.size()-1);
        public void deleteRow(int Row)
          totaldata.remove(Row);
          fireTableRowsDeleted(totaldata.size()-1, totaldata.size()-1);
      }I have searched forever to try to find how to do this and I can't seem to get it right. If all the radiobuttons in one column are selected and I click on one of those rows in one of those columns, then the whole row is highlighted.
    Can anyone help me out?
    Thanks.
    esk3 {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Sorry. I didn't know that I had to provide something that could be executed. I am going to try to put enough in so that it can. This is part of a larger program and this frame is called from another frame. Here it is. I hope it works.
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Dimension.*;
    import java.util.*;
    import java.text.*;
    // Java extension packages
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    import javax.swing.JTable.*;
    import javax.swing.JScrollPane.*;
      private JFrame     pdsframe;
      private String printchecked;
      private String alertschecked;
      private JTextField cb;
      private JTextField pf;
      private JScrollPane scrollpane;
      private JTable table;
      private MyTableModel tableModel;
      private Vector totaldata;
      private JLabel startlabel;
      private JLabel stoplabel;
      private JTextField startfield;
      private JTextField stopfield;
      private JTextField errorfield;
      private boolean fieldsok;
      class MyTableModel extends DefaultTableModel
        String[] columnNames = {"","Configuration Files","Sorts","Plots","Both","Print","Alerts"};
        public MyTableModel() { }
        public int getColumnCount()
          return columnNames.length;
        public int getRowCount()
          return totaldata.size();
        public String getColumnName(int col)
          return columnNames[col];
        public Object getValueAt(int row,int col)
          return(((Vector)totaldata.get(row)).get(col));
        public Class getColumnClass(int c)
          return getValueAt(0, c).getClass();
        public boolean isCellEditable(int row, int col)
          if ((col == 0) || (col == 1))
            return false;
          else
            return true;
        public void setValueAt(Object value, int row, int col)
          Vector v1 = new Vector();
          v1 = (Vector)totaldata.get(row);
          v1.set(col,value);
          if (col == 1)
             if (((String)value).indexOf("/") == -1)
               JOptionPane.showMessageDialog(pdsframe, "The CONFIG file that was entered on line " + (row+1) + " is not valid.");
               v1.set(col,(Object)"");
               return;
          fireTableCellUpdated(row, col);
          fireTableChanged(new TableModelEvent(this));
        public void addNewRow(Vector newRow)
          totaldata.add(newRow);
          fireTableRowsInserted(totaldata.size()-1, totaldata.size()-1);
        public void deleteRow(int Row)
          totaldata.remove(Row);
          fireTableRowsDeleted(totaldata.size()-1, totaldata.size()-1);
      class RadioButtonRenderer implements TableCellRenderer
        public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column)
          if (isSelected)
            setForeground(table.getSelectionForeground());
            setBackground(table.getSelectionBackground());
          else
            setForeground(table.getForeground());
            setBackground(table.getBackground());
          if (value == null)
            return null;
          return (Component) value;
      class RadioButtonEditor extends DefaultCellEditor implements ItemListener
        private JRadioButton button;
        public RadioButtonEditor(JCheckBox checkBox)
          super(checkBox);
        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
          if (value == null)
            return null;
          button = (JRadioButton) value;
          button.addItemListener(this);
          return (Component) value;
        public void addCellEditorListener(CellEditorListener listener)
          listenerList.add(CellEditorListener.class, listener);
        public void removeCellEditorListener(CellEditorListener listener)
          listenerList.remove(CellEditorListener.class, listener);
        protected void fireEditingStopped()
          CellEditorListener listener;
          Object[] listeners = listenerList.getListenerList();
          for (int i = 0; i < listeners.length; i++)
            if (listeners[i] == CellEditorListener.class)
              listener = (CellEditorListener)listeners[i+1];
              listener.editingStopped(changeEvent);
        protected void fireEditingCanceled()
          CellEditorListener listener;
          Object[] listeners = listenerList.getListenerList();
          for (int i = 0; i < listeners.length; i++)
            if (listeners[i] == CellEditorListener.class)
              listener = (CellEditorListener)listeners[i+1];
              listener.editingCanceled(changeEvent);
          }      fireEditingStopped();
          return true;
        public Object getCellEditorValue()
          return button;
        public boolean isCellEditable(EventObject event)
          return true;
        public boolean shouldSelectCell(EventObject event)
          return true;
        public void itemStateChanged(ItemEvent e)
          super.fireEditingStopped();
      class PackageTable extends JPanel
        public PackageTable(String pathfile)
           fieldsok = true;
           errorfield = new JTextField(250);
           startfield = new JTextField(250);
           stopfield = new JTextField(250);
           tableModel = new MyTableModel();
           table = new JTable(tableModel)
             public Component prepareRenderer(TableCellRenderer renderer, int rowIndex, int vColIndex)
               Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
               if (vColIndex == 0)
                 c.setBackground(new Color(238,238,238));
               else
                 c.setBackground(new Color(255,255,255));
               boolean selected = isRowSelected(rowIndex);
               if (selected)
                 c.setBackground(Color.yellow);
               return c;
           table.setPreferredScrollableViewportSize(new Dimension(300, 1000));
           table.setRowSelectionAllowed(true);
           table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
           TableColumn column = null;
           for (int col = 0; col < 7; col++)
              column = table.getColumnModel().getColumn(col);
              if (col == 0)
                column.setPreferredWidth(30);
              else if (col == 1)
                column.setPreferredWidth(300);
              else if (col == 2)
                column.setPreferredWidth(10);
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellEditor(new RadioButtonEditor(new JCheckBox()));
              else if (col == 3)
                column.setPreferredWidth(10);
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellEditor(new RadioButtonEditor(new JCheckBox()));
              else if (col == 4)
                column.setPreferredWidth(10);
                column.setCellRenderer(new RadioButtonRenderer());
                column.setCellEditor(new RadioButtonEditor(new JCheckBox()));
              else if ((col == 5) || (col == 6))
                column.setPreferredWidth(10);
          JScrollPane scrollPane = new JScrollPane(table);
          scrollPane.setBounds(20,180,1000,300);
          JLabel pflabel = new JLabel("Package File: ");
          pf = new JTextField(pathfile);
          cb = new JTextField(250);
          startlabel = new JLabel("START_TIME = ");
          stoplabel = new JLabel("STOP_TIME = ");
          JLabel typelabel = new JLabel("TYPE OF FORMAT TO OUTPUT");
          JButton savebutton = new JButton("Save and Run");
          JButton jbtAddRow = new JButton("Add New Row");
          JButton jbtUpdateRow = new JButton("Update Row");
          JButton jbtDeleteRow = new JButton("Delete Row");
          JButton cancelbutton = new JButton("Cancel");
          cb.setEditable(false);
          cb.setBounds(130,230,100,30);
          cb.setEnabled(false);
          cb.setVisible(false);
          pflabel.setBounds(20,20,100,30);
          pf.setEditable(false);
          pf.setBounds(130,20,300,30);
          startlabel.setBounds(20,90,100,30);
          startfield.setEditable(false);
          startfield.setBackground(new Color(255,255,255));
          startfield.setBounds(130,90,300,30);
          stoplabel.setBounds(20,120,100,30);
          stopfield.setEditable(false);
          stopfield.setBackground(new Color(255,255,255));
          stopfield.setBounds(130,120,300,30);
          typelabel.setBounds(525,150,400,30);
          savebutton.setBounds(130,500,130,30);
          jbtAddRow.setBounds(280,500,130,30);
          jbtUpdateRow.setBounds(430,500,130,30);
          jbtDeleteRow.setBounds(580,500,130,30);
          cancelbutton.setBounds(730,500,130,30);
          add(scrollPane);
          add(pflabel);
          add(pf);
          add(startlabel);
          add(stoplabel);
          add(startfield);
          add(stopfield);
          add(typelabel);
          add(jbtAddRow);
          add(jbtUpdateRow);
          add(jbtDeleteRow);
          add(savebutton);
          add(cancelbutton);
      public void createAndShowGUI() {
        //Create and set up the window.
        pdsframe = new JFrame("PDS Batch Parameters");
        pdsframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        totaldata = new Vector();
        //Create and set up the content pane.
        PackageTable newContentPane = new PackageTable(pathfile);
        newContentPane.setOpaque(true); //content panes must be opaque
        pdsframe.setContentPane(newContentPane);
        //Display the window.
        pdsframe.setLayout(null);
        pdsframe.setSize(1100,700);
        pdsframe.setLocationRelativeTo(null);
        pdsframe.setFocusableWindowState(true);
        pdsframe.setVisible(true);
        pdsframe.show();
        pdsframe.setAlwaysOnTop(true);
        pdsframe.requestFocus();
    public void main()
        Toolkit.getDefaultToolkit().beep();
        createAndShowGUI();
    }Does this help? I hope it works. These are the relevant parts. Thanks.
    esk3

Maybe you are looking for

  • EMac 700MHz display turned purple/pink. Can't boot from HD and CD

    hi, I have several issues here: 1) My eMac display turned purple/pink from the start 2) It won't start from either HD or CD. It gets to the grey Apple and the spinning wheel.. After a while of spinning, it freezes and nothing else I can do. This happ

  • Inconsistency between a document field and the prof. segment number

    Hi, While processing an invoice in one company code for vendor# XXX with the PO# AAAA line# 10, it is showing below error message while posting. Please advise on the below error or fix the issue to post the invoice in to SAP. The using screen T-code

  • Camera 9320 cannot take pictures

    my bb is not even ^ months old and my camera first started showing error 5 pictures remaining even though there were no pictures in the folder. when i remove my battery after i have taken a pic it deletes the camera pics automatically. now there is n

  • Selecting and joining differnent tables based on columns populated

    I have a table for audit purpose Table paudit pauditid (NOT NULL) operationid (NOT NULL)                typeid     (NOT NULL) -- Electronics, furniture, entertainment, department      operatorid (NOT NULL) electronicsid furnitureid entertainmentid   

  • Please Wait Screen when I touch any key

    I believe that I am upgraded to windows 8.1, but I'm not entirely sure about that. I do have automatic updates on, so that is why I believe that I do. I have been having trouble getting an internet connection over the last week on boot up. A few days