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: 

spool request from FM REUSE_ALV_GRID_DISPLAY

Former Member
0 Kudos

Hi all,

How to create a spool request for an ALV report by using the FM "REUSE_ALV_GRID_DISPLAY". is it possible to create the spool request with this FM's parameter IS_PRINT. Please give some hint if it is possible.

Thanks in advance,

etienne.

4 REPLIES 4

syed_ibrahim5
Active Participant
0 Kudos

hi,

it is possible...check the below code...


DATA: w_print TYPE slis_print_alv.
w_print-print = 'X'.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program = g_program
      i_structure_name   = "structure name
      is_print           = w_print
    TABLES
      t_outtab           = i_t001.
after this a spool number will be created and will be displayed as a message..

regards,

syed

Former Member
0 Kudos

Hi,

Please go through the beloe code

DATA: wa_print TYPE slis_print_alv.

wa_print-print = 'X'.

pass wa_print to Is_print in the exporting paramters list of Function module Reuse_alv_grid_display.

and then go to tcode SP01.. to check the spool request.. and click on spool request to see the ALV output..

hope this will help you..

Regards,

Kiran

0 Kudos

Hi kiran & syed,

I already tried this. it also creates the spool request but it is showing the message "Formatting set to 'X_65_132". so wen checking the Tcode sp01 the report is not in the correct format. like - values for only one column is coming.

so any solution to overcome this.

thanks once again

Former Member
0 Kudos

Hi Etiene,

You could use PRI_PARAMS structure in print_ctrl of slis_print_alv to pass the page length of list, line width of list etc.

Hope it helps

Sujay