Make a particular row editable in ALVgrid oo
hi all,
i have a hotspot in my alv,when hotspot click haapen the particular row should b changed to editable, i have done till the hotspotclick event and the particular row could be poppulated , how it can be changed to editable on that particular row....
thanks
Hi,
In order to make a row editable, it is required to implement an event handler class. It is required to implement the following events:
CLASS lcl_event_handler DEFINITION .
PUBLIC SECTION .
METHODS:
*--Controlling data changes when ALV Grid is editable
handle_data_changed
FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed
*--To be triggered after data changing is finished
handle_data_changed_finished
FOR EVENT data_changed_finished OF cl_gui_alv_grid
IMPORTING e_modified
ENDCLASS.
CLASS lcl_event_handler IMPLEMENTATION .
*--Handle Data Changed
METHOD handle_data_changed .
PERFORM handle_data_changed USING er_data_changed .
ENDMETHOD.
*--Handle Data Changed Finished
METHOD handle_data_changed_finished .
PERFORM handle_data_changed_finished USING e_modified .
ENDMETHOD .
ENDCLASS .
DATA gr_event_handler TYPE REF TO lcl_event_handler .
*--Creating an instance for the event handler
CREATE OBJECT gr_event_handler .
SET HANDLER gr_event_handler->handle_data_changed FOR gr_alvgrid .
SET HANDLER gr_event_handler->handle_data_changed_finished
FOR gr_alvgrid .
Please search the forum: You will get a lot examples
Regards,
Tanmoy
Edited by: Tanmoy Mondal on Aug 5, 2011 1:45 PM
Similar Messages
-
How to make a particular row and column field editable in ALV
Hi Experts,
I have a requirement to make a particular row and column field editable in ALV output. Like i need to make 2nd row - 4th column editable of ALV output.
Kindly help me out to solve this.
Any help would be appreciated.
Thanks,
AshutoshHi Ashutosh,
please check below, explained by some experts.
In the below link editing two columns MOD_RANK and TECH_RANK.
These two columns will be in edit mode once after selecting the required record
Editing single cell in a row of ALV table
And also look for more info
http://scn.sap.com/thread/884976 -
How to make a particular field editable in a Form/Empty View
Hi All,
I want make a particular field editable in a Form View. Means i have 5 fields in the Form View and out of 5 fields i want to make one field editable or input field. Can you plz tell me how to do that?
thanks & regards
MadhusudanHi,
You can achieve the same by two methords.
1) Goto configuration of the view in which you want to make fields editable/ non editable. Click on your field. Click on field properties. On the menu you can click on Display only. It will make your field non editable. If you remove the check, it will be editable.
2) Goto Get_I_fieldname methord of your field. There write code rv_disable= 'FALSE'. Field will become editable. rv_disable= 'TRUE' will make field non editable.
Best regards
Pankaj Kumar -
How to make all the rows editable in webdynpro alv output
Hi,
How to make all the rows editable in webdynpro alv output.
Thanks
RaksharHi Rakshar,
Check this wiki:
http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoeditconditionallyrowofaALVtableinWebDynprofor+ABAP
Regards -
Making particular rows as non editable before displaying the TABLE
Hi everyone,
I would like to know how to make a particular rows as non editable in UI element "TABLE" before it is displayed . The scenario is :
On entering the Personnel number, I am getting family dependants in the table. Then, I am selecting any of the family members on some condition and saving each member with the request.
Next time when i enter the same personnel number, I would like to show the table with already saved request for the family members rows as non editable & other members row as editable.????
Please provide a feasible solution.Hi Pradeep,
follow as per suggested. if not work use cell variants concept. it will work.
Please check this wiki...
http://wiki.sdn.sap.com/wiki/display/WDABAP/WebDynproforABAPCellVariants
Cheers,
Kris. -
TO MAKE SINGLE ROW EDITABLE IN WEBDYNPRO ABAP
HI
I WANT TO MAKE A SINGLE ROW EDITABLE IN MY TABLE CONTROL IS IT POSSIBLE?
IF YES THEN HOW?
I KNOW ABOUT READ ONLY FIELDS BUT I DO NOT KNOW HOW TO UTILIZE ITHi Rajan,
Which particular row of the table do you want to set as editable? That would be important for formulating the way in which you should code.
Suppose you are displaying the data of MARA using a table and want to make editable only rows in which the unit of measurement is equal to "CCM" then you can proceed as below.
Create a context node (say MARA) with desired fields as attributes. (Cardinality 0..n, Selection 0..1, Initialize lead selection) In addition create an attribute (say READONLY) of type WDY_BOOLEAN under the same node (MARA) which you are using for binding to the table.
First of all take all the cell editors of the table as type, "InputField" to make the entire table as editable. Then go to the each cell editor (TABLE_MATNR_EDITOR, TABLE_ERSDA_EDITOR,...) and bind the readOnly property of the cell to the attribute created earlier. (READONLY)
Below is the coding in WDDOINIT through which you set the desired functionality
METHOD wddoinit .
DATA: lv_node TYPE REF TO if_wd_context_node,
lt_mara TYPE ig_componentcontroller=>elements_mara,
wa_mara TYPE ig_componentcontroller=>element_mara.
SELECT matnr
ersda
ernam
mtart
matkl
meins FROM mara INTO CORRESPONDING FIELDS OF TABLE lt_mara
WHERE meins = 'GM' OR meins = 'CCM'.
SORT lt_mara BY meins.
lv_node = wd_context->get_child_node( name = wd_this->wdctx_mara ).
LOOP AT lt_mara INTO wa_mara.
IF wa_mara-meins = 'GM'.
wa_mara-readonly = 'X'.
ELSE.
wa_mara-readonly = ' '.
ENDIF.
MODIFY lt_mara FROM wa_mara TRANSPORTING readonly.
ENDLOOP.
lv_node->bind_table( new_items = lt_mara ).
ENDMETHOD.
Regards,
Uday -
Make the jtable column editable
Hi,
I want to make the table column editable,that like double click on an editable table cell,and edit it directly.
How to solve it?hi!
if you want to make any particular column editable you may have to do something like this
TableModel dataModel = new AbstractTableModel() {
public int getColumnCount() { return names.length; }
public int getRowCount() { return data.length;}
public Object getValueAt(int row, int col) {return data[row][col];}
public String getColumnName(int column) {return names[column];}
public Class getColumnClass(int c) {return getValueAt(0, c).getClass();}
public boolean isCellEditable(int row, int col) {return col != 5;}
public void setValueAt(Object aValue, int row, int column) { data[row][column] = aValue; }
}; the isCellEditable(row, col) is importantin your case.
i hope it may help you
:) -
How to make Double Click To Edit work instead of ClickToEdit for Af:Table
Hi All,
We use AF:Table in clickToEdit mode and most of the time the users use this table for selecting a master record then work on the detail records. To avoid the cost of rendering the selected row as editable we would like to change the behavior to Double Click To edit. This way the user can intentionally put the selected row in edit mode when needed. What would be the best approach to achieve this ?
We use 11.1.1.6 and ADF BC.
ThanksNot sure if you can get it to work in 11.1.1.6.0 as you don't have the ActiveRowKey property which can be used to make a table row editable. The property comes with 11gr2.
What you can try is to set the tabel to clicktoedit, add a clientListener which you use to listen to the click event and then cancel the event. Add another clientListener whihc handles the doubleClick event, make the clicked row the current row (see http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf) and, well now comes the problem, make the current row editable. I don't know how to do this without the ActiveRowKey property.
One other possible solution is a trick described here http://dstas.blogspot.com/2010/08/press-edit-button-to-make-table-row.html
here a transient attribute is used to manipulate the isEditable() status of an attribute of the VO. This should do the trick, but is much more work.
May be someone else knows a better solution.
Timo -
SINGLE ROW EDITABLE in REUSE_ALV_GRID_DISPLAY
Hi Experts,
I have a requirement in which i need to make a single row editable in ALV . Can u please tell me the procedure to make a single row editable using REUSE_ALV_GRID_DISPLAY.
<<removed by moderator>>
Thanks,
ShrikanthHi Sree,
There are many codes available on net do spend some time to search i have shown one sample code copy paste and execute and according to your issue you make the modifications.
You can see Net price will be in editable mode.
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
Cheers!!
VEnk@ -
Is there a way to make the current row not editable
Hi, I'm using JDev 11.1.1.2
In my usecase I have a Form , navigateable with next/previous , and for every row a I have a calculation which makes the row editable or not.
For now I made it with disabled property on every input component set to some bean property which is calculated every time.
My question is if there is some general way to make an Entity not updateable ?
I tried with doDML() ... but the problem there is that this method is not called when switching the current row but rather when commiting. So the user can modified several rows and when pressing commit it will prevent some of the to be committed which would be confusing.
Is there a method in the ViewObject that i can overwrite which is called every time the current row is changed? So I can see if the row was modified or not.
Thanks, agruevYes, there is always isAttributeUpdateable() in the ViewRowImpl, which you can override and enable/disable your attributes based on an enabling/disabling condition.
Here is an example:
public boolean isAttributeUpdateable(int i) {
boolean updateable = false; /disable by default all arguments
// enable, if your condition is met
if ( meets_your_condition )
updateable = super.isAttributeUpdateable(i); // let the framework decide based on your declarative settings
return updateable; // return true/false indicator
Nick -
Editing a particular row in a table - Web Dynpro Abap
Hi all,
My scenario is, I have to fetch contract details from EKPO table when I enter the Purchase Document Number and press SUBMIT button on my interactive form. The details will be displayed in a table.
This part is working fine.
Then, out of the displayed rows in that table, I have to click one of the rows. This particular row should appear as a separate row below the existing table. Here I will edit certain fields and update the database.
My question is, How to display that particular row below the existing table which I select. The table will dynamically increase the row size depending on the records.Hi Surya,
You can use the index property to display the selected row data.
Suppose your form structure is like:
BodyPage
TBL_EKPO
DATA
EBELN
EBELP
LOEKZ
SF_SELECTED_ROW_DISPLAY
EBELN
EBELP
LOEKZ
Then, in any of the field's exit event you can write:
BodyPage.SF_SELECTED_ROW_DISPLAY. EBELN.rawValue = xfa.resolveNode( " BodyPage.TBL_EKPO.DATA["+ this.parent.index +"].EBELN").rawValue;
Hope this helps.
Amit -
How to edit a particular row in the table ctrl when a push button is clickd
Hi Experts,
How to edit a particular row (except the Primary keys) after selecting it in the TABLE CONTROL when a
push button is clicked in the table control.
For Eg. If you have a push button say "Modify", the particular row what we select in the table control should be in a
editable mode after clicking "Modify" Push button.
Please help me out.
Thanks in advance.Hey Ram,
Thanks a ton.
Its working fine...sorry for the late reply.
The reason behind the delay is because i had modified my code as per your logic it worked fine but the thing is that the whole column was in editable mode but not a single row.
For E.g If i want to edit a particular row, first i select the row and then click on "Modify" button. After i click on the button, the whole column gets in a editable mode including the one which i intentionally selected.
Here, the solution is that you have to set a flag in PBO so that once it is done with PBO then it need not come back again after we click on "Modify" button.
And one more query is that after you modify a particular row in the table control ( When it is in editable mode) and click on the "Save" button, it is not getting updated to database.
To update the database, we need to select the row once again after modifying it and click on the "Save" button.
Here, database is updating only when it is selected again. If it is not selected, it is not getting updated.
If you have any alternative solution, then please help me out.( I hope i am clear with the question.)
Thanks,
Ananth. -
Is it possible that a particular row of IWDTable set to non editable?
Hi All,
Is it possible that a particular row of IWDTable set to non editable on the basis of a field value ?? Plz help.Context
+ Rows (node)
+ value (integer)
+ readOnly (boolean,calculated=true)
Bind the "readOnly" property of the InputField (cell editor) to the "readOnly" attribute shown above. Implement the calculated attribute getter like
boolean getRowsReadOnly(IRowsElement element)
return element.getValue() == 42; /* or whatever */
Armin -
How to make a row editable in a click to edit table programatically?
I have a table in my page in which I can do inline addition as well as select and add addition (which will programatically add multiple rows). And my table is click to edit (there are few editable columns in the table).
So, suppose if I add a row say R1 by inline addition, then this row is coming as highlighted as well as selected (i.e editable). But now suppose I add another row R2 through Select and Add (which will open a popup table from where I can select multiple rows, and clicking on OK, I will add those rows programatically in the table VO), it is coming as highlighted but it is not coming as selected i.e now R1 is selected and editable but R2 is highlighted. (I have done setCurrentRow programatically but that is only making the row highlighted and not editable. Is there any way to make the row editable also programatically?try setEditingMode method. See if it helps.
http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10684/oracle/adf/view/rich/component/rich/data/RichTable.html#setEditingMode_java_lang_String_ -
RE:ALV grid (oops concept)-to make selected row editable
Hi,
I have an object oriented alv which is having 5 rows of data.I have a pushbutton to make any row in editable mode.My requirement is i will select any row in oops alv grid and press
the button to make the row editable.How can i do this in oops alv.
thanks,
AlexHi,
Use the Link [http://www.sapdev.co.uk/reporting/alv/alvgrid_editable.htm]
Check demo pgm BCALV_EDIT_05.
*& Report ZUS_SDN_ALVGRID_EDITABLE_8
*& Description: editable ALV -> ENTER jumps to next row
*& Dynpro flow logic: no screen elements, ok_code = GD_OKCODE
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
REPORT zus_sdn_alvgrid_editable_8.
DATA:
gd_repid TYPE syst-repid,
gd_okcode TYPE ui_func,
gt_fcat TYPE lvc_t_fcat,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid TYPE REF TO cl_gui_alv_grid.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1.
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
e_onf4
e_onf4_before
e_onf4_after
e_ucomm
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_data_changed.
define local data
cl_gui_cfw=>set_new_ok_code( 'NEXT_ROW' ). " not possible on 4.6c
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'NEXT_ROW'
IMPORTING
RC =
" Triggers PAI of dynpro with ok_code = 'NEXT_ROW'
ENDMETHOD. "handle_data_changed
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
PARAMETERS:
p_bukrs TYPE bukrs DEFAULT '2000' OBLIGATORY.
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = p_bukrs.
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.
" Triggers event DATA_CHANGED when ENTER is pushed
CALL METHOD go_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter
EXCEPTIONS
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.
SET HANDLER:
lcl_eventhandler=>handle_data_changed FOR go_grid.
Build fieldcatalog and set hotspot for field KUNNR
PERFORM build_fieldcatalog_knb1.
Display data
CALL METHOD go_grid->set_table_for_first_display
CHANGING
it_outtab = gt_knb1
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.
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.
ok-code field = GD_OKCODE
CALL SCREEN '0100'.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
SET TITLEBAR 'xxx'.
CALL METHOD go_grid1->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.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
go_grid->check_changed_data( ).
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
" NOTE: ENTER button alone works apparently only if the cursor
" is placed within the command window (left-upper corner)
WHEN 'ENTER' OR
'NEXT_ROW'.
PERFORM set_cursor_next_row.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_FIELDCATALOG_KNB1
text
--> p1 text
<-- p2 text FORM build_fieldcatalog_knb1 .
define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'KNB1'
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.
LOOP AT gt_fcat INTO ls_fcat
WHERE ( fieldname = 'ZUAWA' ).
ls_fcat-edit = abap_true.
ls_fcat-col_opt = abap_true.
MODIFY gt_fcat FROM ls_fcat.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG_KNB1
*& Form SET_CURSOR_NEXT_ROW
text
--> p1 text
<-- p2 text FORM set_cursor_next_row .
define local data
DATA:
ls_row TYPE lvc_s_row,
ls_col TYPE lvc_s_col.
CALL METHOD go_grid->get_current_cell
IMPORTING
E_ROW =
E_VALUE =
E_COL =
es_row_id = ls_row
es_col_id = ls_col
ES_ROW_NO =
ADD 1 TO ls_row-index. " next row
CALL METHOD go_grid->set_current_cell_via_id
EXPORTING
is_row_id = ls_row
is_column_id = ls_col
IS_ROW_NO =
ENDFORM. " SET_CURSOR_NEXT_ROW
HTH
Regards,
Dhruv Shah
Maybe you are looking for
-
Firefox will not start after interrupted update to 5.0
Lenovo x200 | Windows 7 32bit | Firefox 5.0 I was updating Firefox from version 3.6 (I think) to 5.0. Simultaneously I had done a update on Windows that seemed to have stopped. The update of Firefox had also come to a stop. As I remember it the insta
-
hello. How can I get current date and time in JAVA? Thanks.
-
'No Storage Location Set' - warning on a loop!
I get this message when trying to import from my Sony Camcorder: "Cannot start ingest because there is no storage location set. Please set one under Storage in Preferences and try again." In Preferences.... there is no option to set one
-
802.1X for wired environments using Radius/ACS for Dynamic Vlan Assignment
Currently Being Moderated 802.1X for wired environments using Radius/ACS for Dynamic Vlan Assignment Could someone please provide me with a simplest set of configuration steps to fire up Radius in ACS and 802.1X for dynamic vlan assignment. The obje
-
N73ME - B'day and calender options
Hello I recently purchased N73 ME phone. I feel so sorry that I was so confident of NOKIA that I did not bother to check any other phones in the market and choose NOKIA. I am rather disappointed in some functions you omitted and some you added but di