‎2019 May 21 11:25 AM
i want to modify table with user input data in a selected field. How to achieve this ?
FIELD-SYMBOLS:
<i_itab> TYPE table,
<wa_tab> TYPE ANY,
<w_field> TYPE ANY.
CREATE DATA i_table TYPE TABLE OF (viewname).
ASSIGN i_table->* TO <i_itab>.
ASSIGN wa_all->* TO <wa_tab>.
ASSIGN wa_all->* to <w_field>.
what would i can right next code to modify the row? it should modify only the entered field others should not change.
-thanks for your help!
‎2019 May 21 1:13 PM
If I understand you correctly - you have some input fields and you only want to apply those input fields data to your dynamic table ?
You will have to iterate over the input fields - so assuming you have some kind of field catalog ( eg based upon a struct info )
Pseudo code:
loop at lt_input_field_catalog assigning field-symbol<fs_fc_info>.
assign component <fs_fc_info>-x of structure <wa_input_data_line> to field-symbol(<fs_field_input>).
check (sy-subrc eq 0).
assign component <fs_fc_info>-x of structure <wa_tab> to field-symbol(<fs_field_target>).
check (sy-subrc eq 0).
<fs_field_target> = <fs_field_source>.
endloop.