cancel
Showing results for 
Search instead for 
Did you mean: 

get the deleted row from ALV WebDynpro

Former Member
0 Kudos

Hi,

I need to capture the deleted Line item when we use Delete funtion in ALV .Where i am using on_data_check i am getting the index but when i get the component value that time it has been already deleted.So any body help me getting a sample code to get the deleted line item in ALV (When press on Delete button in ALV).

Regards,

Amit

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Closed

Former Member
0 Kudos

Hi,

Thanks for the reply i have already cheked this thread but not understand clearly, I am getting dump when I use Assign statement.

DATA: x_delete_row LIKE LINE OF r_param->t_deleted_rows.

TYPES t_proj_constr TYPE <Ztable>

FIELD-SYMBOLS: <fs_row> TYPE t_proj_constr.

IF wd_comp_controller->ya_optyp = 'DELETE'. ' this stament is also not clear for me

LOOP AT r_param->t_deleted_rows INTO x_delete_row.

"x_addr_factr ?= x_delete_row-r_value.

ASSIGN x_delete_row-r_value->* TO <fs_row>.

DELETE FROM ycot_proj_constr WHERE plant = <fs_row>-plant

AND yr_nbr = <fs_row>-yr_nbr

AND period = <fs_row>-period

AND billback_pr_fmly = <fs_row>-billback_pr_fmly

AND prd_nm = <fs_row>-prd_nm.

ENDLOOP.

Regards

Amit

Former Member
0 Kudos

Hello Amit,

I guess the stmt ' IF wd_comp_controller->ya_optyp = 'DELETE' ' is not necessary here.

Please have a look at the following implementation of event handler for on_data_check.


  FIELD-SYMBOLS <deleted_row> LIKE LINE OF r_param->t_deleted_rows.

  DATA isflight TYPE REF TO ig_componentcontroller=>element_node_flighttab.

  LOOP AT r_param->t_deleted_rows ASSIGNING <deleted_row>.

    isflight ?= <deleted_row>-r_value.

  ENDLOOP.

t_deleted_rows will have all deleted rows and the type of each row would be the structure type of the context node which is mapped to alv table.

so in the above code, isflight is a reference to the element of context node which is mapped to alv table.

Hope this will help!

Regards,

Srilatha

Former Member
0 Kudos

Hello,

In the event handler for ALV event ONDATA_CHECK, you will be getting a structure called t_param.

It contains an element called t_deleted rows.

Please refer to the following thread:

Link:[;

Regards,

Srilatha