Popup using SALV

By | Last Updated on September 23, 2013 | 10,511

Popup generated using the SALV Model in ABAP. This would be very handy code snippet for informative popup.

Popup using SALV

 
DATA: o_popup_alv TYPE REF TO cl_salv_table.
DATA: lo_functions TYPE REF TO cl_salv_functions_list.
DATA: t_t100 TYPE STANDARD TABLE OF t100.
*
SELECT * FROM t100
  INTO TABLE t_t100
  UP TO 10 ROWS.
*
cl_salv_table=>factory(
   IMPORTING
     r_salv_table   = o_popup_alv
  CHANGING
    t_table        = t_t100 ).
*
lo_functions = o_popup_alv->get_functions( ).
lo_functions->set_default( 'X' ).
*
* ALV as Popup
o_popup_alv->set_screen_popup(
  start_column = 80
  end_column   = 140
  start_line   = 3
  end_line     = 10 ).
 
* Display
o_popup_alv->display( ).
 

Do you have a Code Snippet which you want to share, Submit Code Snippet here

Share It!

Don't miss an Update

Get notified of the new post, right into your inbox

Naimesh Patel{274 articles}

I'm SAP ABAP Consultant for more than a decade. I like to experiment with ABAP especially OO. I have been SDN Top Contributor.
Follow :

Explore all of his 274 articles.

Load comments

4 Comments

  • First time I have crossed this! Until now, I used the old FM ‘REUSE_ALV_POPUP_TO_SELECT’
    Thanks for sharing this.

  • Martin Pacovsky

    Thank you Naimesh. Very simple and very useful.

  • Shariq

    Super functionality. Thanks Naimesh.

  • Aashrith

    Dear Naimesh,
    Thanks a ton for this code gem!
    This code snippet came in very handy for me…I am developing a transaction and have used SALV heavily and it was all thanks to your tutorials on SALV.

    One suggestion from my end is to have an example of using SALV in Module Pool Program in the tutorial and using SALV in sub screens where we give the main screen no. instead of the sub screen no. while creating the Container Object(I didn’t know this, got to know from a SCN post and some debugging πŸ™‚ )

    Thanks once again for your blog!!!

    Cheers,
    Aashrith H G

Comments on this Post are now closed. If you have something important to share, you can always contact me.