09-15-2006 6:47 AM
Hi All
I have ALV grid output and 1 user button (POST) in application toolbar.
I want to know which property I should set in ALV grid so that I am able to select a line and POST it and then that line gets removed from ALV output.
I know how to get the ALV report refreshed but I am not sure of how to identify the line which is highlighted by selection and how can we give accroding effect in the internal table which we are displaying.
Amol
09-15-2006 6:50 AM
there are methods in c_gui_alv_grid LIKE get_selected_row etc. check it out. these methods will help u.
by getting the selected row, u can easily refresh it.
09-15-2006 7:16 AM
Hi
I hear we can use box_fieldname for this. But on forum not getting exact clue on how to use in my requirement.
I'll be selecting a line and after post it should from output table. And table should get refreshed . rs_selfield-REFRESH = 'X' can be used for refreshing table .. but my issue is selecting and getting that line, before refresh.
Amol
09-15-2006 7:29 AM
Hi Amol,
for selecting a single row we can declare one variable in our internal table with charecter type and in layout we can give this field name as box type. Check the below code.
----Data Declaration
DATA: BEGIN OF it_base_data OCCURS 0,
mark,
vbeln LIKE vbak-vbeln, " SALES DOCU NO
End of it_base_data.
gs_layout-box_fieldname = 'MARK'.
in ALV User Command loop the Internal table where Marx = 'X' and delete that line. and for refresh as U Know Put ps_selfield-refresh = 'X'.
Hope it is helpful,
Rgds,
Mohan.
@Amol: Plz mark Useful Ans.