04-19-2010 6:23 AM
hi,
i have a requirement where in the alv is displayed and then i should select one of the lines out of alv grid and then click on execute button to perform some function which displays again ALV
I am able toactivate the double click event like if i double click on selected record from ALV,i would be able to perform the further function but does not any body know how to create an execute button in ALV and then perform action on clicking execute button
kanishak
04-19-2010 6:32 AM
hi,
Go to tcode SE41, copy SAPLKKBL with status 'standard' to your custom program with status 'ZZZZ'. Change your status, insert a button execute with function code. In the code assign :
Call function 'REUSE_ALV_LIST_DISPLAY'
Exporting
I_CALLBACK_USER_COMMAND = 'USER_COMMAD'.
form USER_COMMAND using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
if r_ucomm = 'EXEC'. "Execute
write your code
ENDOFRM.
04-19-2010 6:46 AM
Hi kanishak,
There are lot of topics discussed in SCN related to this. You can get lots of samples as to your issue.
Copy the STANDARD GUI status from report SAPLKKBL using
T-Code SE80--->Programming Sub-objects--->GUI status.
Code:
call function 'REUSE_ALV_GRID_DISPLAY'
exporting i_callback_program = gc_repid
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
i_grid_title = lc_grid_title
is_layout = lc_layout
it_fieldcat = gt_fieldcat
it_sort = sort
i_save = l_save
is_reprep_id = l_bbs_id
is_variant = l_variant
tables t_outtab = it_final
exceptions program_error = 1
others = 2.
The parameters in capitals are the extra ones that need to be added.
04-19-2010 6:57 AM
Hi,
Refer wiki code by me on ALV with Checkbox and process selected records at run-time:-
Hope this helps you.
Regards,
Tarun Gambhir