+ All Categories
Home > Documents > SAPGOF - SAP Generic Output Format · SAPGOF RELEASE 4.6C 7 1 The SAPGOF Generic Output Format As...

SAPGOF - SAP Generic Output Format · SAPGOF RELEASE 4.6C 7 1 The SAPGOF Generic Output Format As...

Date post: 10-Mar-2019
Category:
Upload: lamnhu
View: 297 times
Download: 3 times
Share this document with a friend
53
3 © RELEASE 4.6C Computing Center Management System Generic Output Format SAPGOF
Transcript

3

©

RELEASE 4.6C

Computing Center

Management System

Generic Output FormatSAPGOF

4

CopyrightCopyright 2000 SAP AG. All rights reserved.

No part of this documentation may be reproduced or transmitted in any form or for anypurpose without the express permission of SAP AG.

SAP AG further does not warrant the accuracy or completeness of the information, text,graphics, links or other items contained within these materials. SAP AG shall not be liablefor any special, indirect, incidental, or consequential damages, including without limitation,lost revenues or lost profits, which may result from the use of these materials. Theinformation in this documentation is subject to change without notice and does notrepresent a commitment on the part of SAP AG in the future.

Some software products marketed by SAP AG and its distributors contain proprietarysoftware components of other software vendors.

Microsoft®, WINDOWS®, EXCEL®, NT® and SQL-Server® are registered trademarks ofMicrosoft Corporation.

IBM®, OS/2®, DB2/6000®, AIX®, OS/400® and AS/400® are registered trademarks of IBMCorporation.

OSF/Motif® is a registered trademark of Open Software Foundation.

ORACLE® is a registered trademark of ORACLE Corporation, California, USA.

INFORMIX®-OnLine for SAP is a registered trademark of Informix Software Incorporated.

UNIX® and X/Open® are registered trademarks of SCO Santa Cruz Operation.

ADABAS® is a registered trademark of Software AG.

SECUDE is a registered trademark of GMD-Forschungszentrum Informationstechnik GmbH.

SAP®, R/2®, R/3®, RIVA®, ABAP®, SAPaccess®, SAPoffice®, SAPmail®, SAP-EDI®, SAPBusiness Workflow®, SAP EarlyWatch®, SAP ArchiveLink® and SAP Retail® are registeredtrademarks of SAP AG.

All rights reserved.

SAPGOF RELEASE 4.6C

5

1 The SAPGOF Generic Output Format........................................................................ 7

1.1 File Structure .................................................................................................. 7

1.1.1 End of Line .....................................................................................7

1.1.2 Header and Data Identifier ...........................................................7

1.2 Information in the File Header ................................................................... 8

1.2.1 Further notes: Parameter FORMAT .............................................9

1.2.2 Parameters PJSTRTPAGE and PJENDPAGE:..............................9

1.3 Displaying the Data ...................................................................................... 9

1.3.1 Construction of LIST Type Data Lines: ........................................9

1.3.2 Note: Command ID LD: ................................................................9

1.3.3 Print Controls in LIST Type Data Lines .......................................9

1.3.4 Print Controls for Color Control in Lists....................................10

1.4 SAPGOF Character Set............................................................................... 11

1.4.1 Syntactic Characters ....................................................................11

1.4.2 Special Characters........................................................................12

1.4.3 Special Characters: Frame Characters ........................................13

1.4.4 Special Characters: Symbols .......................................................14

1.4.5 Special Characters: Icons.............................................................15

1.5 Setting Up an Output Device.................................................................... 16

2 OTF Format........................................................................................................... 18

2.1 Syntactical Structure ................................................................................... 18

2.1.1 Finding the next OTF command in the data flow:.....................18

2.1.2 Parameter Types ..........................................................................19

2.1.3 Units of Measurement .................................................................20

2.2 Command Overview .................................................................................. 20

2.2.1 // Begin or End the OTF Data Stream.......................................21

6

2.2.2 /P Set Current Position as Display Position ..............................23

2.2.3 OP Open Page (First Command on a Page) ...............................23

2.2.4 EP End Page .................................................................................25

2.2.5 MT Set Cursor ..............................................................................25

2.2.6 ST Character String ......................................................................26

2.2.7 FC Font Call..................................................................................26

2.2.8 BC,BS Output Bar Code...............................................................31

2.2.9 UL Underline................................................................................34

2.2.10 SW Space Width...........................................................................35

2.2.11 SU Superscript and Subscript......................................................35

2.2.12 CP Change Code page .................................................................35

2.2.13 CH SAP Character .......................................................................38

2.2.14 MK Mark ......................................................................................38

2.2.15 RD Raw data ................................................................................39

2.2.16 MC Microfiche Cold Identification.............................................44

2.2.17 PC Print Control...........................................................................45

2.2.18 BX Draw Frame............................................................................45

2.2.19 IN Form Information ...................................................................46

2.2.20 BM Bitmap Information..............................................................47

2.2.21 CB Color Box ................................................................................49

2.2.22 CT Color Text ...............................................................................49

2.2.23 LI Line...........................................................................................50

2.2.24 LB - Link Begin.............................................................................50

2.2.25 LE - Link End ...............................................................................50

2.2.26 LK - Link.......................................................................................51

2.3 Example ......................................................................................................... 51

SAPGOF RELEASE 4.6C

7

1 The SAPGOF Generic Output FormatAs of R/3 Release 4.0, the data format of the "spool exit" was replaced with a new format, theSAP "generic output format" (SAPGOF) described in this document. All external programs thatprocess R/3 spool data (print data) must be capable of interpreting this new format.

This documentation is based on R/3 Release 4.6A running on the UNIX, Windows NT, andAS/400 operating system platforms.

1.1 File StructureIn this document "file" refers to the complete data contained in a spool request. The term is usedfor the sake of simplicity, although the transfer of SAPGOF data in Release 4.0 need notnecessarily take place using a file.

Essentially, each file consists of a header section containing information about the R/3 spoolrequest and the output request ("info lines"), and a data section containing user data in a formatsimilar to the R/3 text processing format (SAPscript OTF) ("data lines").

1.1.1 End of LineThe construction of a SAPGOF file is essentially line-oriented. Each line concludes with a specialidentifier. This can vary according to the variant of the SAPGOF data flow (ASCII, EBCDIC). Inthe ASCII version of SAPGOF format, it is the ASCII-NEWLINE (hex $0A); in the EBCDICversion, it is the EBCDIC-NEWLINE (hex $15).

1.1.2 Header and Data IdentifierA line contains either an "info line" or a "data line". The first character in the line indicates theline type:

First character in line: Type of line:

* "Info line" in file header

Any other printable character "Data line"

The first line of the file is always an info line. This contains the "*" character in column one,followed by the string MAJOR=2 in the following columns. Other info lines follow forming thefile header. The actual data is contained in the data lines following the last info line.

8

1.2 Information in the File HeaderThe info lines in the file header contain information about the spool request and the outputrequest. They have the format "parameter = value". The following parameters are currentlydefined:

Parameter name Function and values of the parameter

MAJOR Main version number. Currently 2 (1)

MINOR Sub-version, currently 1 (1)

FORMAT Data format: LIST or OTF

RQID Spool request number

RQOWNER User who created the spool request (12)

RQCLIENT Client in which the spool request was created (3)

RQCREATIME Creation time of the spool request in the formatYYYYMMDDHHMMSS00 (16)

RQNAME First part of the three-part spool request name (6)

RQSUFFIX1 Second part of the three-part spool request name (4)

RQSUFFIX2 Third part of the three-part spool request name (12)

RQORIGDEST Original output device for spool request

DVCODE PAGE Character set number of the device type for the output request

DVDEVTYPE Device type of output device PJPRINTER (8)

DVORIGDEVTYPE Device type of the original output device RQORIGDEST (4)

PJAMOUNT Number of copies (3)

PJCLIENT Client in which the output request was created (3)

PJDEPARTMENT Department of output request recipient (12)

PJFORM Formatting type for the output request (12)

PJJOBNNO Output request number

PJLAUNCHED Creation time of the output request in the formatYYYYMMDDHHMMSS00 (16)

PJENDPAGE Number of the last page of the spool request to be printed

PJSTRTPAGE Number of the first page of the spool request to be printed

PJTELENUM Fax number for fax requests (30)

PJPRINTER Output device for output request

PJPRIO Output request priority (1) (1=high, 9=low)

PJRECEIVER Output request recipient (12)

PJTITLE Title of the output request (86)

PJUSER User who created output request (12)

SAPGOF RELEASE 4.6C

9

Figures in brackets represent the length of parameters with fixed length.

1.2.1 Further notes: Parameter FORMATWhen FORMAT=OTF, the data is output in OTF format. The commands contained in this formatare described in the section "OTF Format". The OTF format (OTF commands and commandparameters) is output in the SAPGOF character set.

When FORMAT=LIST, the data is output in ABAP list format. A description of this formatfollows.

1.2.2 Parameters PJSTRTPAGE and PJENDPAGE:If either of these parameters is set, the output must be suppressed before or after the specifiedpage. The page number is always increased at the end of a page. The data stream always beginsat page 1. The system always sends the complete data stream to the external processingprogram.

1.3 Displaying the Data1.3.1 Construction of LIST Type Data Lines:Each LIST type data line contains a two-character command ID, identifying the content andfunction of the data line. There then follows an optional parameter block of variable length. Thebasic construction of LIST and OTF format data lines is essentially the same.

The following command IDs are available:

Command ID: Parameter block: Description:

SP None Start a new page

LD Characters to be output(variable length)

Output data

PC Name of print control(length = 5)

Print control

EL None End of line

EP None End of page

1.3.2 Note: Command ID LD:The length of the parameter block for command ID LD can also be zero (in other words, nocharacter is output).

1.3.3 Print Controls in LIST Type Data LinesLIST type data may include print controls. These are control statements, identified using a five-character name, that trigger printer-specific control sequences (for example, start bold type)when you print "normally" from R/3.

10

Embedded print controls in LIST type data are introduced by the command ID PC, followed bythe five-characters print control name.

Example of print controls in LIST type data:

PCCOL0HLD This list line begins with the print control COL0HEL

Note: The display of print controls in LIST type data corresponds to the display of print controlsin OTF data.

1.3.4 Print Controls for Color Control in ListsThe ABAP list processor uses a range of standard print controls COLxx in all lists. These controlthe foreground color (font color) and the background color and are named according to thefollowing convention:

COL - Fixed prefix

Color number 0,1,...7

N=Normal, H=High (highlighted), V=inVerse (inverted)

The following table lists the COLxx print controls along with an explanation of each printcontrol:

Print control Name: Foreground color (fontcolor):

Background color:

COL0N Black Gray

COL0H Blue Gray

COL0V Gray Blue

COL1N Black Pale blue

COL1H Black Blue

COL1V Blue Gray

COL2N Black White

COL2H Black Light gray

COL2V Dark gray Gray

COL3N Black Pale yellow

COL3H Black Yellow

COL3V Yellow Gray

COL4N Black Pale turquoise

COL4H Black Turquoise

SAPGOF RELEASE 4.6C

11

COL4V Turquoise Gray

COL5N Black Pale green

COL5H Black Green

COL5V Green Gray

COL6N Black Pale red

COL6H Black Red

COL6V Red Gray

COL7N Black Pale purple

COL7H Black Lilac

COL7V Purple Gray

1.4 SAPGOF Character SetAll information in a file - info lines and data lines - are displayed in a special character set. TheSAPGOF character set comprises all characters used within the R/3 System, including Asianmulti-byte characters (for example, Japanese, traditional Chinese, simplified Chinese, andKorean). There are ASCII and EBCDIC variants of the SAPGOF character set. These differ in theway in which they code the basic characters ("syntactical character set") and in the end-of-linecharacter (NEWLINE).

Note: A UNICODE variant of the SAPGOF character set is planned for the future.

1.4.1 Syntactic CharactersAll of the characters used to code info lines and data lines in the SAPGOF data stream (exceptthe end-of-line character) belong to the "syntactical character set" (a basic syntactical set ofcharacters). This is a part of what is usually known as the "ASCII 7 bit" character set. Codingthese syntactical characters and the end-of-line character in ASCII or EBCDIC results in theASCII or EBCDIC version of the SAPGOF data stream.

The following table contains an extract of the syntactical character set and the hexadecimal codesof the characters in the EBCDIC and ASCII variants of the SAPGOF character set. The table alsocontains all characters that are part of the ASCII 7 bit character set but are coded differently inthe SAPGOF character set (because they are required to display special characters - see below).

Character SAP number SAP name ASCIISAPGOF

EBCDICSAPGOF

Substitute

(Space) 32 space 20 40

! 33 exclam 21 4F

" 34 quotedbl 22 7F

# 35 numbersign Substitute Substitute #035

12

... ... ... ... ...

@ 64 at Substitute Substitute #064

... ... ... ...

[ 91 bracketleft 4A

\ 92 backslash Substitute Substitute #092

] 93 bracketright 5A

^ 94 asciicircum Substitute Substitute #094

_ 95 underscore 5F 6D

... ... ... ... ...

{ 125 braceright 7D D0

~ 126 asciitilde Substitute Substitute #126

1.4.2 Special CharactersIn the SAPGOF character set, all characters that do not belong to the syntactical character set areidentified using a special notation corresponding to the SAP number for the character. Almostevery printable character in the R/3 System has a unique decimal code assigned to it. This is theSAP number of the character.

However, not all printable characters in the R/3 System have an SAP number. Multi-bytecharacters used in Asian character sets do not have SAP numbers and are represented in theSAPGOF character set by special notation (see below).

1.4.2.1 Coding of Characters Defined by SAP Numbers:Characters with an SAP number in the R/3 System are coded using a substitute representationin the SAPGOF character set. This consists of the ‘#’ or ‘@’ character as an introductoryidentifier, followed by a decimal representation of the SAP number.

Characters with a three-digit (decimal) SAP number are coded as follows:

#xxx

xxx stands for the decimal representation of the SAP number.

Character SAP name SAPGOF code

Æ AE #225

Ä Adieresis #258

SAPGOF RELEASE 4.6C

13

Ô Ocircumflex #278

® registered #347

Characters with a four-digit (decimal) SAP number are coded as follows:

@yyyy

yyyy stands for the decimal representation of the SAP number.

1.4.2.2 Codes for Multi-byte Characters:Special codes are used in the SAPGOF character set for the representation of multi-byte specialcharacters in Asian versions of the R/3 System. The code of a multi-byte character in theSAPGOF character set is defined as follows:

^cxxxx

C is a single-character ID (contained in the syntactic character set) that identifies the Asianmulti-byte character set (for example, Shift + JIS for Japan).

XXXX stands for the coded bytes of the multi-byte character in hexadecimal. For example:

^A848F

Codes for double-byte characters

Language version R/3 code page SAPGOF code for double-bytecharacters

Japanese (Shift JIS) 8000 ^Jxxxx

Chinese (traditional) 8300 ^Mxxxx

Chinese (simplified) 8400 ^Cxxxx

Korean 8500 ^Kxxxx

Note: The number of bytes in a multi-byte character depends on the character set ID C.

1.4.3 Special Characters: Frame CharactersThese are special characters used to output pseudo-graphics enabling R/3 lists to be output withhorizontal and vertical lines and borders.

Border characters in LIST type data lines are represented by the character combination #xxx,where xxx stands for the three-digit SAP number of the character.

The following table lists the border characters used:

14

Character combinationin data

SAP character name Printed output

#460 box_drawings_light_horizontal

#461 box_drawings_light_vertical

#462 box_drawings_light_down_right

#463 box_drawings_light_down_left

#464 box_drawings_light_up_right

#465 box_drawings_light_up_left

#466 box_drawings_light_verti_righ

#467 box_drawings_light_verti_left

#468 box_drawings_light_down_horiz

#469 box_drawings_light_up_horiz

#470 box_drawings_light_verti_hori

#471 box_drawings_light_left

#472 box_drawings_light_up

#473 box_drawings_light_right

#474 box_drawings_light_down

#475 box_drawings_checkbox_off £

#476 box_drawings_checkbox_on R

The box_drawings_checkbox_off and box_drawings_checkbox_on characters are used in list output toprint pushbuttons that can be switched on or off.

1.4.4 Special Characters: SymbolsYou can use symbols in lists. Symbols are monochrome graphical special characters. Thecharacter name (SAP name) for these characters in the R/3 System is SAPdingXX, where XXstands for a two-character identifier between 00 to 7F, counting as follows:00,01,...0A,0B,..0F,10,11,.... (same as hexadecimal system).

SAPGOF RELEASE 4.6C

15

The symbols are represented in LIST type data using the character combination #xxx, where xxxstands for the three-digit SAP number for the character.

The symbols have the following names and numbers in the list of SAP characters:

Character combination in data SAP character number SAP character name

#640 640 SAPding00

#641 641 SAPding01

... ... ...

#655 655 SAPding0F

#656 656 SAPding10

... ... ...

#766 766 SAPding7E

#767 767 SAPding7F

You can display the symbols in the R/3 System. Report SHOWSYMB displays a list of thesymbols that can be displayed. For a complete list of the symbols, call transaction SPAD andthen choose Utilities → For character sets → Compare character sets. Enter character sets 1100 and1400 and select Only output differences.

1.4.5 Special Characters: IconsYou can use the colored SAPicons in lists. Their character name in the R/3 System is alwaysSAPiconXX_nnnn where XX is a two-character identifier from 00 to ZZ as follows:

00,01,...0A,0B,0C,....0Z,10,.... and so on

In the list of SAP characters, not all possible codes in this numbering system are assigned toSAPicons.

SAPicons are represented in LIST type data using the character combination #xxx, where xxxstands for the three-digit SAP number for the character.

SAPicons have the following names and numbers in the list of SAP characters:

Character combination in data SAP character number SAP character name:

#768 768 SAPicon00_DUMMY

#769 769 SAPicon01_CHECKED

... ... ...

#778 778 SAPicon0A_RED_LIGHT

... ... ...

#803 803 SAPicon0Z_CHANGE

#804 804 SAPicon10_DISPLAY

16

... ... ...

#895 895 SAPicon3J_SET_STATE

#940 940 SAPicon3K_PREVIOUS_N

... ... ...

#999 999 SAPicon57_PLANNING_T

@1000 1000 SAPicon58_PERIOD

... ... ...

@1063 1063 SAPicon6Z

You can display the SAPicons in the R/3 System. Report SHOWICON displays a list of the iconsthat can be displayed. For a complete list of the icons, call Transaction SPAD and then chooseUtilities → For character sets → Compare character sets. Enter character sets 1100 and 1400 andselect Only output differences.

1.5 Setting Up an Output DeviceYou use the spool administration transaction SPAD to define an output device in the R/3System. Various attributes are assigned to each output device.

The following attributes are important when you set up an output device for SAPGOF format:

Attribute name Value Description

Device type Name of an output device definedin the R/3 System that you want touse to output in SAPGOF format.Example: SAPGOF

You need special device types inR/3 to use SAPGOF format.The device type providesinformation about the output deviceto the R/3 System, for example, alist of available fonts. This isimportant for printing SAPscriptdocuments (FORMAT=OTF)

Spool server Name of an R/3 application serveron which a spool work process isrunning.

The R/3 application server youenter here processes all printrequests to the output device.

Destination host Name of the remote host whichreceives the output data from thespool server.

The host you enter here receives thedata from the spool server inSAPGOF format.

Host printer Operating system name of theprinter on the spool server ordestination host.

This is the name of the printer.

Access method L, C, U, S, E Control identifier for the type ofdata transfer between R/3 and the

SAPGOF RELEASE 4.6C

17

spool server / destination host.

When you set up an output device, you can assign any host printer name you choose.

18

2 OTF FormatOutput Text Format (OTF) is a format consisting of a set of simple commands independent ofthe device. It is therefore suitable for a whole range of output devices such as line printers, laserprinters, or monitors. It is also easy to read and understand.

In SAP applications, OTF serves as a basis for device drivers, that is, programs controllingoutput to a specific output device.

The SAPscript Composer creates an OTF data stream for output requests from texts created inInterchange Text Format (ITF).

In contrast to ITF, which contains formatting and structural information as well as the text andhence allows modification, OTF is only for output.

The following description of OTF includes the following:

• Syntax description

• Command overview, followed by a detailed explanation of parameters.

• Short description of the output drivers

2.1 Syntactical StructureAn OTF data stream consists of numerous command data records with the following structure:

• Command ID (length: 2 bytes)

• Command parameters (length: variable)• ASCII control character NEWLINE (length: 1 byte)The command ID consists of two characters. It is this identification that determines the expectedparameters and their sequence. The ID is followed by a variable-length area containingparameters for that command. For some commands (for example, command MT) this area is ofconstant length, while for others (like command ST) it can be of variable length. If the parameterarea is of variable length, the length is always defined by a parameter.

If the interpreter cannot recognize a command ID, it will ignore the line and move on to the nextline.

Every OTF data record ends with a NEWLINE control character. This can be an ASCII Newline(hex $OA) or an EBCDIC NEWLINE (hex $25), depending on the operating system platform.

2.1.1 Finding the next OTF command in the data flow:The following algorithm noted in pseudocode demonstrates how an OTF interpreter finds thenext command after the current command when it is reading the OTF data stream.CUR_OFFSET is the offset (in bytes) of the current command identification in the data flow. TheID of the first OTF command in the data stream is located at offset 0.

SAPGOF RELEASE 4.6C

19

IF current command_ID = RD THEN /* jump RD command, length 72 */ CUR_OFFSET = CUR_OFFSET + 72 /* jump NEWLINE */ CUR_OFFSET = CUR_OFFSET + 1ELSE /* jump current command_ID */ CUR_OFFSET = CUR_OFFSET + 2 /* read first parameter byte */ CUR_CHAR = GETBYTE( CUR_OFFSET) /* find next NEWLINE */ WHILE CUR_CHAR != EOF AND CUR_CHAR != NEWLINE CUR_OFFSET = CUR_OFFSET + 1 CUR_CHAR = GETBYTE( CUR_OFFSET) ENDWHILE /* jump NEWLINE */ CUR_OFFSET = CUR_OFFSET + 1ENDIFCUR_CHAR = GETBYTE( CUR_OFFSET)/* CUR_OFFSET now at identification of following command*//* if CUR_CHAR is not EOF */

Note: The above algorithm works on the assumption that the only OTF command to contain aNEWLINE character in the parameter area is RD. SAP guarantees that in future releases, theparameter SAP_PRINT_CONTROL in the command // (currently occupied by hex $1C) will notcontain the value NEWLINE (hex $0A). (This parameter has been obsolete since Release 2.1Aand is no longer used in R/3.)

2.1.2 Parameter TypesThe value set of a parameter in an OTF data record is determined by its type. The followingtypes are used:

NAME Sequence of capital letters and numeric characters beginning with acapital letter.Spaces are permitted at the end.

CHAR Sequence of characters

NUMC Sequence of numeric characters

TWIP Sequence of numeric charactersUnit of measurement 1/1440 inch or 1/20 point.

FNTH Sequence of numeric charactersUnit of measurement 1/10 point

SIGN "+" positive"-" negative

BOOL "X" on" " off

20

2.1.3 Units of MeasurementTWIP (twentieth Point) and FNTH (font height) are the units of measurement used in OTF. Thefollowing information is useful:

1 inch = 2.54 centimeters

1 inch = 72 points

1 point = 20 TWIP

1 point = 10 FNTH

2.2 Command OverviewID Description

// (Start and End) = Start and end OTF data stream

/P (Position) = Current position for display

OP (OpenPage) = Open, first command on page

EP (EndPage) = Close, last command on page

MT (Move-To) = Set cursor

ST (String) = Character string

FC (FontCall) = Font call

BC,BS (Bar code) = Bar code output

UL (UnderLine) = Underline

SW (SpaceWidth) = Space character width

SU (SUperscript/SUbscript) = Superscript / subscript

CP (Code page) = Switch code page

CH SAP Character

MK (MarKed) = Selected text for display

RD (Raw Data) = Printer-specific data

MC (Microfiche Cold) Microfiche cold identification

PC (Print Control) = Print control from T022D

BX (BoX) = Box character

IN (Information) = Form information

BM Bitmap information

CB Color box

CT Color text

LI Line

LB Link Begin

SAPGOF RELEASE 4.6C

21

LE Link End

LK Link

The parameters described in individual commands are position parameters. They must be givenin the order in which they appear in the illustration, be of the given length, and not be separatedby spaces.

2.2.1 // Begin or End the OTF Data StreamAn OTF data stream always begins and ends with the "//" command.

Parameters:

Description Length Type

STARTFLAGPossible values:

• "X" - Beginning of OTF data stream

• " " - End of OTF data stream

1 BOOL

DEVICETYPEThis is the R/3 device type from transaction SPAD.This is the R/3 device name from table TSP0A

8 NAME

SAP_PRINT_CONTROLThis is the SAP print control character. It was used in earlierOTF versions but is now obsolete.

4 CHAR

SAP_PRINT_CONTROL_LENThis is the length of the preceding SAP print control.Possible values: "1", "2", "3", "4".

1 NUMC

SAP_RELEASEName of the SAP R/3 Release under which the OTFdocument was created.

4 CHAR

PAGE_OFS_X

Horizontal distance (in TWIP) by which the print outputshould be moved at output. The parameter is onlyinterpreted at the beginning of the OTF data stream(STARTFLAG="X").

5 TWIP

PAGE_OFS_X_SIGN

Direction of the horizontal displacement. Possible values are"+" (move right) or "-" ( move left). The parameter is onlyinterpreted at the beginning of the OTF data stream(STARTFLAG="X").

1 SIGN

22

PAGE_OFS_Y

Vertical distance in TWIP, by which the print output of thepage should be moved at output. The parameter is onlyinterpreted at the beginning of the OTF data stream(STARTFLAG="X").

5 TWIP

PAGE_OFS_Y_SIGN

Direction of the vertical displacement. Possible values are ‘+’(move down) or ‘-’ (move up). The parameter is onlyinterpreted at the beginning of the OTF data stream(STARTFLAG="X").

1 SIGN

OTF_CREATOR_ID

This indicator identifies the tool that generated the OTF datastream.Possible values:' ' SAPscript form processor'1' Smart Forms

1 CHAR

Other remarks:

The parameters DEVICETYPE, SAP_PRINT_CONTROL, SAP_PRINT_CONTROL_LEN,SAP_RELEASE, PAGE_OFS_X, PAGE_OFS_X_SIGN, PAGE_OFS_Y, PAGE_OFS_Y_SIGN, andOTF_CREATOR_ID are only filled when STARTFLAG = "X".

Note: In the R/3 System, you can append spool requests to other existing spoolrequests. This means that a single spool request may contain two or more OTF datastreams (each beginning and ending with "//").

As of Release 3.0B it is possible to displace the entire print output a certain distance bothhorizontally and vertically using the parameters PAGE_OFS_X, PAGE_OFS_X_SIGN and so on.For example:

PAGE_OFS_X = 144PAGE_OFS_X_SIGN = '-'PAGE_OFS_Y = 144PAGE_OFS_Y_SIGN = '+'This means the print output is moved 1/10 inch (=144 TWIP) to the left and 1/10inch (=144 TWIP) downwards. The PAGE_OFS_... parameters are only supported bythe following SAPscript printer drivers: HPL2, POST, PRES, and SWIN.

SAPGOF RELEASE 4.6C

23

2.2.2 /P Set Current Position as Display PositionThe "/P" command sets the starting display position for an OTF screen display.

Parameters:

Description Length Type

Page 5 NUMC

Scroll-X-Position 5 TWIP

Scroll-Y-Position 5 TWIP

Other remarks: The OTF printer drivers ignore this command.

2.2.3 OP Open Page (First Command on a Page)An OTF data stream consists of a sequence of output pages. Each page is headed by an OPcommand. This contains the page format (for example, DINA4, INCH12), the page layout (P=Portrait, L= Landscape), the character width, the line height, the page length and width, thepage number within the current document, the page number with respect to the entire OTF datastream, the page number of the last page of the current document, the print mode (SIMPLEX,DUPLEX and so on), and the type of paper feed.

When using non-proportional fonts, and particularly in conjunction with line printers, it isimportant that the character width and line height are constant. This is because these values areused to calculate the characters per inch and lines per inch, which most of these printers use.

The page length and width correspond to the page format and page orientation that appear atthe beginning of the OP command.

Note: The old parameter new page (up to now not interpreted by the OTF drivers) was replacedin Release 3.0A with the new parameter PRINTMODE.

Parameters:

Description Length Type

Page format 8 NAME

Page orientation 1 NAME

Character width 5 TWIP

Line spacing 5 TWIP

Page length 5 TWIP

Page width 5 TWIP

Number of pages in document 5 NUMC

Total number of pages 5 NUMC

24

Page number for last page of document 5 NUMC

PRINTMODESets print mode from current page.Possible values:

• Space - Print mode not changed (default value)

• S - Starts a new page and sets print mode to SIMPLEX (single-sided)

• D - Starts a new page and sets print mode to DUPLEX (double-sided)

• T - Starts a new page and sets print mode to TUMBLE DUPLEX(double- sided reversed).

1 CHAR

PAPERRESName of a paper resource in the R/3 spool system. This controls attributesfor the page currently being printed (for example, paper source, pageoverlay, and so on).Possible values:Paper resource names are freely selectable in the R/3 spool system.However, the following default values exist (paper resource name /description):

• TRY01 Paper tray 1

• TRY02 Paper tray 2

• TRY03 Paper tray 3

• TRY04 Paper tray 4

• TRYMN Manual paper feed

• TRYEN Envelope feed

• TRYME Manual envelope feed

20 CHAR

Other remarks:

An OTF data stream may contain several logical documents. This is the reason why pagenumbers are separated into relative document page numbers and absolute page numbersrelative to the entire OTF data stream. The page number of the final page of the currentdocument is only contained in the last page. In all previous pages the value is set to "00000".

The OP command is executed by the SAPscript printer drivers as follows:

• Print mode

In SIMPLEX mode, STN2, PRES, POST, and SWIN send the print control SPMSI; inDUPLEX mode, print control SPMDU; in TUMBLE mode, print control SPMTU. HPL2sets the print mode using PCL-5 commands.

SAPGOF RELEASE 4.6C

25

• Page format:

For the standard page formats DINA4, LETTER, LEGAL, and EXECUTIVE, HPL2 andPRES send corresponding control commands to the printer.

• Page orientation:

To set the page orientation STN2 and HPL2 send either the print control SPORT forportrait or SLAND for landscape. PRES, POST, and SWIN use control commands to dothis.

• Line and character spacing:

STN2 outputs LPI and CPI commands that set the line and character spacing. The printcontrols SLnnn (LPI)and SCnnn (CPI) exist for this purpose. The value "nnn" means"nn.n LPI" for SLnnn and "nn.n CPI" for SCnnn (Example: SL060 = 6.0 LPI.)

2.2.4 EP End PageEvery page of the OTF data stream ends with the EP command.

Parameters: none

Other remarks:

The SAPscript printer drivers interpret the EP command as follows:

• STN2 and HPL2 send the print control "SPAGE" to the printer.

• PRES and POST send corresponding control commands to trigger a form feed.

2.2.5 MT Set CursorThe MT command sets the cursor (the current output position) to a particular position on theoutput page. The reference point for this is the top left hand corner of the page.

Parameters:

Description Length Type

Horizontal position 5 TWIP

Vertical position 5 TWIP

If a string is output at the end of the position specified by MT (see ST command), thehorizontal position describes the left margin of the character box and the verticalposition describes the baseline of the character box for the first character in the string.MT does not specify the upper-left corner of the character box, such as in MicrosoftWindows.

26

2.2.6 ST Character StringThe character string specified using the ST command is applied from the current outputposition, which, as a rule, was determined immediately beforehand using the MT command.

The parameter "length in TWIP", which is important for pixel-oriented output devices and theparameter "number of characters to be output", are specified in the command prior to thecharacter string itself.

The number of characters in the ST command sets the length of the character string in bytes. Thestring must always be this long. Add spaces if necessary to fill the entire length.

In the case of two successive OTF ST commands, the starting X-position of the second characterstring is determined by the length of the character string (in TWIP) in the first ST command.

Parameters:

Description Length Type

Length in TWIP 5 TWIP

Number of characters 2 NUMC

Character string Variable CHAR

2.2.7 FC Font CallIn OTF, the FC command is used to change fonts. It contains a number of parameters that set thefont characteristics.

Parameters:

Description Length Type

FONTFAMILYThis is the name of a font family defined in the R/3 table TFO01.SAP currently uses the following font families:

• COURIER (non-proportional font)

• HELVE (proportional sans-serif font)

• LETGOTH (non-proportional font)

• LNPRINT (non-proportional font)

• OCRA (non-proportional font using character set 4001)

• OCRB (non-proportional font using character set 4004)

• TIMES (proportional serif font)From Release 3.0D onwards, the following additional font familiesare also delivered. These should only be used for thecorresponding Asian double-byte fonts:

• CNSONG (Chinese double-byte standard font (People's

8 NAME

SAPGOF RELEASE 4.6C

27

Republic of China)

• DBMINCHO (double-byte font (Japan)

• DBGOTHIC (double-byte font (Japan)

• JPMINCHO (double-byte standard font (Japan)

• KPSAMMUL (double-byte standard font (South Korea)

• THANSANG (multi-byte standard font (Thailand)

• TWSONG (traditional Chinese double-byte standard font(Taiwan)

From Release 3.1H, the following font families are also delivered.These are used in the corresponding language versions of the R/3System.

• CNHEI (simplified Chinese double-byte font (People'sRepublic of China)

• CNKAI (simplified Chinese double-byte font (People'sRepublic of China)

• COURCYR (Cyrillic font, non-proportional) (Russia), ISO8859/5

• HELVCYR (Cyrillic font, proportional) (Russia), ISO 8859/5

• TIMECYR (Cyrillic font, proportional) (Russia), ISO 8859/5

• THDRAFT (multi-byte font (Thailand)

• THVIJIT (multi-byte font (Thailand)From Release 3.1I, the following font families are also delivered.These are used in the corresponding language versions of the R/3System.

• MICR_C (MICR font for Europe (CMC-7) using character set4004)

• MICR_C (MICR font for USA (E-13B) using character set 4004)

• COUR_17 (Courier font using Greek character set)

• HELV_17 (Helvetica font using Greek character set)

• TIME_17 (Times font using Greek character set)

Customers may also define their own font families and use these intheir forms and printer definitions.

FONTSIZEThe height of the font in 1/10 point. Possible values: "001" to "999".

3 FNTH

BOLD-ATTRIBUTEAttribute for bold script. Possible values: "X" or " ".

1 BOOL

ITALIC-ATTRIBUTE 1 BOOL

28

Attribute for italic script. Possible values: "X" or " ".

CHARACTERWIDTH

The width of a character in the printer font in TWIP (5digits).Possible values: "00000" to "99999".Note: For proportional fonts the value of this field is the averagecharacter width of all characters in the font.

5 TWIP

PROPFLAG

Identifies whether the font is proportional or non-proportional.Possible values "X" or " ".

1 BOOL

PC-1Name of print control 1 assigned to the printer font.Possible values: "SF000" to "SF999" or space character.

5 NAME

PC-2Name of print control 2 assigned to the printer font.Possible values: "SF000" to "SF999" or space character.

5 NAME

CODE PAGEName of the character set assigned to the font family in R/3.Possible values: "0000" to "9999". In releases earlier than 3.1H,"0000" represents the R/3 System character set. From Release 3.1H,the actual R/3 character set used is always specified here. See CPCommand.

4 NUMC

SPACEWIDTHAn internal SAPscript value. From Release 3.0D, this parameter isincluded in the FC command.

5 TWIP

LANGUAGEKEYThe language key specifies the language of the form and / or textcurrently being processed. In case of uncertainty about the fontbeing used, the language key can be used to ensure the correctdevice font is used. This parameter only appears in the FCcommand from Release 3.0D onwards.Note: The use of font families in describing device fonts is not dealtwith uniformly in the older Releases 2.2x and 3.0A-C. For example,some Japanese devices (printers) are equipped with fonts assignedto the font families COURIER, HELVE, and so on in R/3 (andhence in OTF). However, the printer itself uses Japanese fonts (suchas Mincho).

Furthermore, the same font names are used for devices that usegenuine Latin 1 fonts such as Courier, Helvetica, and TimesRoman. The language key ensures that it is possible to tell whichgroup of languages the font belongs to.

1 CHAR

POSTENCODE

This attribute is only relevant to the PostScript driver. Possible

1 BOOL

SAPGOF RELEASE 4.6C

29

values: "X" or " ". If the attribute is set, the encoding vector of thePostScript fonts used is changed by the OTF driver. The encodingvector used is defined in the initialization of the formatting type(for example, INCH12) for the device used. If the attribute is notset, the PostScript font will be used with its own "built-in"encoding.Note: This parameter is only available in the FC command as ofRelease 3.0E.

SCALEFONT

This attribute is useful for the PCL-5 as well as for theSAPWIN/SWIN driver.Possible values: "X" or " ".If this attribute is set, it means the printer font is scaleable and theprinter driver must output commands for scaling the font to therequired size. In this case, the contents of print controls 1 and 2 aredifferent.If the parameter is not set, then print controls PC-1 and PC-2already contain the complete command for font selection.

Note: The parameter is only included in the FC command as ofRelease 4.0A.

1 BOOL

PRINTERFONTPROP (first available in RF command as of Release4.6C)This attribute is meaningful for the PCL-5 driver.Possible values:

Value Description

Y PCL-5 handles the printer font as a proportionalfont.

N PCL-5 handles the printer font as a non-proportional font.

1 CHAR

(Spacecharacter)

The PCL-5 font attribute proportional font is setaccording to the above-mentioned parameterPROPFLAG

SOFTFONTThis attribute is activated when the current font is contained in theOTF data stream as a software font definition (variant “T” of RDcommand). In this case, the parameter PC1 contains the five-digitsoftfont ID (for example, “00001”), which enables the assignment ofthe FC command to the softfont definition in the RD command.

Note: This parameter is contained in the FC command as of Release4.6C.

30

Below is a list of the language keys used in R/3 and the languages assigned to them:

Language Key Language

1 Chinese (simplified)

2 Thai

3 Korean

4 Rumanian

5 Slovenian

6 Croatian

A Arabic

B Hebrew

C Czech

D German

E English

F French

G Greek

H Hungarian

I Italian

J Japanese

K Danish

L Polish

M Chinese (traditional)

N Dutch

O Norwegian

P Portuguese

Q Slovak

R Russian

S Spanish

T Turkish

U Finnish

V Swedish

Other remarks:

Print controls are assigned to every font used by SAPscript for a specific device type (SFxxx). Theexact definitions of both print controls depend on the printer driver used.

SAPGOF RELEASE 4.6C

31

On execution of the FC command, the SAPscript printer drivers send the printer controlappropriate to the format (portrait or landscape) to the printer.

2.2.8 BC,BS Output Bar CodeBar codes are specified in OTF using two commands, BC and BS, issued in sequence. The BCcommand contains information about the bar code, while the BS command contains the actualstring printed in bar code form. The print position of a bar code is the current output position,which is usually set immediately beforehand using the MT command.

BC command parameters:

Description Length Type

SAPBAR CODE

Logical name of a bar code in the R/3 System taken from thetable of system bar codes. This table currently contains thestandard bar code names listed in the following table.

8 NAME

MAX-WIDTHMaximum width of the bar code in TWIPs.

5 TWIP

MAX-HEIGHTMaximum height of the bar code in TWIPs.

5 TWIP

STRINGLENNumber of characters in the succeeding BS command to beoutput as a bar code. Possible values: "01" to "70"

2 NUMC

PC-PREFIX

Name of the print control to be used at the beginning of the barcode string. Possible values: "SBP00" to "SBP99"

5 NAME

PC-SUFFIXName of the print control to be used at the end of the bar codestring. Possible values: "SBS00" - "SBS99"

5 NAME

BARCTYPEName of the technical bar code type to be used. The list ofpossible values below is specified by SAP and cannot bechanged by users.The following values are currently defined in the R/3 System:Note: Only available as of Release 4.5A

8 NAME

• 2OF5 Bar code INTERLEAVED 2 OF 5

32

• C39 Code 39 bar code

• C39X Extended code 39 (full ASCII characterset)

• C93 Code 93

• C128 Code 128, automatic switch betweenA,B,C

• C128_A Code 128, character set A

• C128_B Code 128, character set B

• C128_C Code 128, character set C

• CODABAR Codabar bar code family

• EAN8 EAN/IAN/JAN Bar code: 7 digits + 1check digit

• EAN13 EAN/IAN/JAN Bar code: 12 digits + 1check digit

• UPC_A UPC bar code type A: 11 digits + 1 checkdigit

• POSTNET US Postal Service POSTNET bar code

• UNDEF Undefined bar code

BARCROTRotates the bar code x degrees counter-clockwise for output.Possible values: 000, 090, 180, 270Note: Only available as of Release 4.5A

3 NUMC

Standard Bar Code Names

These bar code names can be freely defined in the R/3 System and are not linked to anyparticular technical bar code types. The bar code types are controlled by defining the printercommands for bar code control in both of the print controls mentioned below.

Name: Height: Technical type:

ARTNR 1.2 cm Code 128

AUFNR 1.2 cm Code 128

BARCLVS 2.0 cm Code 39, no check digit

BC_C128B 1.3 cm Code 128 B, no human-readable text

SAPGOF RELEASE 4.6C

33

BC_CD39 1.3 cm Code 39, no check digit, no human-readable text

BC_CD39C 1.3 cm Code 39, with check digit, no human-readable text

BC_EAN13 1.3 cm EAN-13, no human-readable text

BC_EAN8 1.3 cm EAN-8, no human-readable text

BC_EANH 1.3 cm EAN128, no human-readable text

BC_I25 1.3 cm Interleaved 2of5, no checksum, no human- readabletext

BC_I25C 1.3 cm Interleaved 2of5, with checksum, no human- readabletext

BC_MSI 1.3 cm MSI, no check digit, no human-readable text

BC_MSIC 1.3 cm MSI, single mod-10 check digit, no human- readabletext

BC_MSIC1 1.3 cm MSI with 2 mod-10 check digits, no human- readabletext

BC_MSIC2 1.3 cm MSI with 1 mod-11 check digit and 1 mod-10 checkdigit, no human-readable text

BC_PSN5 0.3 cm USPS POSTNET 5, no human-readable text

BC_PSN9 0.3 cm USPS POSTNET 9, no human-readable text

KUNAUNR 1.2 cm Code 128

KUNAUPS 1.2 cm Code 128

MBBARC 2.0 cm Code 128

MBBARC1 1.2 cm EAN-8

RSNUM 1.2 cm Code 128

RSPOS 1.2 cm Code 128

RUECKNR 1.2 cm Code 128

BS command parameters:

Description Length Type

BAR CODESTRINGString to be printed in bar code form specified in thepreceding BC command.

1-70 CHAR

Other remarks:

34

The SAPscript printer drivers carry out the BC and BS commands as follows: first the printcontrol specified by PC-PREFIX is sent, followed by the bar code string. Finally the print controlspecified in PC-SUFFIX is sent.

In addition, the POST driver encloses the string in parentheses "(" and ")". The bar code stringand the print controls are only output if the parameters PC-PREFIX and PC-SUFFIX (the printcontrols for the bar code) specified in the preceding BC command contain a value.

PRES encloses the string either in single (‘) or double (") quotation marks.

STN2, HPL2, and SWIN output the bar code string without modification.

2.2.9 UL UnderlineThe UL command determines whether the following characters are to be output underlined(parameter value "X") or not (parameter value " ").

The position and form of the underline is determined by the underline parameters. The spacebetween the underline and the base line of the font can be defined ("-" sign: underline above thebase line. "+" sign: underline below the base line). The thickness of the underline is established inthe fourth parameter of the UL command. The underline is then placed so that its mid-point(one half of its thickness) is at the position specified. The shading (3-digit percentage ) indicateshow dark the line should appear. A value of 0 produces black, 100 no fill.

Parameters:

Description Length Type

Underline on/off 1 BOOL

Sign for distance frombaseline

1 SIGN

Distance from baseline 5 TWIP

Thickness 5 TWIP

Shading 3 NUMC

Other remarks:

The SAPscript printer drivers interpret the UL command as follows:

STN2 and HPL2 send the print control "SUL<<" to switch on the underline, and the control"SUL>>" to switch it off. In this case the underline parameters are ignored.

PRES, POST and SWIN create printer-specific control commands. This enables the underline tobe output in the form specified in the parameters.

SAPGOF RELEASE 4.6C

35

2.2.10 SW Space WidthThe SW command sets the space width for all spaces in the succeeding ST command.

Forth proportional fonts, the space width is evaluated in relation to the basic font metrics; fornon-proportional fonts, the SW command has no effect.

When using block alignment, the space width must be selected so that the characters begin theline at the left margin and end it at the right margin. The SW command sets this space width.

Parameters:

Description Length Type

Space width 5 TWIP

2.2.11 SU Superscript and SubscriptThe SU command specifies whether the following characters should be displayed as superscriptsor subscripts (parameter value "X") or not (parameter value " ").

The super-/sub type "+" specifies superscript (positive distance from the base line) while "-"specifies subscript (negative distance from the base line).

Parameters:

Description Length Type

Super/subon/off

1 BOOL

Super/sub type 1 SIGN

Distance frombase line

5 TWIP

Other remarks:

The SU command is executed by the SAPscript printer drivers as follows:

STN2 sends the print control "SUP<<" to switch on superscript, and the control "SUP>>" toswitch it off. STN2 uses the print control "SUB<<" to switch on subscript and "SUB>>" to switchit off.

HPL2, PRES, POST, and SWIN handle superscript and subscript using string positioning.

2.2.12 CP Change Code pageThe character set used for the OTF data stream commands is the one specified inSTART_SPOOL_JOB (used to start a spool request in the R/3 spool). SAPscript passes the

36

character set defined in the current application server as the system character set, for example,code page 1100 for Western European or American R/3 Systems (ISO-8859/1 character set).

The character set used for the OTF text data (for example, strings and bar codes) can changewithin an OTF data stream. This is due to the architecture of the R/3 System, allowing severallanguages to be used in one system. This is the reason for the CP command, which identifies thevalid character set for text data.

The printer drivers convert the characters to be printed into one of the three possible charactersets of the output device (printer character sets) defined in spool administration.

The input codepage parameter specifies the character set in which, from then on, all data from STand BS commands are defined. All other parameters and OTF commands still use the systemcharacter set.

As of Release 3.0F, some customer systems may use SAP blended code pages for systemcharacter sets. These system character sets always begin with the number "6" and represent ISOcharacter sets blended by SAP. For more information about blended code pages, contact SAP Basisdevelopment.

In previous Releases (before 3.1H), the value here was 0000 for most R/3 Systems. This standsfor the system character set specified in the system. As of Release 3.1H, the current valid R/3System character set is given here.

The OUTPUTCODE PAGE parameter tells the printer driver which device character set shouldbe used or which one is suitable for the output.

The value 0000 is possible here. 0000 is used with device types that can use only one singledevice character set, which is the standard in the R/3 System.

Parameters:

Description Length Type

Input code pagePossible values (input code page / character set)

• 0120 EBCDIC ISO-1 (Latin 1)

• 0410 EBCDIC ISO-2 (Eastern Europe, Latin 2)

• 0500 EBCDIC ISO-5 (Russian)

• 0610 EBCDIC ISO-9 (Turkish)

• 0700 EBCDIC ISO-7 (Greek)

• 0800 EBCDIC ISO-8 (Hebrew)

• 1100 ASCII ISO 8859/1 (Latin 1)

• 1400 ASCII ISO 8859/2 (Latin 2)

4 NUMC

SAPGOF RELEASE 4.6C

37

• 1500 ASCII ISO 8859/5 (Russian)

• 1600 ASCII ISO 8859/3 (Latin 3)

• 1610 ASCII ISO 8859/9 (Turkish)

• 1700 ASCII ISO 8859/7 (Greek)

• 1802 ASCII ISO 8859/8 (Hebrew)

• 4001 OCR-A (ASCII)

• 4004 OCR-B (ASCII)

• SAP Unification (ISO2 with ISO7 D7F7 and ISO1 FF)

• AP Asian Unification (ASCII+SJIS1+Asian)

• SAP Euro Japan (ISO1 + SJIS1)

• SAP Silk Road (ISO7 + SJIS1)

• SAP Diocletian (ISO1 with ISO7 D7 and F7)

• SAP Nagamasa (Thai + SJIS1)

• SAP Transsiberian (ISO5 + SJIS1)

• 8000 Japanese ISO Shift-JIS

• 8300 Chinese (traditional)ISO Big5

• 8400 Chinese (simplified)ISO GB2312

• 8500 Korean ISO KSC 5601

• 8600 Thai ISO TIS620-2529

• 8700 Arabic ISO 8859-6

Output code pageThis parameter was introduced into the CP command as ofRelease 2.2E. It specifies which device character set the printerdriver is to use for output. The possible device character sets(currently three different code pages may be used) are defined inR/3 when a device type is defined.To ensure compatibility with devices that cannot change charactersets, the value 0000 is permissible here. This specifies the use ofthe standard print character set for device types which have threeidentical device character sets and therefore do not supportcharacter set changes (as is currently the case with all devicetypes).

4 NUMC

Language keyThe language key contains the current R/3 language key for thetexts to be processed. The description of the OTF command FC(Font Call) contains a list of the language keys used in R/3.

1 CHAR

38

Note: This parameter only appears in the CP command as ofRelease 3.0E.

Other remarks:

The SAPscript printer drivers interpret the CP command as follows:

All drivers send a print control "Snnnn" to the printer, where "nnnn" represents the number ofthe input code page. All characters in ST and BS commands are immediately interpreted in theinput code page.

2.2.13 CH SAP CharacterThis command results in the output of a single character. The SAP character code is based on thedefinition of SAP characters in TCP01. Additionally, the width of the character is given in TWIP.The OTF driver converts the character into the printer character set.

Parameters:

Description Length Type

Character width 5 TWIP

SAP-digit code 5 NUMC

Other remarks:

The SAPscript printer drivers only execute this command in Releases from 3.0A onwards. TheCH command is ignored in earlier Releases.

2.2.14 MK MarkThe MK command is used to mark or identify a specific location in the OTF data stream. Thebeginning of the section is specified using the parameter "selection on" (parameter value "X").The end of the section is specified using "selection off" (value " ").

You can assign a selection key after marking the beginning of a block. The device driver thatinterprets the OTF data stream can, as a result, start a different type of processing at that point.This command is not interpreted by printer drivers.

The character format, that is, the name of the selection string used in the ITF text, is the firstparameter in the MK command.

SAPGOF RELEASE 4.6C

39

Parameters:

Description Length Type

Selection format 2 NAME

Selection on/off 1 BOOL

Selection key variable CHAR

Examples: (Taken from the R/3 online help system):

MK GLXDocument keyST 0100807ClientMK GL

Effect:

The client character string is selected. The character string format is GL in the corresponding textstyle.

After you have selected a term (for example, cursor selection), you can display the system helptext for the term "client" by choosing Document key.

Other remarks:

The OTF printer drivers ignore this command.

2.2.15 RD Raw dataThis command is used to pass printer-specific data or graphic data in OTF format.

Parameters:

Description Length Type

DATATYPEData type of the data being transmitted. The value of this parametercontrols whether the driver passes the data to the printer and whetherthe data is converted to the printer character set.Possible values:

• A – Data contains ASCII text. Only the OTF driver STN2 passes thedata to the printer. Character set conversion takes place. Variant Ais currently not used.

• B – Data in binary code. The data is not passed to the printer by anyOTF driver. No character set conversion takes place. Variant B iscurrently not used.

• C – Data contains PostScript commands. Only the POST driver

1 CHAR

40

passes the data to the printer. No character set conversion takesplace.

• D – Data contains PRESCRIBE commands. Only the PRES driversends the data on to the printer. No character set conversion takesplace.

• E – Data contains PCL4 or PCL5 commands. Only the HPL2 driverpasses the data to the printer. No character set conversion takesplace.

• F – Data contains line printer commands. Only the STN2 driverpasses the data to the printer. No character set conversion takesplace. Variant F is not currently used.

• G – The data contains a color bitmap graphic and a color table. TheHPL2, POST, and SWIN drivers interpret these and pass them tothe printer.

• H – The data contains a monochrome bitmap graphic. The HPL2,POST, PRES, and SWIN drivers interpret these and pass them to theprinter.

• I – The data contains a monochrome bitmap graphic including acolor table. The HPL2, POST, PRES, and SWIN drivers interpretthese and pass them to the printer.

• J – The data contains a monochrome bitmap graphic. The HPL2,POST, PRES, and SWIN drivers interpret these and pass them to theprinter.

• T – The data contains a TrueType font definition.

LINEFEEDFLAGIf this parameter is set to TRUE, the data from the printer driver will beconcluded with an EOL command. Otherwise, this does not happen.Possible values:"X" – End line" " – Do not end line

1 BOOL

NUMBYTESNumber of bytes of data in the RAWDATA parameter.Possible values: "00" to "66"

2 NUMC

RAWDATAData to be passed to the printer.

0-66 CHAR

Other remarks:

The RD command always appears in its full length in the OTF data stream, regardless of thelength of the RAWDATA parameter (that is, the ID and parameter area always fill 72 bytes).

SAPGOF RELEASE 4.6C

41

The format of the data stored in the RAWDATA fields for monochrome and color bitmaps isdescribed below.

Data format for DATATYPE=H (monochrome bitmap):

Byte offset Length Content / Explanation

0 8 Eight "magic Bytes" with content:"OTFbitma" (in ASCII code)

8 4 Width of bitmap in TWIP

12 4 Height of bitmap in TWIP

16 4 Width of bitmap in pixels

20 4 Height of bitmap in pixels

24 2 Dots per inch (DPI)

26 2 Bits per pixel (= 1)

28 2 Size of color table (= 0)

30 4 Number of data bytes for bitmap

34 variable Data bytes for bitmap.Each line of the picture is filled to its 4 bytelimit with empty bytes. Each byte contains 8pixels1= black, 0= white

Data format for DATATYPE=G (color table bitmap):

Byte offset Length Content/Explanation

0 8 Eight "magic Bytes" with content:"OTFbitma" (in ASCII code)

8 4 Width of bitmap in TWIP

12 4 Height of bitmap in TWIP

16 4 Width of bitmap in pixels

20 4 Height of bitmap in pixels

24 2 DPI

26 2 Bits per pixel (= 1, 4 or 8)

28 2 Size of color table (= 2, 16 or 256)

30 4 Number of data bytes for bitmap

34 46 * size of colortable

Color table with 2 bytes RED 2 bytesGREEN, 2 bytes BLUE color informationper entry.

variable variable Data bytes for bitmap. Each line of picture

42

filled to its 4 byte limit with empty bytes.

Data format for DATATYPE=J (named monochrome bitmap):

Byte offset Length Content/Explanation

0 8 eight "magic Bytes" with content:"OTFbitma" (in ASCII code)

8 4 four bytes with value 0xFF

12 1 1 byte format Id

13 1 1 byte subformat Id

14 1 1 byte parameter 1

15 1 1 byte parameter 2

16 4 width of bitmap in TWIP

20 4 height of bitmap in TWIP

24 4 width of bitmap in pixels

28 4 height of bitmap in pixels

32 2 dpi (dots per inch)

34 2 bits per pixel (=1)

36 2 size of color table (=0)

38 4 number of data bytes for bitmap.

42 90 image identifier

132 variable Data bytes for bitmap. Each line of picturefilled to its 4 byte limit with empty bytes.Each byte contains 8 pixels.1=black, 0=white

Data format for DATATYPE=I (named colortable bitmap):

Byte offset Length Content/Explanation

0 8 eight "magic Bytes" with content:"OTFbitma" (in ASCII code)

8 4 four bytes with value 0xFF

12 1 1 byte format Id

13 1 1 byte subformat Id

14 1 1 byte parameter 1

15 1 1 byte parameter 2

16 4 width of bitmap in TWIP

20 4 height of bitmap in TWIP

24 4 width of bitmap in pixels

SAPGOF RELEASE 4.6C

43

28 4 height of bitmap in pixels

30 2 dpi (dots per inch)

34 2 bits per pixel (=1,4 or 8))

36 2 size of color table (=2, 16 oder 256)

38 4 number of data bytes for bitmap.

42 90 image identifier

132 6 * size of colortable

color table with 2 bytes RED 2 bytesGREEN, 2 bytes BLUE color informationper entry.

variable variable Data bytes for bitmap. Each line of picturefilled to its 4 byte limit with empty bytes.

Possible values and meaning of Format ID, Subformat ID, Parameter 1, and Parameter 2 fieldsfor data type = I or J:

FORMAT ID: Meaning:0x01 BMON monochrome Bitmap

0x02 BCOL 256 color table bitmap

SUBFORMAT ID: Meaning:0x00 Bitmap Source: RSTXLDMC

0x01 Bitmap Source: BDS server

PARAMETER 1: Meaning:0xX0 Non-Resident Bitmap

0xX1 Resident Bitmap

0x0X Uncompressed image data

0x1X Run-length compressed image data

PARAMETER 2: Meaning:Not currently used

For a description of "resident bitmap", see the description of the OTF command BM (bitmap).

44

The "image identifier" field for DATATYPE=I or J contains the name of the bitmap; twodifferent formats exist for the name. If the bitmap comes from program RSTXLDMC (seeSUBFORMAT ID field), the image identifier field is filled with the full bitmap name. If the bitmapis from the Business Document Service (BDS) server, the image identifier field is only filled up to42 bytes (84 bytes for UNICODE systems) with valid file names. The image identifier fieldcontains then the DPC_ID specified in the OTF command BM (bitmap).

Compressed bitmaps:

As of Release 4.6D, RD commands with DATATYPE=I or J can now also contain compressedbitmap addresses, using the additional 4 bits of the PARAMETER 1 field. Currently, onlycompression type "run-length compression" is supported. This is used in PostScript or PDFformat as "run-length compression filter" and is described in detail in the Adobe documentation(such as in the PostScript reference manual).

The following are special features of compressed bitmap data:

The color table is not compressed in color bitmaps, only the bitmap data directly following thetable. The four-byte “Number of data bytes in bitmap” counter contains the size of thecompressed bitmap data (that is, the actual number of bitmap bytes contained in the RDcommands). The lines of compressed bitmap data are not extended to fill the four-byte limit.

2.2.16 MC Microfiche Cold IdentificationThe MC command identifies the beginning of a succession of pages (application form oroutgoing document). You can use this information to find an object marked this way within anOTF data stream (for example, in an archive).

An MC identification may appear alone or as a succession of MC lines in an OTF data stream. Inthis case, the end of the MC identification is explicitly given (value "X" for the parameter "endmicrofiche data")

Other MC command parameters are the length of the MC data (01-99) followed by themicrofiche data itself. You must always keep to the length specified in this parameter, usingspaces at the end of the data if necessary.

Parameters:

Description Length Type

End microfichedata

1 BOOL

Length ofmicrofiche data

2 NUMC

Microfiche data variable CHAR

Other remarks:

SAPGOF RELEASE 4.6C

45

When an OTF data stream is archived through the R/3 spooler, the MC command comes beforethe OTF start "//" (archiving prologue) and before the OTF end "//" (archiving epilogue). Also,there is an MC identification (archiving index) before the beginning of each logical document,immediately before the relevant OTF OP command.

In these cases, the microfiche data begins with the following characters:

Archiving prologue DPRL

Archiving epilogue DEPL

Archiving index DARA

As of Release 3.1G, SAPscript documents are no longer archived through the SAP spool;this makes the MC command obsolete.

2.2.17 PC Print ControlThis command allows you to send a print control to the printer. The name of the print control isspecified in the PC command.

Parameters:

Description Length Type

PRINTCONTROLName of the print control

5 CHAR

2.2.18 BX Draw FrameYou use the BX command to draw a box of a specified size, starting at the given output position.The box may be shaded, and may also have a border. You can define the thickness of the borderand the degree of shading with which the box is to be filled.

Parameters:

Description Length Type

UP_LEFT_CORNER_X

X coordinate of the top left hand corner of thebox

5 TWIP

P_LEFT_CORNER_YY coordinate of the top left hand corner of thebox

5 TWIP

46

WIDTHWidth of the box

5 TWIP

HEIGHTHeight of the box

5 TWIP

THICKNESSThickness of the box border

5 TWIP

FILL_DARKNESS

Degree of shading for the area of the box,shown as a percentage between 0 and 100. 0 =no shading. 100 = black.

3 NUMC

Other remarks:

The border is independent of the size of the box. Essentially a box with width or height zeroappears as a vertical or horizontal line as long as a border width greater than zero is specified.The thickness of the line is then set by the thickness of the border. The border is centered on theedge of the box.

The HPL2, PRES, POST, and SWIN printer drivers have supported the BX command sinceRelease 3.0A. The STN2 and TELE printer drivers do not support this command.

2.2.19 IN Form InformationThe OTF info command consists of an information structure ID that provides the OTF outputdriver with information about the underlying output form.

The IN command with info ID 01 comes immediately before each OTF OP command, andcontains information about the form language, form name, and the name of the form page.Parameters:

Description Length Type

Info structure ID 2 01

Form language 1 CHAR

Form name 16 CHAR

Form page 8 CHAR

The IN command with info ID 02 comes immediately before the OTF output data for a formwindow. The command contains information about the form window.

SAPGOF RELEASE 4.6C

47

Parameters:

Description Length Type

Info structure ID 2 02

Form window 8 CHAR

The IN command with the info ID 03 is for internal SAPscript use.

Parameters:

Description Length Type

Info structure ID 2 03

Internalinformation

8 CHAR

As of Release 4.6A, there are three additional info IDs, 04, 05 and 06. They replace the info IDs 01and 02 for spool requests created using the form processor "SAP SmartForms".

Parameters:

Description Length Type

Info structure ID 2 04

Form language 1 CHAR

Form name 38 CHAR

Description Length Type

Info structure ID 2 05

Form page 38 CHAR

Description Length Type

Info structure ID 2 06

Form window 38 CHAR

2.2.20 BM Bitmap InformationThe OTF bitmap command is used, for example, with the RD command to output bitmapgraphics in the OTF data stream; the bitmap is defined once and can be referenced (printed out)in the print job as many times as needed. These bitmaps are called resident bitmaps and are

48

stored in the volatile memory of the output device (printer) while the print job is running. Theparameter RESIDENT specifies whether a bitmap is to be stored in the printer.

The BM command contains a document ID that describes the name (unique ID) of the bitmap.This name is used to reference the bitmap later.

When a bitmap is defined, the actual bitmap data is contained in the succeeding RD command(raw data). When referencing a bitmap, the RD commands do not need to be specified as thebitmap has already been defined.

Parameters:

Description Length Type

WIDTH_TWWidth of bitmap in TWIP

5 NUMC

HEIGHT_TWHeight of bitmap in TWIP

5 NUMC

RESIDENTSpecifies whether bitmaps should be temporarily stored in the printer

1 BOOL

FUNCTIONSpecifies whether the bitmap is defined (FUNCTION=D) or referenced(FUNCTION=R). To be compatible with the earlier bitmaps definedusing RD, the value "I" (information) can also be specified. In this case,the BM command is only used to provide information about thesucceeding RD commands contained in the bitmap. DOC_ID is notfilled.

1 CHAR

AUXReserved for future additions

4 CHAR

DOC_IDDocument ID of bitmap

42 CHAR

BACKGROUNDBITMAPIndicates background graphics that may not be printedPossible values: '0' – Normal graphic '1' – Background graphic, printed '2' – Background graphic, not printed

1 NUMC

SAPGOF RELEASE 4.6C

49

2.2.21 CB Color BoxThe OTF CB command sets the color of boxes output using BX commands.

Parameters:

Description Length Type

COLOR_REDRed component of the RGB color value in hexadecimalValue range 00 to FF

2 CHAR

COLOR_GREENGreen component of the RGB color value in hexadecimalValue range 00 to FF

2 CHAR

COLOR_BLUEBlue component of the RGB color value in hexadecimalValue range 00 to FF

2 CHAR

COLOR_AUXReserved for future additions

2 CHAR

The CB command is used as of Release 4.6C.

2.2.22 CT Color TextThe OTF CT command sets the color of text output using ST or CH commands.

Parameters:

Description Length Type

COLOR_REDRed component of the RGB color value in hexadecimalValue range 00 to FF

2 CHAR

COLOR_GREENGreen component of the RGB color value in hexadecimalValue range 00 to FF

2 CHAR

50

COLOR_BLUEBlue component of the RGB color value in hexadecimalValue range 00 to FF

2 CHAR

COLOR_AUXReserved for future additions

2 CHAR

2.2.23 LI LineThe OTF LI command draws a horizontal or vertical line. The color used is the color set by thelast CB command.

Parameters:

Description Length Type

XPOS_TWX coordinate of the start of line in TWIP (twentieth point)

5 NUMC

YPOS-TWY coordinate of the start of line in TWIP (twentieth point)

5 NUMC

DIRECTIONDirection: Horizontal or verticalPossible values: "H" or "V"

1 CHAR

LENGTH_TWLength of line in TWIP

5 NUMC

THICKNESS_TWDiameter of line in TWIP

5 NUMC

For horizontal lines, XPOS_TW/YPOS_TW describes the "left" end point of the line; for verticallines, it describes the "upper" end point of the line.

2.2.24 LB - Link BeginThe LB command starts a text passage that contains a describing text as well as a URL link(LINK) consisting of one or several LK commands. The text passage is closed by the LEcommand.

Parameters: none

The LB command is used as of Release 4.6C.

2.2.25 LE - Link EndThe LE command closes a text passage started by the LB command.

SAPGOF RELEASE 4.6C

51

Parameters: none

The LE command is used as of Release 4.6C.

2.2.26 LK - LinkThe OTF LK command contains a URL link which is part of a text passage enclosed by LB andLE.

Parameters:

Description Length Type

LINKDATA_LENlength of character string LINKDATA in bytes

2 NUMC

AUX1reserved for future use

1 CHARC

AUX2reserved for future use

1 CHAR

LINKDATAcharacter string (URL link)

variable CHAR

If the length of the URL character string exceeds the maximum length of 66 bytes, several LKcommands are sent successively in order to submit the string. The parameter LINKDATA_LENonly contains the number of data bytes submitted by the current LK command.

Example how to use the link commands:

LBMT…ST…http://tralala.comST…/index.htmLK18_http://tralala.comLK10_/index.htmLE

Other remarks: The OTF drivers ignore the data submitted by the LK command.

The LK command is used as of release 4.6C.

2.3 ExampleThe following is an example of an OTF data stream:

//XHPLJ4 0A 00000+00000+IN01ES_TEST_P PAGEOPINCH12 P 144 240 1728017280000010000100000IN02MAIN

52

MT0113403315CP00000000FCHELVE 160X 00181XSF122SF122000000160ESW00160ST00618040.1.MT0198403315ST0253916Courier 12 pointMT0113403795FCCOURIER 120 00144 SF012SF012000000144EST0820857This paragraph demonstrates the different font attributeST0100807changesMT0113404035ST0302421within a font family.MT0113404275FCCOURIER 120X 00144 SF014SF014000000144EST0446431This phrase is printed in bold.FCCOURIER 120 00144 SF012SF012000000144EST0014401FCCOURIER 120 X00144 SF013SF013000000144EST0475233This phrase is printed in italic.MT0113404515FCCOURIER 120XX00144 SF015SF015000000144EST0604842This phrase is printed in bold and italic.FCCOURIER 120 00144 SF012SF012000000144EST0273619 Underlining may beMT0113404755ST0432030combined with the attributes:ULX+0000600011000ST0086406normalUL +0000000000000ST0028802,FCCOURIER 120X 00144 SF014SF014000000144EULX+0000600011000ST0057604boldFCCOURIER 120 00144 SF012SF012000000144EUL +0000000000000ST0028802,FCCOURIER 120 X00144 SF013SF013000000144EULX+0000600011000ST0086406italicFCCOURIER 120 00144 SF012SF012000000144EUL +0000000000000ST0072005 andFCCOURIER 120XX00144 SF015SF015000000144EULX+0000600011000ST0144010bolditalicFCCOURIER 120 00144 SF012SF012000000144EUL +0000000000000ST0014401.MT0113404995ST0403228A text may be printed usingSUX-00120ST0172812subscriptingSU -00120ST0057604 orSUX+00120ST0201614superscripting

SAPGOF RELEASE 4.6C

53

SU +00120ST0014401.MT0113405715FCHELVE 160X 00181XSF122SF122000000160ESW00160ST00618040.2.MT0198405715ST0263817Helvetica 6 pointMT0113406195FCHELVE 060 00068XSF100SF100000000060ESW00060ST0330057This paragraph demonstrates the different font attributeST0171029changes within a font family.MT0113406435FCHELVE 060X 00068XSF102SF102000000060ESW00060ST0175131This phrase is printed in bold.FCHELVE 060 00068XSF100SF100000000060ESW00060ST0006001FCHELVE 060 X00068XSF101SF101000000060ESW00060ST0177433This phrase is printed in italic.FCHELVE 060 00068XSF100SF100000000060ESW00060ST0006001FCHELVE 060XX00068XSF103SF103000000060ESW00060ST0233242This phrase is printed in bold and italic.FCHELVE 060 00068XSF100SF100000000060ESW00060ST0300250 Underlining may be combined with the attributes:ULX+0000600011000ST0037706normalUL +0000000000000ST0010002,MT0113406675FCHELVE 060X 00068XSF102SF102000000060EULX+0000600011000SW00060ST0023604boldFCHELVE 060 00068XSF100SF100000000060EUL +0000000000000SW00060ST0010002,FCHELVE 060 X00068XSF101SF101000000060EULX+0000600011000SW00060ST0025906italicFCHELVE 060 00068XSF100SF100000000060EUL +0000000000000SW00060ST0032205 andFCHELVE 060XX00068XSF103SF103000000060EULX+0000600011000SW00060

54

ST0049510bolditalicFCHELVE 060 00068XSF100SF100000000060EUL +0000000000000SW00060ST0004001.MT0113406915ST0171828A text may be printed usingSUX-00060ST0067312subscriptingSU -00060ST0023104 orSUX+00060ST0077914superscriptingSU +00060ST0004001.IN02HEADER-RMT0903001374FCHELVE 160X 00181XSF122SF122000000160ESW00160ST0174210system R/3IN02FOOTER-RMT0113415547ST0126806SAP AGMT0475415547ST018301008.03.1996MT1057015547ST00202011EPIN01ES_TEST_P NEXTOPINCH12 P 144 240 1728017280000020000200002IN02MAINMT0113403315CP00000000FCHELVE 160X 00181XSF122SF122000000160ESW00160ST00309021.MT0170103315ST0198513Special fontsMT0113404035ST00618041.1.MT0198404035ST0101905OCR-AMT0170104515CP40010000FCOCRA 120 00144 SF400SF400400100144EST0014401#MT0198404515CP00000000FCCOURIER 120 00144 SF012SF012000000144EST0057604hookMT0170104755CP40010000FCOCRA 120 00144 SF400SF400400100144EST0014401#MT0198404755CP00000000FCCOURIER 120 00144 SF012SF012000000144E

SAPGOF RELEASE 4.6C

55

ST0057604forkMT0170104995CP40010000FCOCRA 120 00144 SF400SF400400100144EST0014401MT0198404995CP00000000FCCOURIER 120 00144 SF012SF012000000144EST0072005chairMT0170105235CP40010000FCOCRA 120 00144 SF400SF400400100144EST01440100123456789MT0170105475CP40010000FCOCRA 120 00144 SF400SF400400100144EST0763253ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzMT0113405955CP00000000FCHELVE 160X 00181XSF122SF122000000160ESW00160ST00618041.2.MT0198405955ST0098405OCR-BMT0170106435CP40040000FCOCRB 120 00144 SF500SF500400400144EST01440100123456789MT0170106675CP40040000FCOCRB 120 00144 SF500SF500400400144EST0763253ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyzMT0113407155CP00000000FCHELVE 160X 00181XSF122SF122000000160ESW00160ST00618041.3.MT0198407155ST0135908Bar codeMT0113407635BCMBBARC 068030113410SBP06SBS06BS0123456789IN02HEADER-RMT0903001374FCHELVE 160X 00181XSF122SF122000000160ESW00160ST0174210system R/3IN02FOOTER-RMT0113415547ST0126806SAP AGMT0475415547ST018301008.03.1996MT1057015547ST00202012EP//


Recommended