Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Delete the multiple rows of the output list

Former Member
0 Kudos
642

I have an ALV report using Function module.

Now my requirement is to select multiple rows of the output list screen and then delete the rows after clicking the DELETE icon in my Toolbar.

My question is how do you know which row or rows are selected in ALV using FM.

Please tell me how we can delete multiple rows of the output list using Function module and which function module is going to suitable for this requirement.

Regards,

Uday

1 ACCEPTED SOLUTION

Former Member
0 Kudos
224

Hi,

We have a Standard program which is provided by SAP... have a look at BCALV_EDIT_04

Regards

Sudheer

5 REPLIES 5

Former Member
0 Kudos
225

Hi,

We have a Standard program which is provided by SAP... have a look at BCALV_EDIT_04

Regards

Sudheer

0 Kudos
224

Thanks. But what i m expecting is using Function module not like using classes and Methods.

Please help some one hpw we can do it using FM.

Regards,

Uday

0 Kudos
224

Thanks. But what i m expecting is using Function module not like using classes and Methods.

Please help some one hpw we can do it using FM.

Regards,

Uday

Former Member
0 Kudos
224

hi

one way of deleting duplicates is

sort < final table > by <some field>

delete adjacent duplicated form table <final>.

do this before passing it to FM

other way is to place check boxes before the fields and check them.....

former_member200338
Active Contributor
0 Kudos
224

Hi uday,

in the user command of the ALV, for the button delete do the following.

data: l_index type sy-tabix.

case sy-ucomm.

when 'DEL'.

loop at gt_output into gs_output where sel eq 'X'.

l_index = sy-tabix.

delete gt_output from gs_output index l_index.

endloop.

endcase.

The GT_output is the output internal table in ALV. it structure may be like this.

types: begin of ty_output,

sel type c,

vbeln type vbeln,

posnr type posnr,

end of ty_output.

Regards,

Niyaz

<b>* Reward point oif usefull*</b>