on 11-07-2014 11:57 AM
Hi,
if you are using an SALV_WD_TABLE:
you can use a "button" cell_editor of type CL_SALV_WD_UIE_A_BUTTON in your ALV-conbfiguration method.
if you are using a standard table, just add an "Button"-Cell editor to your column:
(There is already a button added to column TABLE_EINRI.)
After that you have to create an onaction-method for your button and assign it to your button cell-editor. Using the wdevent parameter of the onaction method you can identify in which row the button has been clicked.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
here I place a button inside the cell - and the VALUE of the cell is the button text
here is some code
define create_button.
create object lr_button.
lr_button->set_text_fieldname( <col>-id ).
lr_button->set_image_source_fieldname( 'IMAGE' ).
lr_button->set_width( '47' ).
<col>-r_column->set_cell_editor( lr_button ).
free lr_button.
end-of-definition.
lr_col_header->set_ddic_binding_field( if_salv_wd_c_ddic_binding=>ddic_bind_none ).
case <col>-id.
when 'SEQNR'.
lr_col_header->set_text( 'Item' ).
lr_column->set_position( 1 ).
lr_column->set_width( '55' ).
lr_column->set_h_align( cl_wd_table_column=>e_h_align-forced_left ).
create_button.
" here is the result (when the button is clicked an action is performed - uploads a file)
As Christopher said. Thats not possible. You've got to remove the former cell-editor (it should be an InputField) and then add a new Button-Cell-Editor to the column. As Button-Text you can bind the value (it is the same context-attribute which was bound to your InputFields value). Thus you will have a button with "2.0" as Button text according to your example.
why don't you try it on your own? It does not help anything when you paste copy, you Need to use your brain!
I wasn't in scn the last years, but it seems that 90% of post are "post the code, give me exact instruction" and so on. But nobody wants to LEARN those things, to expirement and to find out, everybody wants to copy&paste
Hi Christoper,
On the Same topic of making the field Editable , Changing the values from the old to new value using Change Log Method & making Button, Value in same field ...
I have been trying this stuff for past 1 month and on different aspects i'm trying to achieve my Applications ...
U can refer the same from my previous Posts ...
Its not that Copy , Paste of code and we need base to know and learn things ...
Regards,
Karthik S
Then take the time and learn those Basic Things. There are lot's of how to guides where all your Topics are explained. Most questions are answered several times before, just use the search.
People like Ismail makes it so easy for you but it seems that your only waiting for the right code for copying.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.