Skip to Content
Dec 18, 2018 at 05:27 AM

How to update data of particular field in data base table by using alv report


Hii... I have a requirement.. In alv report I'm using knal table.. So Iam keeping an edit option to name1 field by using field catalog and Check box for each record as well.. Once of If I check the checkbox and if changing the name1 on runtime that should be updated in database table.. I have used below code.. But the name1 is not updated in database kindly suggest with the code.

Form user command using r_ucomm type sy-ucom selfield type slis_selfield

Loop at it_kna1 into wa_kna1.

Read table it_kna1 into wa_kna1 index selfield-tab index.

If sy-subrc=0.

Update kna1 set name1=wa_kna1-name1 where kunnr = wa_kna1-kunnr.