Application Development and Automation 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: 
Read only

Back to calling program cl_salv_table

Former Member
0 Likes
5,315

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?

7 REPLIES 7
Read only

Sougata
Active Contributor
0 Likes
2,374

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.

Read only

Abhijit74
Active Contributor
0 Likes
2,374

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

Read only

Former Member
0 Likes
2,374

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.

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
2,374

When you click back on second alv what happens..?

Nabheet

Read only

0 Likes
2,374

Just ends the execution of the program..

Read only

0 Likes
2,374

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    

Read only

0 Likes
2,374

Actually your code should work perfectly and as expected.

SUBMIT WITH RETURN should give the expected result.

Can you paste the CLASS DEFINITION meant for handling double click in your program .