cancel
Showing results for 
Search instead for 
Did you mean: 

column in inputfield

Former Member
0 Kudos

hi

this mycode :

im biding data but i don't see on this column

if ls_master_nd-state1 = '1'.

"----


> im use for enable column

lr_column = lr_config->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN(

'G_ANZHL' ).

CREATE OBJECT lr_inputfield

EXPORTING

value_fieldname = 'G_ANZHL' .

lr_column->set_cell_editor( lr_inputfield ).

"----


" -


> im use for unable column

lr_column = lr_config->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN(

'O_ANZHL').

CREATE OBJECT LR_TEXTVIEW.

lr_column->set_cell_editor( LR_TEXTVIEW ).

ELSEIF ls_master_nd-state1 = '2'.

lr_column = lr_config->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN(

'O_ANZHL').

CREATE OBJECT lr_inputfield

EXPORTING

value_fieldname = 'O_ANZHL'.

lr_column->set_cell_editor( lr_inputfield ).

lr_column = lr_config->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN(

'G_ANZHL').

CREATE OBJECT LR_TEXTVIEW.

lr_column->set_cell_editor( LR_TEXTVIEW ).

ENDIF.

how can i see data unable mode on column ?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Mesut,

According to my understanding u want the inputfield column of the alv table to be set as non editable field . If it is so then try to use this code below .

CALL METHOD lr_input->set_enabled

  • EXPORTING

  • value = ABAP_TRUE "here according to ur requirement u can change the boolean value.

call method lr_column->set_cell_editor

exporting

value = lr_input.

lr_column type ref to cl_salv_wd_column.

lr_input type ref to cl_salv_wd_uie_input_field.

Here lr_column is the column reference and lr_input is the UI element reference

Try using this code hope it may giv u some solution.

Have a Nice Day.

Regards,

Sana.

former_member402443
Contributor
0 Kudos

Hi,

Please change your code for textview as given below.

CREATE OBJECT lr_text_view.

lr_text_view->set_text_fieldname( value = ls_column-id ).

ls_column-r_column->set_cell_editor( lr_text_view ).

Regards

Manoj Kumar

Former Member
0 Kudos

Hi,

For a text view element to display data, you will have to set the text field

LR_TEXTVIEW->set_text_fieldname( 'G_ANZHL' ).

Let em know if this doesn't work.

Regards,

Priya