Error on double click of a cell in ALV Grid
Hi Experts!
I have an ALV grid displaying a report. When I doulble click in one of the cells, it gives me the error below:
Runtime Errors PERFORM_NOT_FOUND
Except. CX_SY_DYN_CALL_ILLEGAL_FORM
Date and Time 09/11/2009 11:52:58
Short text
Call (PERFORM) to a non-existent routine.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The program "SAPLSLVC_FULLSCREEN" is meant to execute an external PERFORM,
namely the routine "USER_COMMAND " of the program "ZSTORAGE_LOC_ANALYSIS ", but
this routine does not exist.
This may be due to any of the following reasons:
1. One of the programs "SAPLSLVC_FULLSCREEN" or "ZSTORAGE_LOC_ANALYSIS " is
currently being developed.
The name "USER_COMMAND " of the called routine may be incorrect, or
the routine "USER_COMMAND " is not yet implemented in the program
"ZSTORAGE_LOC_ANALYSIS ".
2. If the program SAPMSSY1 is involved in the runtime error, one of
the function modules called via RFC is not flagged as remote-capable.
(see Transaction SE37 Goto -> Administration -> RFC flag)
3. There is an inconsistency in the system. The versions of the
programs "SAPLSLVC_FULLSCREEN" and "ZSTORAGE_LOC_ANALYSIS " do not match.
Any suggestions on how to catch this error?
Thaks a lot!
Solved. Commented i_callback_user_command = 'USER_COMMAND'.
Similar Messages
-
Double click on list field in ALV grid control
Hello all,
I developed a report with a ALV grid control. I would like to move some functionality from marking a line and pressing a button in the status line to double clicking a specific field in the output list and execute a command there (i.e. double click on PO number and go to PO display TAC then). Can anybody provide some example coding for that?
Thanks so much for your help!
TorstenHere is your sample program. Copy this code into a z program. Create the screen 100 with a container in it and name it "ALV_CONTAINER". Create the gui-status with "BACK".
report zrich_0001.
tables: ekko.
data: begin of i_alv occurs 0,
ebeln type ekko-ebeln,
end of i_alv.
* CLASS cl_event_receiver DEFINITION Handles Double Click
class cl_event_receiver definition.
public section.
methods handle_double_click
for event double_click of cl_gui_alv_grid
importing e_row e_column.
private section.
endclass.
* CLASS CL_EVENT_RECEIVER IMPLEMENTATION Handles Double Click
class cl_event_receiver implementation.
method handle_double_click.
perform drill_down using e_row-index.
endmethod.
endclass.
data: alv_container type ref to cl_gui_custom_container.
data: event_receiver type ref to cl_event_receiver.
data: alv_grid type ref to cl_gui_alv_grid.
data: layout type lvc_s_layo.
data: fieldcat type lvc_t_fcat.
selection-screen begin of block b1 with frame title text-001 .
select-options: s_ebeln for ekko-ebeln.
selection-screen end of block b1.
start-of-selection.
perform get_data.
call screen 100.
* Module status_0100 OUTPUT
module status_0100 output.
set pf-status '0100'.
set titlebar '0100'.
data: variant type disvariant.
variant-report = sy-repid.
variant-username = sy-uname.
* Create Controls
create object alv_container
exporting
container_name = 'ALV_CONTAINER'.
create object alv_grid
exporting
i_parent = alv_container.
* Create Event Receiver
create object event_receiver.
* Populate Field Catalog
perform get_fieldcatalog.
call method alv_grid->set_table_for_first_display
exporting
is_layout = layout
is_variant = variant
i_save = 'U'
i_structure_name = 'I_ALV'
changing
it_outtab = i_alv[]
it_fieldcatalog = fieldcat[].
* handler for ALV grid
set handler event_receiver->handle_double_click for alv_grid.
endmodule.
* Module USER_COMMAND_0100 INPUT
module user_command_0100 input.
case sy-ucomm.
when 'BACK' or 'CANC'.
if not alv_container is initial.
call method alv_container->free.
clear: alv_container.
free : alv_container.
endif.
if sy-subrc = 0.
set screen 0.
leave screen.
else.
leave program.
endif.
when 'EXIT'.
if not alv_container is initial.
call method alv_container->free.
clear: alv_container.
free : alv_container.
endif.
leave program.
endcase.
endmodule.
* FORM GET_DATA
form get_data.
select * into corresponding fields of table i_alv
from ekko
where ebeln in s_ebeln.
sort i_alv ascending by ebeln.
endform.
* Form Get_Fieldcatalog - Set Up Columns/Headers
form get_fieldcatalog.
data: ls_fcat type lvc_s_fcat.
refresh: fieldcat.
clear: ls_fcat.
ls_fcat-reptext = 'PO Number'.
ls_fcat-coltext = 'PO Number'.
ls_fcat-fieldname = 'EBELN'.
ls_fcat-ref_table = 'I_ALV'.
ls_fcat-outputlen = '12'.
ls_fcat-col_pos = 1.
append ls_fcat to fieldcat.
endform.
* DRILL_DOWN
form drill_down using index.
read table i_alv index index.
if sy-subrc = 0.
set parameter id 'BES' field i_alv-ebeln.
call transaction 'ME23' and skip first screen.
if not alv_container is initial.
call method alv_container->free.
clear: alv_container.
free : alv_container.
endif.
endif.
endform.
Regards,
Rich Heilman -
Needs double click to edit cell in JTable
I know this is bad design but there's no other way that I could possibly meet the requirement which is to have dynamic components. Anyhow, the requirement is to have any kind of components(e.g. TextFields, Combobox, Regular expression fields, a panel with a number of checkboxes) in a table cell in the same column. It would have been easier to do this by using the the DefaultCellEditor, with the 'panel containing a number of checkboxes' I cannot use it.
I already have an implementation for this requirement. There was no problem with it when we used Java 1.5. But when we shifted to Java 1.6, I noticed that I need to double-click on a cell so that I can edit it. I did not notice this behavior at all with 1.5. What could have changed in 1.6?
Below, are my (trimmed-down) codes:
//TestComponent.java
public class TestComponent extends JPanel{
private int componentHeight=16;
public TestComponent(int i){
this.setPreferredSize(new Dimension(90, this.componentHeight));
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
switch (i){
case 0: createTextField(); break;
case 1: createCheckBox(); break;
case 2: createCombo(); break;
private void createTextField(){
String text = null;
int textFieldMaxLength = 5;
JTextField oText = new JTextField(textFieldMaxLength);
// add it to this Panel:
this.add(oText);
// set the data:
text = "test";
oText.setText(text);
// set size for this TextField:
Dimension fieldSize = new Dimension(
textFieldMaxLength * 13, this.componentHeight);
oText.setPreferredSize(fieldSize);
oText.setMinimumSize(fieldSize);
oText.setMaximumSize(fieldSize);
private void createCheckBox(){
JCheckBox chkbox = new JCheckBox();
this.add(chkbox);
private void createCombo(){
JComboBox combo = new JComboBox(new String[]{"apple", "orange", "plum", "grapefruit"});
Dimension fieldSize = new Dimension( 5 * 13, this.componentHeight);
combo.setPreferredSize(fieldSize);
combo.setMinimumSize(fieldSize);
combo.setMaximumSize(fieldSize);
this.add(combo);
//ComponentCellEditor.java
public class ComponentCellEditor extends AbstractCellEditor
implements TableCellEditor, Serializable{
protected JComponent editorComponent = null;
public Component getComponent() {
return editorComponent;
public Object getCellEditorValue() {
return editorComponent;
public boolean isCellEditable(EventObject anEvent) {
return true;
public boolean shouldSelectCell(EventObject anEvent) {
return true;
public boolean stopCellEditing() {
fireEditingStopped();
return true;
// Implementing the TreeCellEditor Interface
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
this.editorComponent = (TestComponent)value;
return editorComponent;
//ComponentCellRenderer.java
public class ComponentCellRenderer implements TableCellRenderer
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
TestComponent oComp = (TestComponent) value;
if (isSelected) {
oComp.setForeground(table.getSelectionForeground());
oComp.setBackground(table.getSelectionBackground());
} else {
oComp.setForeground(table.getForeground());
oComp.setBackground(table.getBackground());
return oComp;
//TestTable.java
public class TestTable
public static void main(String []args){
String columns[] = {"Text", "Value"};
Class types[] = {String.class, TestComponent.class};
boolean editable[] = {false, true};
AsrTable table = new AsrTable(new Dimension(200, 150), columns, types, editable);
table.addRow(new Object[]{"Field1", new TestComponent(0)});
table.addRow(new Object[]{"Field2", new TestComponent(1)});
table.addRow(new Object[]{"Field3", new TestComponent(2)});
table.setDefaultEditor(TestComponent.class, new ComponentCellEditor());
table.setDefaultRenderer(TestComponent.class, new ComponentCellRenderer());
table.setShowGrid(false);
table.setRowHeight(20);
table.setRowSelectionAllowed(false);
JFrame frame = new JFrame();
frame.addWindowListener( new WindowAdapter() {
public void windowClosing(WindowEvent e)
Window win = e.getWindow();
win.setVisible(false);
win.dispose();
System.exit(0);
JScrollPane pane = new JScrollPane(table);
frame.getContentPane().add(pane);
frame.pack();
frame.setVisible(true);
}My last post doesn't have Code Formatting.
// TestComponent.java
public class TestComponent extends JPanel{
private int componentHeight=16;
public TestComponent(int i){
this.setPreferredSize(new Dimension(90, this.componentHeight));
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
switch (i){
case 0: createTextField(); break;
case 1: createCheckBox(); break;
case 2: createCombo(); break;
private void createTextField(){
String text = null;
int textFieldMaxLength = 5;
JTextField oText = new JTextField(textFieldMaxLength);
// add it to this Panel:
this.add(oText);
// set the data:
text = "test";
oText.setText(text);
// set size for this TextField:
Dimension fieldSize = new Dimension(
textFieldMaxLength * 13, this.componentHeight);
oText.setPreferredSize(fieldSize);
oText.setMinimumSize(fieldSize);
oText.setMaximumSize(fieldSize);
private void createCheckBox(){
JCheckBox chkbox = new JCheckBox();
this.add(chkbox);
private void createCombo(){
JComboBox combo = new JComboBox(new String[]{"apple", "orange", "plum", "grapefruit"});
Dimension fieldSize = new Dimension( 5 * 13, this.componentHeight);
combo.setPreferredSize(fieldSize);
combo.setMinimumSize(fieldSize);
combo.setMaximumSize(fieldSize);
this.add(combo);
// ComponentCellEditor.java
public class ComponentCellEditor extends AbstractCellEditor
implements TableCellEditor, Serializable
protected JComponent editorComponent = null;
public Component getComponent() {
return editorComponent;
public Object getCellEditorValue() {
return editorComponent;
public boolean isCellEditable(EventObject anEvent) {
return true;
public boolean shouldSelectCell(EventObject anEvent) {
return true;
public boolean stopCellEditing() {
fireEditingStopped();
return true;
// Implementing the TreeCellEditor Interface
public Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected, int row, int column) {
this.editorComponent = (TestComponent)value;
return editorComponent;
// ComponentCellRenderer.java
public class ComponentCellRenderer implements TableCellRenderer
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row,
int column) {
TestComponent oComp = (TestComponent) value;
if (isSelected) {
oComp.setForeground(table.getSelectionForeground());
oComp.setBackground(table.getSelectionBackground());
} else {
oComp.setForeground(table.getForeground());
oComp.setBackground(table.getBackground());
return oComp;
// TestTable.java
public class TestTable
public static void main(String []args){
String columns[] = {"Text", "Value"};
Class types[] = {String.class, TestComponent.class};
boolean editable[] = {false, true};
AsrTable table = new AsrTable(new Dimension(200, 150), columns, types, editable);
table.addRow(new Object[]{"Field1", new TestComponent(0)});
table.addRow(new Object[]{"Field2", new TestComponent(1)});
table.addRow(new Object[]{"Field3", new TestComponent(2)});
table.setDefaultEditor(TestComponent.class, new ComponentCellEditor());
table.setDefaultRenderer(TestComponent.class, new ComponentCellRenderer());
table.setShowGrid(false);
table.setRowHeight(20);
table.setRowSelectionAllowed(false);
JFrame frame = new JFrame();
frame.addWindowListener( new WindowAdapter() {
public void windowClosing(WindowEvent e)
Window win = e.getWindow();
win.setVisible(false);
win.dispose();
System.exit(0);
JScrollPane pane = new JScrollPane(table);
frame.getContentPane().add(pane);
frame.pack();
frame.setVisible(true);
} -
Possible to have vertical scroll bar for a cell in ALV Grid (using methods)
Hi All,
I have a field with length 100 characters on a ALV Grid (using methods)..User doesn't want to scroll all the 100 characters horizontally to see the whole text rather he wants to have a vertical scroll bar for the cell so that he can scroll vertically.
Is it possible to have split the cell text into lines and have a vertical scroll bar for a cell in ALV Grid?
Regards
Jaker.Thanks for the suggestion Balu.I tried this , but while scrolling,headers also getting scrolled.
Becoz of this , if i scroll down to the last row,headers are getting hidden.
Headers should always be static.only the data should scroll.
Since h:datatable is being rendered as one table , i can div tag for this table alone.
If i have seperate datatable for headers alone i can do this .But i should not use two datatables. -
Display only cell in ALV Grid in OO
Hi Folks,
Hope someone can help me with this little issue. I have a series of columns in my ALV grid that are editable, but I need to a) make some of the cells on specific lines uneditable and b) display time based fields on this line as blank (presently they shoe 00:00:00).
For problem a) I have set the layout style frame as 'cellstyles'
es_layout-stylefname = 'CELLSTYLES'.
I have also set the edit flag in the field catalog for the individual columns to 'X' eg
WHEN 'CUSTTS_DATE_N'.
ls_fieldcat-edit = 'X'.
And coded:
gwa_stylerow-fieldname = 'CUSTTS_DATE_N'.
gwa_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND gwa_stylerow TO gt_stylerow.
wa_delivery_list-cellstyle[] = gt_stylerow[].
APPEND wa_delivery_list TO it_delivery_list.
Yet, the ALV cells are still being displayed as editable. Can't for the life of me figure out what's missing. The only other thought I had around this is that the wa_delivery_list-cellstyle table is being set in the data extraction code, before the ALV grid is built, and that the cell formats are being overwritten/on not being called by the field catalog entries. Any thoughts on how to make these fields/cells display only when the ALV is first displayed would be greatly appreciated.
As for option b) I'm clueless, as the cell style commands are not being picked up (see problem a.). Again any thoughts would be appreciated, and points will be rewarded for solutions/suggestions that lead to solutions.
Cheers,
Stephen KeamHello Stephen
I have created a simple report ZUS_SDN_ALV_EDITABLE_1B which shows how to use editability on cell level.
The crucial parts of the coding for your requirements are shown below, followed by the entire report.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'UPTIM'.
IF ( syst-subrc = 0 ).
DELETE gt_fcat INDEX syst-tabix.
ls_fcat-no_zero = abap_true. " suppresses 00:00:00
INSERT ls_fcat INTO gt_fcat INDEX 7.
ENDIF.
*& Form SET_CELL_EDITABLE
* text
* --> p1 text
* <-- p2 text
FORM set_cell_editable .
* define local data
DATA: ld_idx TYPE i,
ls_outtab TYPE ty_s_outtab,
ls_style TYPE lvc_s_styl.
LOOP AT gt_outtab INTO ls_outtab.
ld_idx = syst-tabix.
REFRESH: ls_outtab-celltab.
" NOTE: if you change the year of column ERDAT to 2008 then two columns will become non-editable
IF ( ls_outtab-erdat+0(4) = '2008' ).
CLEAR: ls_style.
ls_style-fieldname = 'UPDAT'.
ls_style-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_style INTO TABLE ls_outtab-celltab.
CLEAR: ls_style.
ls_style-fieldname = 'UPTIM'.
ls_style-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_style INTO TABLE ls_outtab-celltab.
ELSE.
ENDIF.
MODIFY gt_outtab FROM ls_outtab INDEX ld_idx
TRANSPORTING celltab.
ENDLOOP.
ENDFORM. " SET_CELL_EDITABLE
*& Report ZUS_SDN_ALV_EDITABLE
*& Thread: Display only cell in ALV Grid in OO
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="765083"></a>
* Flow logic of screen '100' (no elements, ok-code => gd_okcode ):
**PROCESS BEFORE OUTPUT.
** MODULE STATUS_0100.
**PROCESS AFTER INPUT.
** MODULE USER_COMMAND_0100.
*& GUI-Status: ok-codes BACK, EXIT, CANC
REPORT zus_sdn_alv_editable_1b.
TYPE-POOLS: abap.
CONSTANTS:
gc_tabname TYPE tabname VALUE 'KNB1'.
TYPES: BEGIN OF ty_s_outtab.
INCLUDE TYPE knb1 AS knb1.
TYPES: celltab TYPE lvc_t_styl.
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
WITH DEFAULT KEY.
DATA:
gd_okcode TYPE ui_func,
gd_repid TYPE syst-repid,
gt_fcat TYPE lvc_t_fcat,
gs_layout TYPE lvc_s_layo,
gs_variant TYPE disvariant,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid TYPE REF TO cl_gui_alv_grid.
DATA:
gs_outtab TYPE ty_s_outtab,
gt_outtab TYPE ty_t_outtab,
gt_outtab_pbo TYPE ty_t_outtab.
DATA:
gd_answer TYPE c.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_data_changed.
" Just trigger PAI followed by PBO
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'REFRESH'
* IMPORTING
* rc =
ENDMETHOD. "handle_data_changed
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM (gc_tabname) INTO CORRESPONDING FIELDS
OF TABLE gt_outtab UP TO 99 ROWS.
gt_outtab_pbo = gt_outtab. " set PBO data
PERFORM init_controls.
* ok-code field = GD_OKCODE
CALL SCREEN '0100'.
END-OF-SELECTION.
*& Form INIT_CONTROLS
* text
* --> p1 text
* <-- p2 text
FORM init_controls .
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create ALV grid
CREATE OBJECT go_grid
EXPORTING
i_parent = go_docking
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
" NOTE: not required
* set handler:
* lcl_eventhandler=>handle_data_changed for go_grid.
* Build fieldcatalog and set hotspot for field KUNNR
PERFORM build_fieldcatalog.
PERFORM set_layout_and_variant.
PERFORM set_cell_editable.
*§3.Optionally register ENTER to raise event DATA_CHANGED.
* (Per default the user may check data by using the check icon).
CALL METHOD go_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
SET HANDLER: lcl_eventhandler=>handle_data_changed FOR go_grid.
* Display data
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
is_variant = gs_variant
i_save = 'A'
CHANGING
it_outtab = gt_outtab
it_fieldcatalog = gt_fcat
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* NOTE:
* Documenation of I_SAVE ("An Easy Reference for ALV Grid Control")
*I_SAVE
*Determines the options available to the user for saving a layout:
*? 'X': global saving only
*? 'U': user-specific saving only
*? 'A': corresponds to 'X' and 'U'
*? SPACE: no saving
* Link the docking container to the target dynpro
gd_repid = syst-repid.
CALL METHOD go_docking->link
EXPORTING
repid = gd_repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
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. " INIT_CONTROLS
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
" NOTE: retrieve changed data from frontend (grid control) into
" the backend (itab in ABAP)
go_grid->check_changed_data( ).
CASE gd_okcode.
WHEN 'BACK' OR
'EXIT' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN 'REFRESH'.
PERFORM set_cell_editable.
" NOTE: Refresh required
CALL METHOD go_grid->refresh_table_display
* EXPORTING
* is_stable =
* i_soft_refresh =
* EXCEPTIONS
* finished = 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.
WHEN 'SAVE'.
IF ( gt_outtab = gt_outtab_pbo ).
MESSAGE 'No data changed' TYPE 'S'.
ELSE.
CLEAR: gd_answer.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
* TITLEBAR = ' '
* DIAGNOSE_OBJECT = ' '
text_question = 'Save data?'
* TEXT_BUTTON_1 = 'Ja'(001)
* ICON_BUTTON_1 = ' '
* TEXT_BUTTON_2 = 'Nein'(002)
* ICON_BUTTON_2 = ' '
* DEFAULT_BUTTON = '1'
* DISPLAY_CANCEL_BUTTON = 'X'
* USERDEFINED_F1_HELP = ' '
* START_COLUMN = 25
* START_ROW = 6
* POPUP_TYPE =
* IV_QUICKINFO_BUTTON_1 = ' '
* IV_QUICKINFO_BUTTON_2 = ' '
IMPORTING
answer = gd_answer
* TABLES
* PARAMETER =
EXCEPTIONS
text_not_found = 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.
IF ( gd_answer = '1' ). " yes
MESSAGE 'Data successfully saved' TYPE 'S'.
gt_outtab_pbo = gt_outtab. " update PBO data !!!
ELSE.
MESSAGE 'Action cancelled by user' TYPE 'S'.
ENDIF.
ENDIF.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_FIELDCATALOG
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog .
* define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = gc_tabname
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ls_fcat-edit = abap_true.
MODIFY gt_fcat FROM ls_fcat
TRANSPORTING edit
WHERE ( key NE abap_true ).
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'UPTIM'.
IF ( syst-subrc = 0 ).
DELETE gt_fcat INDEX syst-tabix.
ls_fcat-no_zero = abap_true. " suppresses 00:00:00
INSERT ls_fcat INTO gt_fcat INDEX 7.
ENDIF.
READ TABLE gt_fcat INTO ls_fcat
WITH KEY fieldname = 'UPDAT'.
IF ( syst-subrc = 0 ).
DELETE gt_fcat INDEX syst-tabix.
INSERT ls_fcat INTO gt_fcat INDEX 7.
ENDIF.
LOOP AT gt_fcat INTO ls_fcat.
ls_fcat-col_pos = syst-tabix.
MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
IF ( syst-tabix > 10 ).
DELETE gt_fcat INDEX syst-tabix.
ENDIF.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG
*& Form SET_LAYOUT_AND_VARIANT
* text
* --> p1 text
* <-- p2 text
FORM set_layout_and_variant .
CLEAR: gs_layout,
gs_variant.
gs_layout-cwidth_opt = abap_true.
gs_layout-zebra = abap_true.
*§3.Provide the fieldname of the celltab field by using field
* STYLEFNAME of the layout structure.
gs_layout-stylefname = 'CELLTAB'.
gs_variant-report = syst-repid.
gs_variant-handle = 'GRID'.
ENDFORM. " SET_LAYOUT_AND_VARIANT
*& Form SET_CELL_EDITABLE
* text
* --> p1 text
* <-- p2 text
FORM set_cell_editable .
* define local data
DATA: ld_idx TYPE i,
ls_outtab TYPE ty_s_outtab,
ls_style TYPE lvc_s_styl.
LOOP AT gt_outtab INTO ls_outtab.
ld_idx = syst-tabix.
REFRESH: ls_outtab-celltab.
IF ( ls_outtab-erdat+0(4) = '2008' ).
CLEAR: ls_style.
ls_style-fieldname = 'UPDAT'.
ls_style-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_style INTO TABLE ls_outtab-celltab.
CLEAR: ls_style.
ls_style-fieldname = 'UPTIM'.
ls_style-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_style INTO TABLE ls_outtab-celltab.
ELSE.
ENDIF.
MODIFY gt_outtab FROM ls_outtab INDEX ld_idx
TRANSPORTING celltab.
ENDLOOP.
ENDFORM. " SET_CELL_EDITABLE
Regards
Uwe -
One editable cell in alv grid using function module
Hello all,
Any one have an idea how to make a single editable cell in alv grid using function module, i mean to say
with out using object oriented programming.
Regards,
PrakashHi,
Using ALV List display it is possible.
Try this.
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.
data lv_repid type sy-repid.
lv_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = lv_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 = 'AAA'.
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 = 'BBB'.
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 -
IE Script error when double clicking on a view in Abap Webdynpro component
Hello experts,
I am running mini SAP trial version 2004 with Internet explorer 7.0 and also installed gui patch 23.
I am making a sample application in SE80 and when double clicking on a view in Abap Webdynpro component I get following error:
<b>Internet Explorer Script Error</b>
An error has occured in the script on this page.
Line: 1
Char: 1
Error: 'wdp_show_menu' is undefined
Code: 0
URL: http://satellite5200:8000/sap/bc/wdvd/painting.html?_vdrespkey=EOJ6V1JQMX0VLTQ7AP6DQM64Y&_vdframe=painting&sap-client=000
Do you want to continue running scripts on this page?
Thanks in advance.
BhupendraHi Bhupendra,
If you are seeing this error in the Se 80 editor , i guess you can ignoire that ...While running the application it will not show any error.
Thanks
Anzy -
Error when double clicking any field in Alv grid
Hi All,
I have created a custom container. To that custom container I am displaying an alv grid with all editable fields using oops concept.
Hence when I am double clicking on any on the field of the table I am getting a dump " an exception condition ERROR raised in CL_GUI_ALV_GRID_BASE in method SET_DRAG_DROP_ROWS".
Kindly helpHi,
Check the PF-STATUS. It seems that you have assigned F6 shortcut key for some event.
Remove the F6 assignment & activate the pf-status.
Best regards,
Prashant -
Error when double clicking a timeline clip
Hello,
I'm editing a movie on the latest and legal version of Mac's Premiere Pro CC. I began working on various projects and some days ago I merged them into one. Now, when I double click a timeline clip to preview or modify the in/out point of it an issue closes the software.
Message: Sorry, a serious error has occurred that requires Adobe Premiere Pro to shut down. We will attempt to save your current project.
If I double click the same clip in the project window the preview works without problems.
Everything was working perfectly on the independent projects. I have done that thousand times by importing various projects into one and it have always worked well.
I'm working with Apple ProRes files.
Thnks for your time!First thing to try is clearing the preferences: with Premiere closed, go to Documents/Adobe/Premiere Pro/8.0 and rename the folder "Profile-<username>." Launch PPro and see if the crash still happens. It's kind of a generic troubleshooting step, but a good place to start.
Also, go to File>Project Settings>General and check the Renderer setting. If it's set to use GPU acceleration, set it to Software Only. [Given that your graphics card has only 1/4GB of RAM, GPU acceleration should not even be available as an option. But given some recent changes, it's worth double-checking.] -
Operation System: Windows 8 Pro
System Type: 64-bit Operating System
Office: MS Office Professional Plus 2013
I am getting "The attempted operation failed. An object could not be found" error when I double click on an .ics file to an appointment to my calender. My outlook.com account's data file is set as default and this error only occurs if
that is the default data file. I thought that maybe my profile is corrupted. So, I opened up a new profile with the below steps and only add my outlook.com account there:
1-) Open up the Control Panel and go to Mail section
2-) Click "Show Profiles"
3-) Click "Add" and give a name to your profile.
4-) Configure your outlook.com account (with Auto Account setup, not manual steps)
5-) Finally, set that profile to be used always.
Then, I opened up the Outlook 2013 and clicked on the .ics file to add that appointment but got the same error.
Is this a known issue or specific to me?
Thanks!yes, I have the same problem.
The workaround of saving the ICS file and then importing it into the current calendar
works,
but the ICS calendar
displays in other section, NOT in the section of my old events.
why ?? -
Hi,
I'm developing an application where I'm using a datagrid that shows some information from an xml. Every cell in the grid is of the form
<itemRenderer>
<compoment>
<Vbox>
<HBox>
<Text/> //some text goes within this block
<Text/> //some text goes within this block
<Text/> //some text goes within this block
</Hbox>
</VBox>
</component>
</itemRenderer>
I have set a function call for the datagrid on ItemDoubleClick event; and this even gets triggered only when i double click on any TEXT that is on the cell; and NOT on any part of the cell. However, I would like to have this triggered when the user clicks anywhere in the cell.
Sombody please help,
Thanks!!Hi,
Thanks for the suggestion. Maybe I wasn't clear in explaining the issue here. Let me throw some light now, My code is somewhat like this
<mx:VBox opaqueBackground="{myxml.@data>10 ? '0xA2FEA2' : '0xFEA2A2' }" width="100%" height="100%" verticalScrollPolicy="off">
<mx:Box width="100%" height="100%">
<mx:Text id="txt1" text="Available" width="100%"/>
<mx:Text id="txt2" text="{myxml.@data}"/>
</mx:Box>
</mx:VBox>
The output is shown in the attachment. Now whenever I double click on the text in the datagrid(highlighted in blue in the attachment) my doubleclick even is fired; but if i click anywhere in the cell(green region in the attachment) my doubleclick event is not called.
Hope this helps! Looking forward for your assistance,
Thanks again!!
Cheers -
Error when double click on menus
Hi All,
We have an application in which we have menus, which makes a taskflow call upon clicking.Sometimes when a menu item is double clicked or another menu item is clicked before the first clicked menu launches I get the following error and requires the WLS managed server to be restarted. We are using Jdeveloper 11.1.1.3
Error 500--Internal Server Error
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
Any ideas/suggestions would be helpful
Thanks,
Swathi PatnamHi Swathi Patnam,
Just try to display a glasspane once the user clicks a button or any request submission.
U can have detail sample (027. Showing a glasspane and splash screen for long running queries) done by Frank in ADF Code Corner
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html
So u can restrict the user by further clicks or submission
Regards,
Suganth.G -
Error when double clicking rdf file?
I'm using Reports 10g R2 on Windows XP Pro SP2. When I try to double click on a report file (ANMSC.rdf) the Report Builder starts, but doesn't open the report file. I get the following error:
Windows cannot find D:\ANMSC.rdf. Make sure you typedthe name correctly, and then try again. To search for a file, click the Start button, and then click Search.
Also, report files have a generic icon instead of the Oracle Reports icon.
Does anyone know why Oracle Reports can't open the file when double clicking?I'm using Reports 9i and the same happens.
-
Value of the previous cell when I double click a cell in ALV Grid.
Hi !
Suppose I have an internal table GT_ITAB and I use ALV Grid to print it on the screen. The colums are as below:
Invoice No Invoice Data Customer No Amount
90001231 15.01.2009 100024 5
Customer No Fields is Hot Spot and when I click it uses Call Transaction 'FD10N' and Skip First Screen.
But the Problem is that :
Callback subroutine that is defined for "i_callback_user_command" receives the input and
p_selfield type slis_selfield structure has the value by means of p_selfield-value.
Problem : How can I get also the value of Invoice Data Cell. I need "15.01.2009" to set the Year field of FD10n.
I know that it is possible because SAP has examples of it.
Please advice.
Erkan VAROL.Hi ,
In teh structure slis_selfield there is a field tabindex , you can get the index of the record selected from this field and use this to read the internal table being displayed in the alv to get the entrired row.
Regards
Arun -
Double click functionality in Webdynpro ABAP ALV
Hello!
I have web dynpro application with ALV Table.
I need to reproduce the standard R/3 functionality: after the double clicking on the table row the new window with content of that row's fields should appear in the form layout .
For example, such functionality we have in the RSDMD transaction.
So I have two questions:
1. How to catch double click in the alv table of the Web dynpro application;
2. How to represent information from the alv table row in the form layout?
Could you please help me?
Thanks,
MariyaHi Maria,
Say suppose I am displaying the information from SFLIGHT in an ALV format & when I click on any 1 row's CARRID I would like to fetch the corresponding BOOKING details for that particular combination of CARRID, CONNID & FLDATE then I can proceed as follows:
1) Make the CARRID cell of your ALV to appear as an LinkToAction
2) Create an event handler for the ON_CLICK event of the ALV & within this event handler fetch the information about the row's CARRID, CONNID & FLDATE. Call a popup window and display the corresponding information in this row.
Below is the code to make your CARRID field as an LinkToAction:
METHOD wddomodifyview .
wd_this->build_alv( ).
ENDMETHOD.
METHOD build_alv .
DATA:
lr_alv_usage TYPE REF TO if_wd_component_usage,
lr_if_controller TYPE REF TO iwci_salv_wd_table,
lr_config TYPE REF TO cl_salv_wd_config_table,
lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lt_columns TYPE salv_wd_t_column_ref,
lr_link TYPE REF TO cl_salv_wd_uie_link_to_action,
lr_checkbox TYPE REF TO cl_salv_wd_uie_checkbox,
lr_image TYPE REF TO cl_salv_wd_uie_image.
FIELD-SYMBOLS
<fs_column> LIKE LINE OF lt_columns.
* Instantiate the ALV Component
lr_alv_usage = wd_this->wd_cpuse_alv( ).
IF lr_alv_usage->has_active_component( ) IS INITIAL.
lr_alv_usage->create_component( ).
ENDIF.
* Get reference to model
lr_if_controller = wd_this->wd_cpifc_alv( ).
lr_config = lr_if_controller->get_model( ).
* Set the UI elements.
lr_column_settings ?= lr_config.
lt_columns = lr_column_settings->get_columns( ).
LOOP AT lt_columns ASSIGNING <fs_column>.
if <fs_column>-id = 'CARRID'.
CREATE OBJECT lr_link.
lr_link->set_text_fieldname( <fs_column>-id ).
<fs_column>-r_column->set_cell_editor( lr_link ).
ENDif.
ENDLOOP.
ENDMETHOD.
Maybe you are looking for
-
My mail in iCloud is taking a very long time to load messages. ICloud loads but when I click on a message it takes up to a minute to bring the message up. Any ideas?
-
Can't launch itunes due to the following error; The procedure entry point AVCFPlayerAppliesMediaSelectionCriteriaKey could not be located in the dynamic link library AVFoundationCF.dll.
-
How to play HLS stream in flex
i aim to create a flex mobile application for iOS platform,which will play videos of streaming form. as i kown,only Http Live Streaming(HLS) is supported on iOS, then how to realize the playball of video of HLS form? if i have a valid m3u8 playlist u
-
How can i print lists from the reminder app
Does anybody know how to print lists from the Reminder app ?
-
How does call library / .dll file work?
I'm helping someone troubleshoot their machine / LabVIEW program. I'm fairly new to LabVIEW, and I'm not sure what part of the program is doing. I've attached the .vi in question. In the middle of the page there is a sub.vi with a blank icon with