‎2013 Dec 11 9:58 PM
Hi all,
I'm using SALV to display some information, I'm handling double click event, if the event is triggered for a particular column I take some data from the row selected and call another report with a SUBMIT and RETURN, then another ALV is displayed. I want to show the previous ALV if the user clicks on 'back' or press F3, I don't know how to do that through SALV, any suggestion?
‎2013 Dec 11 11:30 PM
My suggestion is to show the second ALV in a popup screen when the user double clicks on the first ALV.
I would have the standard ALV toolbar defined in the PF-Status of the second ALV and at the bottom only have CANCEL and OK buttons.
Cheers,
Sougata.
Similar to the aproach below:
method process_functions.
set_screen_status(
exporting
iv_pfstatus = |POPUP_WITH_GIZMOS|
iv_set_functions = cl_salv_model_base=>c_functions_all ).
endmethod.
method set_popup_params.
rs_param-start_line = 5.
rs_param-end_line = 25.
rs_param-start_column = 20.
rs_param-end_column = 100.
endmethod. "SET_POPUP_PARAMS
if lcl_report=>lt_infotab is not initial.
create object lo_popup
exporting
i_repid = sy-repid.
lo_popup->publish_alv(
exporting
i_comp_name = space
i_comp_title = space
i_print_header = abap_false
i_popup = lcl_popup=>set_popup_params( )
changing
itab = lcl_report=>lt_infotab ).
endif.
‎2013 Dec 11 11:41 PM
Hello,
You have to handled it with user command (ok_code) by setting up your own toolbar i.e. PF-STATUS. If you are using two different screen for displaying the alv report. It's bit easy for you to call the required screen in your PAI event.
Like below
CASE ok_code.
WHEN 'BACK' OR 'CANCEL'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
Thanks,
Abhijit
‎2013 Dec 12 8:35 AM
Firstly create an alv..
For double click, u have use hotspot = 'X' for that field when u r passing value to the fieldcatlog.
for calling another alv
if sy-ucomm = '&IC1'.
call your another alv using submit.
endif.
For back operation, in your new alv you have to create PF status using SET PF STATUS 'STATUS', & place a BACK button there..
if sy-ucomm = back.
leave to screen 0.
endif.
‎2013 Dec 12 9:03 AM
‎2013 Dec 12 5:45 PM
‎2013 Dec 12 7:25 PM
Hi Karina,
If you are using the syntax call Screen while navigation the One screen to another then Just call the LEAVE screen Syntax, After clicking the Back Button.
Regards.
Nishant Bansal
‎2013 Dec 13 4:45 AM