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
Does the bdc-insert function allow multiple transactions to be processed by sap? : abap bdc
What are the different types of internal table?
What are subroutines? : abap modularization
what is defference between repository and non repository Object?
Which objects are independent transport objects? : abap data dictionary
Give an example of interface from your project explaining why you used it?
Explain what is the difference between sy-tabix and sy-index? Where it is used?
Normally how many and what files get created when a transaction program is written?
Explain what are the events in screen programming?
What is the purpose of at first and at last?
In sap scripts, how will you link form with the event driven?
****THANK YOU ALL ABAP EXPERTS**** I got a JOB as ABAP Consultant in Infosys.I cleared the interview.The question posted here are really good.I cleared interview based on this material only.It really works.I thank all members who posted que&ans here. Those who are in search of job in MNC study this question set only you will get sucess. Thanks once again allinterview.com and members of this community. tulika20021@rediffmail.com
What are the different window types in sapscript?
What will exactly the hide statement do?
What is the difference between select statement and provide statement ? : abap hr