08-22-2007 2:48 PM
hi all experts pl
i want to display selection screen and below selection screen i want to display output of the report .
is this possible in report or alv ??
sample code please.
thanx
rocky
08-22-2007 2:52 PM
HAVE I NOT JUST ANSWERED THIS QUESTION!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
08-22-2007 2:53 PM
hi rocky
it is not possible to display the output on the selection screen neither using report nor using ALV
regards
ravish
reward if useful
08-22-2007 2:54 PM
hi rocky,
I guess not the selection screen itself is imporant, but the values on it. In this case read out the values and put them into TOP-OF-PAGE event of ALV FM (check the documentation of the FM).
hope this helps
ec
08-22-2007 2:54 PM
ya its possible....
u have to create ur own screen in screen painter and call it from ur program...
then use object oriented ALV u will get output in same screen ok
08-22-2007 2:56 PM
08-22-2007 3:14 PM
For example, this program implements the docking container on the bottom of the selection screen, so enter you selection criteria and hit enter, the ALV will be filled. This program restricts the execution becaue of the ALV implementation.
report zrich_0001 .
include rsdbc1xx.
data: tmp_ucomm type sy-ucomm.
data: imara type table of mara.
data: xmara like line of imara.
data: dockingbottom type ref to cl_gui_docking_container,
alv_bottom type ref to cl_gui_alv_grid,
repid type syrepid.
select-options: s_matnr for xmara-matnr,
s_mtart for xmara-mtart,
s_matkl for xmara-matkl.
start-of-selection.
at selection-screen.
if sy-ucomm = space.
tmp_ucomm = 'DATA'.
endif.
at selection-screen output.
* Restrict execution, user can only hit enter to get report
append 'PRIN' to current_scr-excl.
append 'SJOB' to current_scr-excl.
append 'ONLI' to current_scr-excl.
repid = sy-repid.
if tmp_ucomm = 'DATA'.
select * into corresponding fields of table imara
from mara where matnr in s_matnr
and mtart in s_mtart
and matkl in s_matkl.
call method alv_bottom->refresh_table_display( ).
clear tmp_ucomm.
endif.
if dockingbottom is initial.
create object dockingbottom
exporting repid = repid
dynnr = sy-dynnr
side = dockingbottom->dock_at_bottom
extension = 300.
create object alv_bottom
exporting i_parent = dockingbottom.
call method alv_bottom->set_table_for_first_display
exporting
i_structure_name = 'MARA'
changing
it_outtab = imara[].
endif.
Regards,
Rich Heilman
08-22-2007 3:27 PM
hi all
kind att Rich Heilman
thanx Rich,
could u pl also add buttons to be displayed at the bottom of the selection screen.
thanx again
rocky
08-22-2007 3:36 PM
You can do this in a number of ways, you can do it with a toolbar object inside a splitter within the docking container, but it seems to be a little over kill just to put it at the bottom of the screen. You could add buttons to the ALV grid toolbar, or you could simply put your buttons in the application toolbar. Of course there is another way to do what you want which involves embeding a selection screen in a dynpro.
Regards,
Rich Heilman