cancel
Showing results for 
Search instead for 
Did you mean: 

ALV - capturing the modified rows

Former Member
0 Kudos

Hi Experts,

I have an alv table with one column 'CHARG' as editable. User can enter the value of charg in as many rows as they wish to. say they can enter the value of charg in row number 3,5 and 10. So I want to run my update bapi for these changed rows only. The problem is how can I know that how many rows and which rows have been changed by the user so that i can run my bapi precisely for those rows?

Thanks,

Gaurav

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kumar ,

you can make use of the piece of code for your refference .

DATA: lr_context TYPE REF TO if_wd_context,
      lt_changes TYPE wdr_context_change_list,
      lt_changes = lr_context->get_context_change_log( ).
      delete lt_changes where CHANGE_KIND <> 'Your condition'.

hope it will help you

Regards,

Chinnaiya P

Former Member
0 Kudos

Hi,

Thanks. Its solved.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

you can use method element->IS_CHANGED_BY_CLIENT( ) = 'X' of context element or use context change log as is described above.

Regards Jiri

Former Member
0 Kudos

Hi Kumar ,

you can get the changed attributes of the context change log.

Pls refer the below link .

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/a8e5d273b12fe2e10000000a42189d/content.htm

Regards

chinnaiya P