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: 

GUI Buttons are not displayed when called as popup

sreekanth_n2
Active Participant
0 Kudos

Hi Experts,

I have Report say Report1. The following is the output.

 

   I have two buttons(Green Color, Orange Color) in the OO ALV output.

  I have another report of following output:

 

After selecting line items and if click on Orange Button then Report1 is called.

   The following is the code written to call Report1.

  Report1 output is coming as :

 

Here newly added buttons is missing, but when Report1 is executed normally from SE38 transaction, Im able to see these buttons.

. Here they are not calling the program Report1 and displaying as output whereas they collect the data and process further and display output by creating a popup screen in Report2 only.

While calling Report1 separately these buttons are visible and usable because, all these buttons are designed in GUI status of a screen used in that transaction and corresponding activities are coded there separately to carry out the functions of those buttons.

Please help me on how to display newly added buttons where Report1 is called from Report2.

REgardds,

Sree

1 ACCEPTED SOLUTION

sreekanth_n2
Active Participant
0 Kudos

convinced the Client that we display report instead of Popup.

Issue Resolved

8 REPLIES 8

Tomas_Buryanek
Active Contributor
0 Kudos

Which ALV method are you using (SALV,REUSE..?) and with which parameters? It might be wrongly set "callback program".

-- Tomas --

0 Kudos

No REuse FM..

using SALV ..

0 Kudos

Show code how did you add GUI Status to SALV.

Your first and last screenshot looks different. In first there is GUI Status and in last it seems it is standard SALV toolbar, if I am not wrong...

-- Tomas --

0 Kudos

First screen is calling the report in SE38 transaction .. it is working fine..

second one is... it is called as popup.. hence there are no gui buttons

0 Kudos

Without requested code I cannot help with GUI status.

But here is nice document showing how to add additional buttons to SALV toolbar in pop-up window:

Adding user functions in PF status of an ALV pop up and handling it - Code Gallery - SCN Wiki

NOTE that GUI status and SALV toolbar are two different things.

-- Tomas --

sreekanth_n2
Active Participant
0 Kudos

The following is the code to call Report1 as output:

Report1 is program name(Assumption)

CALL METHOD Report1=>create_screen_object

    EXPORTING

      i_screen_number = '0200'

    IMPORTING

      eo_screen       = l_screen.

  IF l_screen IS NOT BOUND.

    RETURN.

  ENDIF.

  GET REFERENCE OF gt_output INTO lr_data.

  GET PARAMETER ID '/Report1_AVAIL_LAY' FIELD ls_variant.

  IF ls_variant IS INITIAL.

    ls_variant = '/DEFAULT'.

  ENDIF.

  l_screen->set_data_reference( EXPORTING ir_data = lr_data ).

  l_screen->set_program_name( i_program_name = 'Report1' ).

  CALL METHOD l_screen->set_initial_layout_variant

    EXPORTING

      i_layout_variant = ls_variant.    " Layout

  l_screen->set_grid_title( text-t500 ).

  CALL METHOD l_screen->SET_STATUS

    EXPORTING

      IV_STATUS_PROGRAM = 'Report1'

      IV_STATUS_KEY     = '2000'

      .

  CALL METHOD l_screen->show_as_popup

    EXPORTING

      iv_xend   = 1    " IV_XEND

      iv_xstart = 1.

  l_screen->free( ).

  FREE l_screen.

sreekanth_n2
Active Participant
0 Kudos

convinced the Client that we display report instead of Popup.

Issue Resolved

sreekanth_n2
Active Participant
0 Kudos

I read somewhere that gui buttons cannot be displayed if the report is called as popup since the behaviour changes.