Skip to Content
avatar image
Former Member

Delete the multiple rows of the output list

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 20, 2007 at 12:09 PM

    Hi,

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

    Regards

    Sudheer

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Aug 20, 2007 at 03:22 PM

    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>

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 20, 2007 at 02:14 PM

    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.....

    Add comment
    10|10000 characters needed characters exceeded