Hi Experts,
Here the user will give billtypes &click on submit button then I need to display one interactive alv grid by using webdynpro alv...While displaying, the data alignment in each cell should be in centre.Only the column names(labels) are comming in centre not data,if i use that input field as hyperlink then that cell data is coming in centre but client dont want all the fields on the grid are not as hyperlink....
Iam using the below code....
WHEN 'BELNR'.
ls_columns-r_column->set_visible(
EXPORTING
value = cl_wd_uielement=>e_visible-visible ).
ls_columns-r_column->set_position(
EXPORTING
value = 1 ).
CREATE OBJECT lo_input
EXPORTING
value_fieldname = ls_columns-id.
lo_input->set_read_only( abap_true ).
lo_alv_uie = lo_input.
lo_column->set_cell_editor( lo_alv_uie ).
lo_header->set_text( 'Bill number' ).
lo_column->set_width( '15' ).
lo_column->set_resizable( abap_true ).
CALL METHOD LO_COLUMN->SET_H_ALIGN **for data alignment in centre
EXPORTING
VALUE = CL_WD_TABLE_COLUMN=>E_H_ALIGN-CENTER
*** link_to_action ***
DATA link_act TYPE REF TO cl_salv_wd_uie_link_to_action.
CREATE OBJECT link_act.
link_act->set_text_fieldname( ls_columns-id ).
ls_columns-r_column->set_cell_editor( link_act ).
lo_alv_uie = link_act.
lo_column->set_cell_editor( link_act ).
WHEN 'BUDAT'.
ls_columns-r_column->set_visible(
EXPORTING
value = cl_wd_uielement=>e_visible-visible ).
ls_columns-r_column->set_position(
EXPORTING
value = 2 ).
CREATE OBJECT lo_input
EXPORTING
value_fieldname = ls_columns-id.
lo_input->set_read_only( abap_true ).
lo_alv_uie = lo_input.
lo_column->set_cell_editor( lo_alv_uie ).
lo_header->set_text( 'Bill Date' ).
lo_column->set_width( '15' ).
lo_column->set_resizable( abap_true ).
CALL METHOD LO_COLUMN->SET_H_ALIGN
EXPORTING
VALUE = CL_WD_TABLE_COLUMN=>E_H_ALIGN-CENTER.
*** link_to_action ***
* DATA link_act TYPE REF TO cl_salv_wd_uie_link_to_action.
CREATE OBJECT link_act.
link_act->set_text_fieldname( ls_columns-id ).
* ls_columns-r_column->set_cell_editor( link_act ).
* lo_alv_uie = link_act.
lo_column->set_cell_editor( link_act ).
But user dont want 2nd column as hyper link if i remove functionaity of
cl_salv_wd_uie_link_to_action then data of the date field not in centre it comes as remaining
fields...
please anyone could u suggest the soltution is graetly appreciated...thanks
Regards,
kranthi