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: 

ALV lists in background => no spool - why ??

Former Member
0 Kudos
3,255

Hi Experts,

I have a quick (probably very simple) issue on programs using ALV grid/lists.

We have a program, dointg some treatmeant.

At end of execution of program we display errors and processing messages viathe ALV grid.

So it is working fine on foreground.

But when we execute it in background we have no spool. nothing. Even in SM37 not the spool icon.

I understood that normally we could have the ALV content in the spool. But I do not understand what is wrong.

Could some experts help me to understand what is wrong and hwo to solve ??

Thanks for your help.

S.N

1 ACCEPTED SOLUTION

Former Member
488

Hi,

Have you tried to run it via ALV_LIST* FM. I guess something related to spool and print parameters.

Remove code if have explicitly use any code to send the output to spool. could you please paste your code here to understand the problem clearly.

regards,

Deepti

10 REPLIES 10

former_member202771
Contributor
488

Hi,

In REUSE_ALV_GRID_DISPLAY,

fill :

ls_print-print = 'X'.

ls_print-no_print_listinfos = 'X'.

Thanks,

Anil

0 Kudos
488

It works, thanks for sharing this!

venuarun
Active Participant
488

Hi,

DATA WA  TYPE   SLIS_PRINT_ALV.

WA-PRINT = 'X'

Importing Parameter of alv list

IS_PRINT =  WA.

Regards

Arun VS

Former Member
0 Kudos
488

Thanks ARUN & Anil.

I triend your options.

But it does  not work.

With that ls_print use, I have the window asking for the print but when executed in the background still I haven't any spool.

My ALV list on foreground has 2 lines.

Any other help please ?

Thx

S.N

Former Member
0 Kudos
488

How did you create your alv grid? object oriented with set_table_for_first_display method?

Regards
Michael

488

Hi Newbie,

The importing parameter IS_PRINT of ALV List will solve your issue. I have tested this.

Data : wa_print type SLIS_PRINT_ALV.

wa_print-print = 'X'.

wa_print-no_print_listinfos = 'X'.

Now you have to make separate call for ALV in foreground and background .

For that,

If sy-batch = 'X'.

call function module by passing IS_PRINT parameter(wa_print).

else.

call function module without IS_PRINT.

endif.

Test the spool using sp01.

Regards

Sreekanth

0 Kudos
488

This is actually the best and correct answer.

Former Member
489

Hi,

Have you tried to run it via ALV_LIST* FM. I guess something related to spool and print parameters.

Remove code if have explicitly use any code to send the output to spool. could you please paste your code here to understand the problem clearly.

regards,

Deepti

0 Kudos
488

Hi Deepti.

my colleagues who made the code found the issue and now they 're using ALV list function.

It is working now.

The spool generated is not really friendly but at least a godd start

Thanks all for the help.

S.N

0 Kudos
488

For the spool to work in the background with REUSE_ALV_LIST_DISPLAY, you must omit the IT_FIELDCAT parameter and use the I_STRUCTURE_NAME, and you create that structure in SE11 and the spool works

Spanish

Para que funcione el SPOOL en fondo con REUSE_ALV_LIST_DISPLAY, debes omitir el parámetro IT_FIELDCAT y utilizar el I_STRUCTURE_NAME, y esa estructura la creas en SE11 y funciona el SPOOL

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = 'ZES_LAYOUT_ZFUEL01'
TABLES
t_outtab = gt_outtab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
.