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: 

Override default printer when printing ALV

0 Kudos

Hi,

I have built an ALV OO report.  When I click 'Print', the popup with the print parameters is defaulted according to my default user profile.

I'd like to change the default printer.  I tried to use the parameter 'IS_PRINT' of the method 'SET_TABLE_FOR_FIRST_DISPLAY'.  It does not work.  I tried to use the function module 'SET_PRINT_PARAMETERS'.  It does not work.

Is it possible to change those parameters at all?  Any idea what I am doing wrong?

Thanks.

7 REPLIES 7

former_member200338
Active Contributor
0 Kudos

Might be it is overwritten by basis settings.

if it is just changing printer for a specific program, request basis to set using program RSPRIPARADMIN by specifying your program and required printer name.

0 Kudos

The printer should be the one coming from the selection screen, it can't be a specific printer for the program.

former_member188724
Contributor
0 Kudos

Hi,

I hope you tried in debug mode what value you get for the Printer Name.

pls also check for the Printer Name whether it is given as it is in the System (case sensitive)....


0 Kudos

I am using the right printer id.  I created a test abap list and I was able to change the default printer by using the function module 'SET_PRINT_PARAMETERS'. 

I just can't find a way to pass the printer I want to the ALV class.

0 Kudos

You can try it other way around - use GET_PRINT_PARAMETERS and overwrite the Printer with desired printer id and pass this to IS_PRINT.

0 Kudos

That does not work.  IS_PRINT-PRINT_CTRL-PRI_PARAMS-PDEST is ignored.  It always sends the report to the default printer of the user profile

0 Kudos

I found out that there is an ALV print version that is considered.  It is by default V04 in our system (abap 7.02).  I can change that version in transaction SALV_PARAMS.  When I change it to V03, it considers the print parameters that I pass to the ALV class.  When it it V04, it doesn't.

I am not sure what the impact of changing the version will be.

Any idea?