Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to make selected row of normal table as editable in webdynpro abap

hi all,

How to make a row of a normal table as editable on click of a button action.

i have a requirment like i m displaying 10 records in a table onselect event i m geting selected row index. after that when i click on change button the selected row should come in editable mode to allow user to change data.

i refered the link: http://scn.sap.com/thread/1055753

select * from sflight

  into corresponding fields of table it_flights up to 100 rows.

loop at it_flights into ls_flights .

if ls_flights-price = '185.00'.

    ls_flights-readonly = abap_true.

else.

     ls_flights-readonly = abap_false.

endif.

append ls_flights to it_final.

endloop.

data: obj_table type ref to cl_wd_table,

      lr_column type ref to cl_wd_table_column,

      lr_column1 type ref to cl_wd_table_column,

      lr_input type ref to cl_wd_input_field,

      lr_input1 type ref to cl_wd_input_field.

obj_table ?= view->get_element( 'TABLE1' ). HERE ITSELF ITS GOING FOR DUMP AS NULL VALUE REFERENCE ERROR  I GAVE TABLE1 AS ID.

obj_table->set_visible_row_count( value = 50  ).

lr_column = obj_table->get_column(

               id         = 'TABLE1_PRICE'

*              INDEX      = INDEX

                 ).

lr_input = cl_wd_input_field=>new_input_field(

      bind_value          = 'FLIGHTS.PRICE'

      id                  = 'IP1'

        ).

  lr_input->set_read_only( value = abap_false   ).

lr_input->bind_read_only( path = 'FLIGHTS.READONLY'   ).

*Path means your nodename.attribute name

lr_column->set_table_cell_editor( the_table_cell_editor = lr_input  ).

Can any one help me in this issue or is there any other way to achieve this requirement?

Regards,

Santhosh

Tags:
Former Member
replied

Hi,

Refer to this document which I created jus now   http://scn.sap.com/docs/DOC-27125

Hope this helps u.,

Thanks & Regards,

Kiran

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question