cancel
Showing results for 
Search instead for 
Did you mean: 

how to fetch the modified data from an alv table

Former Member
0 Kudos

Hi All,

I am having an Alv table that displays the data from the database with all fields editable. When i insert some row in any row or modify any exisiting data, my code should fetch the data that is new and modified. Can anyone help me in solving this issue please.

Accepted Solutions (1)

Accepted Solutions (1)

vineetrrakesh
Explorer
0 Kudos

HI,

You can implement "ON_DATA_CHECK" event of ALV for all such actions form ALV, e.g. Insert Row, Delete Row, Modify Celll, etc.

The vent will pass a parameter "R_PARAM" which is of Type "IF_SALV_WD_TABLE_DATA_CHECK".

You can read the attributes from this as r_param->t_deleted_rows, r_param->t_inserted_rows, r_param->t_modified_cells etc.

and performk you action accordingly. This will avoid you using the whole data and find which one was changed.

Hope this helps you.

Regards

Vineet

Answers (1)

Answers (1)

ashish_shah
Contributor
0 Kudos

Hi,

You need to view ALV a normal ABAP WebDynpro Table.

YOu can read this data by reading the node bound to ALV.

read the entire node as a table and do the processing that you want to do.

Regards,

Ashish Shah

Former Member
0 Kudos

reading through node will fetch all the data in the table and it is a long process do i have anything like where i can read only the new row i updated.

Former Member
0 Kudos

Hi vadiv,

You modify your data in alv or add new row and write some data in it the select the particular entry. Now in your coding just fetch the node with out as a table operation , you will get details only about the selected entry.

Regards,

Monishankar C

ashish_shah
Contributor
0 Kudos

you can read a node as a table using this method in wizard.

 
DATA lo_nd_<node name> TYPE REF TO if_wd_context_node.

 DATA lt_<node name> TYPE wd_this->elements_<node name> .

* navigate from <CONTEXT>  to <<NODE NAME> >  via lead selection
  lo_nd_<node name> = wd_context->get_child_node( name = wd_this->wdctx_<node name> ).

* @TODO handle non existant child
* IF lo_nd_<node name> IS INITIAL.
* ENDIF.

  lo_nd_<node name>->get_static_attributes_table( IMPORTING table = lt_<node name> ). 

If you need to fetch only one element , which is a lead selected element then let me know i can help for that.

Regards,

Ashish Shah