05-22-2007 6:25 PM
Hi,
I am using function module REUSE_ALV_POPUP_TO_SELECT to display some table values.
My requirement is to add a custom button in the toolbar of this function module when results displayed,
Thanks
aRs.
05-22-2007 6:45 PM
05-22-2007 6:52 PM
Thanks Rich,
In that i need to use CL_GUI_DIALOGBOX_CONTAINER
Thanks
aRs
05-22-2007 6:54 PM
For example, run this program, put your cusor on a material and click the magnifying glass on the application toolbar within the dialog window.
report zrich_0001.
type-pools: slis.
types: begin of ttab,
matnr type mara-matnr,
maktx type makt-maktx,
end of ttab.
data: itab type table of ttab with header line.
data: repid type sy-repid.
data: iex type slis_t_extab.
data: xex like line of iex.
data: ifldc type slis_t_fieldcat_alv .
data: xfldc type slis_fieldcat_alv .
parameters: p_check.
start-of-selection.
select matnr maktx into table itab from makt
up to 100 rows.
clear xfldc.
xfldc-reptext_ddic = 'Material Number'.
xfldc-fieldname = 'MATNR'.
xfldc-tabname = 'ITAB'.
xfldc-outputlen = '18'.
append xfldc to ifldc.
clear xfldc.
xfldc-reptext_ddic = 'Material Description'.
xfldc-fieldname = 'MAKTX'.
xfldc-tabname = 'ITAB'.
xfldc-outputlen = '25'.
append xfldc to ifldc.
repid = sy-repid.
xex-fcode = '&NT1'. append xex to iex.
xex-fcode = '&OUP'. append xex to iex.
xex-fcode = '&ODN'. append xex to iex.
xex-fcode = '&ILT'. append xex to iex.
xex-fcode = '&OL0'. append xex to iex.
xex-fcode = '%SC' . append xex to iex.
xex-fcode = '%SC+'. append xex to iex.
call function 'REUSE_ALV_POPUP_TO_SELECT'
exporting
i_tabname = 'ITAB'
i_zebra = 'X'
it_fieldcat = ifldc
it_excluding = iex
i_screen_start_column = 5
i_screen_start_line = 5
i_screen_end_column = 110
i_screen_end_line = 20
i_callback_program = repid
i_callback_user_command = 'HANDLE_DC_ALV'
tables
t_outtab = itab
exceptions
program_error = 1
others = 2.
************************************************************************
* FORM handle_dc_alv *
************************************************************************
form handle_dc_alv using r_ucomm type sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when '&ETA'.
case rs_selfield-fieldname.
when 'MATNR'.
check rs_selfield-value(1) <> '*'. " Not the total line
set parameter id 'MAT' field rs_selfield-value.
call transaction 'MM03' and skip first screen.
r_ucomm = space. "Clear UCOMM, so STD funct doesn't fire
endcase.
endcase.
endform.
Regards,
Rich Heilman
11-30-2009 7:29 AM
Hello a®s ,
Is it possible to add custom buttons with REUSE_ALV_POPUP_TO_SELECT using CL_GUI_DIALOGBOX_CONTAINER ? Can you let us know how to implement it?
Vikranth
11-30-2009 7:33 AM
11-30-2009 7:38 AM
Hello ,
So the solution you implemented was to create a screen with ALV checkbox and add the custom buttons to process the selected records?
Vikranth
11-30-2009 7:40 AM
I used with CL_GUI_ALV_GRID with a screen and call it as window (Its look like popup) and add whatever buttons in the alv.
a®