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 row in alv..

Former Member
0 Kudos

Hi All,

i want to delete a row in the alv report on the click of push button.... alv is on oops concept .. hw to do this please help me out... if possible then plz provide a piece of code to do so.

Thanks & Regards

Ashu Singh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi check this...

Assuming that you have used the class "CL_GUI_ALV_TREE", you can use the method "REFRESH_TABLE_DISPLAY" to achieve this functionality. You may do the following:

->Capture the changed values from the modal dialog box.

->Then update/insert these values in the internal table you have used while calling the method "SET_TABLE_FOR_FIRST_DISPLAY".

->Call the method "REFRESH_TABLE_DISPLAY". The tree should automatically reflect the changes.

4 REPLIES 4

former_member188685
Active Contributor
0 Kudos

Check the Program

BCALV_EDIT_04

Former Member
0 Kudos

hi check this...

Assuming that you have used the class "CL_GUI_ALV_TREE", you can use the method "REFRESH_TABLE_DISPLAY" to achieve this functionality. You may do the following:

->Capture the changed values from the modal dialog box.

->Then update/insert these values in the internal table you have used while calling the method "SET_TABLE_FOR_FIRST_DISPLAY".

->Call the method "REFRESH_TABLE_DISPLAY". The tree should automatically reflect the changes.

Former Member
0 Kudos

hiii

creating button in ALV refer following code in link using OOPS

for deleting row in ALV refer to following link using OOPS

regards

twinkal

Former Member
0 Kudos

Hi,

Fill the field catlog as shown below.

wa_fieldcat-tabname = 'I_OUTPUT'. " Variance W/O Scrap

wa_fieldcat-fieldname = 'VARIANCE'.

wa_fieldcat-seltext_l = text-079.

wa_fieldcat-no_zero = 'X'.

wa_fieldcat-do_sum = 'X'.

APPEND wa_fieldcat TO i_fieldcat.

CLEAR wa_fieldcat.

wa_fieldcat-tabname = 'I_OUTPUT'. " Variance W/O Scrap

wa_fieldcat-fieldname = 'OTHER'.

wa_fieldcat-tech = 'X'.

APPEND wa_fieldcat TO i_fieldcat.

CLEAR wa_fieldcat.

*-Sort Build

wa_sort-fieldname = 'OTHER'.

wa_sort-up = 'X'.

APPEND wa_sort TO i_sort.

wa_sort-fieldname = 'MBLNR'.

wa_sort-up = 'X'.

wa_sort-subtot = 'X'.

APPEND wa_sort TO i_sort.

CLEAR wa_sort.

And than use the function module 'REUSE_ALV_GRID_DISPLAY' as shown below.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

i_callback_user_command = 'DOUBLE_CLIK'

i_callback_top_of_page = 'F0020_TOP_OF_PAGE'

i_save = 'A'

is_variant = w_var

is_layout = wa_layout

it_sort = i_sort

it_fieldcat = i_fieldcat

TABLES

t_outtab = i_output

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF. " IF sy-subrc <> 0.

I hope this answer help you.

Thanks,

Khushbu.