Sap Scripts
If the user wants to print
documents such as invoices, purchase
order, all such documents are
printed with the use of forms. SAP allows the user to define these forms by
using layout sets. SAP script is the tool used to create the layout set.
In order to
print the document- RVORDER 01
Sales order confirmation
- RVDELNOTE Picking List
- RVPICKSIN Picking List
- RVINVOICE 01 Invoice
- MEDRUCK Purchase Order
- F110_PRENUM_CHCK Pre-numbered check
Procedure to
copy the existing layout sets.
Tools à
Word processing à
Layout sets.
Utilities à
Copy from client
- Enter the name of the layout set in
layout name.
- Enter target layout set name
- Click execute
The SAP
standard layout set uses D German as the original language. In order to modify
the copied layout set, the original
language of the set must be changed to the language in which you are working.
Layout Set
Layout
set is used to design the document. Layout set on its own does not contain any
data. The selection of data for the document is done through the print program
i.e. the print program selects the data from database table and feeds it to the
layout set. The document is printed after the print program gets executed.
- Header
- Paragraph
- Character String
- Windows
- Pages
- Page Window
Character string: is used to override
paragraph settings for specific words in a paragraph. For example you might
want to use Bold for a single word but not the entire paragraph. The only
important thing that is defined with the character string is the font.
There are two ways to print a company logo:
1.
The logo can be included in the layout set.
2.
It can be a macro on PCL – 5 printers.
Including a logo in the layout
sets
·
Create logo with a graphics program and save it
as tiff file.
·
From editor run the program RSTXLDMC.
Parameters to be passed are
·
File name
·
File type
·
BMON – For a black and white image.
·
BCOL – For a color image.
·
Text name – The standard text in layout set
This text can be included in a
layout set by including . Using PCL – 5 printers, can also print the logo. In R3, the printer types are IIPLJIIID, IIPLJ4,
LX4039 and SM120XXS.
Control
Commands
About control commands:
All script control commands
are entered in the SAP Script editor.
·
All commands are indicated by /: in the
tag column
·
Only one control command is allowed per line
·
Lines with control commands are not affected by
the editor formatting
·
If control command is unknown or incorrect, command line is treated as comment line
ADDRESS: This command formats and address
according to the postal standards of the country.
/: Address
/: Title
‘Company’
/: Name
‘Intelligroup’
/: Street ‘115’
/: P.O. BOX
` `
/: Postcode
/: City
/: Region
/: Country
/: End Address
BOTTOM-ENDBOTTOM: For the Main window you can
determine lines, which are always
output automatically at the bottom of that window. This is called footer text.
Syntax:
/: Bottom
/: endbottom
BOX, POSITION, & SIZE: These
commands are used for drawing boxes and are used only during creating output.
Syntax:
/: box [Xpos]
[Ypos] [Width] [Height] [Frame] [Intensive]
X & Y –
Upper left corner of the box.
Width – Width
of the box
Ht – Height of
the box
Frame –
Thickness of the box (Default is full black)
Ex., /: BOX WIDTH ‘20’ CM HEIGHT 1 IN
FRAME
10 TW INTENSIFY 15.
Syntax:
/: Position [X Origin] [Y Origin]
[Window] [Page]
X & Y - Sets
the origin for x 7 y parameters for the box command.
Window - Sets
the default values for the left and upper edges.
Pages - Sets
the values for the left and upper edges of the current page.
Basically used
to set default setting for the box command.
/: Position x
Origin ‘1.5’ cm y origin ‘1’ cm
Syntax:
/:
Size [Width] [Height] [Window]
[pAGE]
Sets width and height parameters
for the box command.
Syntax:
/: CASE SYMBOL
/: WHEN 1
/: WHEN 2
/: WHEN OTHERS
/: ENDCASE
Syntax:
/: define &
symbol & = ‘xxxx’
IF: With IF command you can define the
lines that are output only under certain conditions.
Syntax:
/: IF &var& = ‘char val’
/: ENDIF
INCLUDE: Contents of another text can be
included in text by INCLUDE command. The contents are copied only at the time
of the output formatting. You can also specify language and the paragraph
irrespective of the language in which the calling text is created. The language
which is used in include test is used for output.
Syntax:
/: INCLUDE MYTEXT
NEW–PAGE:
SAP Script automatically carries out a page break if window MAIN
of one page is filled with NEW-PAGE command. You can face page break at any
point. The current page is completed and the text in the following line is
written on new page. If no name is defined,
then, the next page attributes from
page setup is taken.
Syntax:
/: NEW – PAGE
[PAGE-NAME]
NEW–WINDOW:
You can have 99 MAIN windows on one page. If MAIN window is filled, then the next MAIN window is accessed
automatically. With NEW-WINDOW command,
you can call next main window even if the current MAIN window is not yet
completely filled.
Syntax:
/: PROTECT
/: ENDPROTECT
Syntax:
/: SET COUNTRY
SET DATE MASK: Standard
display of date can be changed
Syntax:
e.g. SET DATE
MASK = ‘MM DDDD (Day in full) yyyy’
/: SET DATE
MASK = ‘ ‘
Syntax:
/: SET TIME
MASK = ‘HH:MM’.
TOP-ENDTOP:
For main window, you can
determine lines, which are always
O/P automatically at the top of the window.
No comments:
Post a Comment