Font Size in ABAP List report

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply
starmeteor1984
Posts: 5
Joined: Mon Aug 25, 2008 5:32 am

Font Size in ABAP List report

Post by starmeteor1984 » Mon Aug 25, 2008 5:36 am

Hi ,

I want to know how to change font size in ABAP list report.

I want to enlarge the font size.

I have tried print control but it doesn't work.

I have also tried line size and line count
but it can only reduce the font size .

Thanks.

John

wilhitern1
Posts: 135
Joined: Thu May 15, 2008 4:25 pm
Location: Butterball LLC., Goldsboro, NC, USA
Contact:

Re: Font Size in ABAP List report

Post by wilhitern1 » Mon Aug 25, 2008 12:30 pm

If you want anything larger than 80 X 65 produces, then you have no choice but to use one of the forms (ie. sapscript, smartforms... , some external package), unless some new facility has been added in 6.0 that I don't know about (my highest version is 5.0 and of course, I don't know everything).
Neal Wilhite (WilhiteRN1)Image

Rich
Posts: 7116
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool
Contact:

Re: Font Size in ABAP List report

Post by Rich » Tue Aug 26, 2008 1:08 am

wilhitern1 wrote:If you want anything larger than 80 X 65 produces, then you have no choice but to use one of the forms (ie. sapscript, smartforms... , some external package), unless some new facility has been added in 6.0 that I don't know about (my highest version is 5.0 and of course, I don't know everything).
A very dubious command......

PRINT-CONTROL



Syntax
PRINT-CONTROL { { formats|{FUNCTION code}
[LINE line] [POSITION col] }
| { INDEX-LINE index_line } }.



Alternatives:
1. ... formats|{FUNCTION code} [LINE line] [POSITION col]

2. ... INDEX-LINE index_line



Effect:
This statement formats areas of print lists or creates index entries in print lists to be archived.

The statement PRINT-CONTROLS only works for print lists created with NEW-PAGE PRINT ON, SUBMIT TO SAP-SPOOL, and through selection of Execute and Print on the selection screen. It does not work for a screen list that has been printed during display by selecting Print (function code "PRI").



Alternative 1
... formats|{FUNCTION code} [LINE line] [POSITION col]




Effect
:This variant sets a print format starting from the line specified in line and the position specified in col for all subsequent output statements of the current page. The value in col refers to the position within the list buffer. If the additions LINE or POSITION are not specified, the current position of the list cursor (sy-linno, sy-colno) is used. For line and col, data objects of type i are expected whose values are within the current page width or page length. If line or col contain invalid values, the statement is ignored.

The possible print formats formats are listed in the table below. The runtime environment converts these entries into printer -independent codes called print control. When a list is actually printed, the print control codes are translated into printer-specific control characters.



Formats Print Control Explanation
CPI cpi CIcpi characters per inch
LPI lpi LIlpi lines per inch
COLOR BLACK CO001 color black
COLOR RED CO002 color red
COLOR BLUE CO003 color blue
COLOR GREEN CO004 color green
COLOR YELLOW CO005 color yellow
COLOR PINK CO006 color pink
FONT font FOfont font
LEFT MARGIN left LMleft left margin
SIZE siz SIsiz font size



The conversion to device-specific control characters is made using the tables TSP03 and T022D. If a particular option for a particular printer type (according to table TSP03) is not supported in the table T022D (no entry), this option is ignored in printing. For more information, see the documentation for the tables TSP03 and T022D.



There are more print control codes than print formats formats that can be specified in the statement PRINT-CONTROL. All print control codes can also be specified directly in code using the addition FUNCTION . code must be a flat character-type data object that contains a valid print control code. Invalid content is ignored. A list of valid print control codes and their assignment to printers is available in spool administration (transaction SPAD).



Notes:
The statement PRINT-CONTROL should only be used for print formats that cannot also be set using the formatting options of the statements WRITE and FORMAT, or in the print dialog.

The statement PRINT-CONTROL must be executed for every page to be formatted. If the additions LINE and POSITION are used, the source text position of the statement PRINT-CONTROL in relation to the output statements becomes irrelevant.



Example:
The generated spool output in hexadecimal form:
#SBP01123456789 #SBS01
This sequence of statements can be used to print bar codes.

WRITE : /.
PRINT-CONTROL FUNCTION 'SBP01'.
WRITE : '123456789'.
PRINT-CONTROL FUNCTION 'SBS01'.



Alternative 2
... INDEX-LINE index_line
Regards

Rich

Image
Abap KC:http://www.richard-harper.me.uk/Kb
SFMDR:http://www.se37.com

starmeteor1984
Posts: 5
Joined: Mon Aug 25, 2008 5:32 am

Re: Font Size in ABAP List report

Post by starmeteor1984 » Tue Aug 26, 2008 1:36 am

Hi Rich,

thx a lot for your reply.


For
SIZE siz SIsiz font size

if i cannot find any SIxx Print control in SPAD.
Then.......I cannot use this to change the font size?
or i have to create it myself?

Thx

John

Rich
Posts: 7116
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool
Contact:

Re: Font Size in ABAP List report

Post by Rich » Tue Aug 26, 2008 1:47 am

Hi John,

That's basically it. However, this is a very printer dependant command and personally I tend to use the color and/or intensity clauses in the write command to emphasise stuff on reports.

However, have a look here at topic 0004 - Pf-Statuses, especially the section "But With A Print Option". This would enable you to use the Print-Control statement even if the report is displayed on the screen first.
Regards

Rich

Image
Abap KC:http://www.richard-harper.me.uk/Kb
SFMDR:http://www.se37.com

KleinerEisbaer
Posts: 1
Joined: Sat Jan 23, 2010 1:26 pm

Re: Font Size in ABAP List report

Post by KleinerEisbaer » Sat Jan 23, 2010 1:45 pm

Hello John,

I like to know if this thread helped you?

I had the same problem and tried to use PRINT-CONTROL SIZE / PRINT-CONTROL FUNCTION 'SIxxx' to minimize the font size. It didn't worked!

:-(

Rich
Posts: 7116
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool
Contact:

Re: Font Size in ABAP List report

Post by Rich » Sun Jan 24, 2010 10:58 am

KleinerEisbaer wrote:Hello John,

I like to know if this thread helped you?

I had the same problem and tried to use PRINT-CONTROL SIZE / PRINT-CONTROL FUNCTION 'SIxxx' to minimize the font size. It didn't worked!

:-(
This only works if the print goes directly to the printer and not to the screen first.
Regards

Rich

Image
Abap KC:http://www.richard-harper.me.uk/Kb
SFMDR:http://www.se37.com

Post Reply