08-13-2015 5:33 PM
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
08-27-2015 7:04 AM
convinced the Client that we display report instead of Popup.
Issue Resolved
08-14-2015 9:03 AM
Which ALV method are you using (SALV,REUSE..?) and with which parameters? It might be wrongly set "callback program".
08-14-2015 9:44 AM
08-14-2015 9:55 AM
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...
08-14-2015 10:01 AM
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
08-14-2015 11:16 AM
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.
08-14-2015 10:08 AM
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.
08-27-2015 7:04 AM
convinced the Client that we display report instead of Popup.
Issue Resolved
08-27-2015 7:06 AM
I read somewhere that gui buttons cannot be displayed if the report is called as popup since the behaviour changes.