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: 

How to switch off column coloring of alv grid printouts?

Former Member
0 Kudos

Hello World!

Is there any possibility (a customizing option or a parameter) to switch off cell/column coloring of alv grid printouts?

It is very useful to see colored columns in screens, but they are darkened in printouts. How to avoid it?

Thanks and regards,

Vladimir

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Valdimir,

I dont think there is any options in customizing to switch off color in printing.

May be you can try this option. In the print properties dialog box. Under the print settings there is an option to set only Text for printing. Try this option not sure if this helps.

Cheers

VJ

12 REPLIES 12

Former Member
0 Kudos

Hi Valdimir,

I dont think there is any options in customizing to switch off color in printing.

May be you can try this option. In the print properties dialog box. Under the print settings there is an option to set only Text for printing. Try this option not sure if this helps.

Cheers

VJ

0 Kudos

Hi Vijayendra,

sorry, did you try it yourself?

In any SAP system display any alv grid table and try to print it. You do receive a dialog box, but quite special one, not from Windows... There is no such an option.

Thanks and regards,

Vladimir

0 Kudos

Hi Valdimir,

I tried it on my system in the morning and i could get a print dialog box in the ALV display where you have that option.

I am on SAP 4.7 version.

Cheers

VJ

0 Kudos

Hi Vijayendra,

so maybe it is really customized if you receive that option in the print dialog box and we - don't...

Thanks and regards,

Vladimir

0 Kudos

Hi Vijayendra,

I beg your pardon - I made a mistake and you are quite right - really our users receive that print dialog box.

However all efforts to set on the print option "noshade" (on the fly or as the default value) - don't help.

The printouts remain colored with any value of the flag.

It looks that the setting doesn't produce any effect...

What could you say?

With best regards,

Vladimir

0 Kudos

Hi Vladimir,

Here is what i tried this morning on our system : SAP 4.7 version. I am giving the steps i tried today morning. Hope this gives you some pointers.

1). Goto se16

2). Enter any table say for example MARA

3). run the report and display the data from mara

3). From the menu select Settings>User Paramaters>Select ALV GRID DISPLAY

4). Once the system changes to ALV GRID DISPLAY try to click on the PRINT button.

5). On the popup screen click on the PROPERTIES button or directly tick the checkk box which says ONLY TEXT. Or from the properties dialog screen under the general attributes double click on the TEXT ONLY option.

6). Once done come out and check the spool it has created. You will notice the difference. The printer will now only print the text and the columns.

Take a look at the above steps. Not sure if this answers your query.

If these options are not working for you. Why not give an additional custom button along with the ALV tool bar to display the report using simple write statements for printing without any color.

Cheers

VJ

0 Kudos

Hi Vijayendra,

thank you very much, your easy advice helps.

When 'NOSHADE' doesn't work - 'ONLY TEXT' saves.

Of course, the plain text has no beauties of alv or pdf styles, however printouts are quite readable and suit everybody.

I found that it is possible to assign the default print settings to all users who need them - via the standard program RSPRIPARCOPY.

Thanks and best regards,

Vladimir

P.S. Sincere thanks to others, I appreciate your efforts to help, but your advice were rather complicated for such a case...

Former Member
0 Kudos

Hi,

There is not straight solution for this. What you can do, is to have two different layouts for the report - one with colors and the other one without.

Before printing, switch to the Black and white layout and print it. However, if you are using the standard print option of the ALV, this will be a manual action the user will have to do.

Regards,

Ravi

Note - Please mark the helpful answers

0 Kudos

Hi Ravikumar,

what manual action could be used?

Using the standard print option of ALV

from the colored alv grid report in the screen (it's OK!)

we receive the colored alv list of the printout.

What could we do to switch this coloring off either in that list or later (when it is printing or transforming into pdf format)?

Thanks and regards,

Vladimir

0 Kudos

Hi,

You can have different layouts for a ALV report and each layout the look and feel can be different.

So, the manual activity is the user will have to switch to the B/W layout before printing. I am not sure if you have enabled the LAYOUT option for the user to change it by himself.

I hope I am able to get across my point.

If you are using OO ALV control, you can dynamically change the layout using set_frontend_layout method. The user can also change the layout --

choose Change layout or Settings ® Layout ® Change.

The Change Layout dialog box shows you which columns are currently displayed and which additional columns can be displayed.

Regards,

Ravi

Note - Please mark the helpful answers

Message was edited by: Ravikumar Allampallam

Former Member
0 Kudos

Hello Vladimir,

Prepare two different layouts ,one with n one without color..

Give a option on your selection screen ..

Depending on that, you can use the layout...

If no_color = 'X'.

Use layout 1 in REUSE_ALV_GRID_DISPLAY/gr_alvgrid->set_table_for_first_displaydisplay

else.

Use layout 2 in REUSE_ALV_GRID_DISPLAY/gr_alvgrid->set_table_for_first_displaydisplay

Regards,

Tanveer.

Please mark helpful answers.

0 Kudos

Hi Tanveer,

your advice seems closer to a solution than others.

I will try it.

Thanks and best regards,

Vladimir