In ALV, i have to display list in which some records has to
display. starting of each record it should display checkox.
and we have to display push button delete. when user select
chekc box and press delete button, that entry should
delete. please tell me how to do it?
Answer Posted / kubera naidu
Hi, you can do this by..am droping here only the relevant
code for the selected records. i.e for the check box selected,
1) Build fieldcatalog along with the checkbox
2) Create one method for getting the selected records into
internal table.
* Registering Edit Event
CALL METHOD g_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
g_grid->check_changed_data( ).
REFRESH: it_final.
LOOP AT it_final1 INTO wa_final1.
IF wa_final1-checkbox EQ 'X'.
APPEND wa_final1 TO it_final.
CLEAR wa_final1.
ENDIF.
ENDLOOP.
3) And for deleting, create a push button on the screen
and in PAI,
case ok_code.
when 'DELETE'.
CALL METHOD g_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
g_grid->check_changed_data( ).
delete it_final where checkbox = 'X'.
endcase.
Hope somehow it will help..
Regards,
Kubera Naidu.
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What are the two different ways of building a match code object? : abap data dictionary
Explain the session method? : abap bdc
What are the merits of its?-
Explain what is sequence of event triggered in report?
When will the current screen processing terminates?
What are the classifications of the sap abap data classes?
Different between Interface and Abstract classes?
How do you document ABAP programs? Do you use program documentation menu option?
What is a data dictionary? : sap abap data dictionary
Explain what are the events used in interactive reports?
What is payroll area
What are the two ways of producing a list within a transaction?
What is system-land-scape of your project?
What is the advantage of structures?
What are the page windows?