07-29-2008 9:56 AM
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
07-29-2008 9:59 AM
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.
07-29-2008 9:57 AM
07-29-2008 9:59 AM
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.
07-29-2008 10:02 AM
07-29-2008 10:03 AM
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.