on 11-04-2010 9:32 AM
HI,
I have a requirment like in my ALV display one column has hyperlink. Now if you have records in a row thn it will show as a hyperlink. If not then the row will be blank and open for input.
In class CL_SALV_WD_UIE_LINK_TO_ACTION i have method SET_ENABLED_FIELDNAME. But no method to make editable.
Is it possible and how? Waiting for your valuable comments.
Thanks guys for ur replies, i have done it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi, MonishankarC.
To your requirement, i suggest you use Cell_variant for your ALV, just like the normal TABLE.
I.e: when there is data for the record, you should use "Link_to_action" as the celll-editor which the cell_variant "L2A"(link to action) has.This point, you have already said...When no data, you should use "cl_salv_wd_uie_input_field" as your cell editor"IPT"(input field) which the cell_variant has..
Then, you can set the ALV column has different cell variant correspondingly.
l
* access column settings
lr_column_settings ?= l_value.
lt_columns = lr_column_settings->get_columns( ).
LOOP AT lt_columns INTO ls_column.
"here, cell variant can be set on condition, which you can manipulate.."L2A" or "IPT"
s_column-r_column->set_sel_cell_variant_fieldname( 'CELLVARIANT' ).
endloop.
I don't know whether i am clear or fit your requirement.
Hope it can help u a little.
Best wishes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DATA lr_lta type ref to cl_salv_wd_uie_link_to_action.
DATA lt_columns type salv_wd_t_column_ref,
field-symbols:
<wa_colum> type salv_wd_s_column_ref.
lt_columns = l_table->if_salv_wd_column_settings~get_columns( ).
loop at lt_columns[] assigning <wa_colum>.
case <wa_colum>-id.
when 'Column id here'.
create object lr_lta.
lr_lta->set_text_fieldname('Give a fieldname from context binding' ).
lr_lta->set_tooltip_fieldname( 'Give a fieldname from context binding' ).
lr_lta->set_type( cl_wd_link_to_action=>e_type-navigation ).
<wa_colum>-r_column->set_cell_editor( lr_lta ).
free lr_lta.
when others.
ENDLOOP.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.