Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

hi all , o/p on selection screen

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

HAVE I NOT JUST ANSWERED THIS QUESTION!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Former Member
0 Kudos

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

JozsefSzikszai
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Sure you can, be back with an example.

Regards,

RIch Heilman

0 Kudos

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

0 Kudos

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

0 Kudos

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