Chapter 02 sap script forms

25
SAPScript Forms Dec-2008 SAPScript Forms |

description

 

Transcript of Chapter 02 sap script forms

Page 1: Chapter 02 sap script forms

SAPScript Forms

Dec-2008 SAPScript Forms |

Page 2: Chapter 02 sap script forms

Objectives

• The participants will :– Recognize SAPScript Forms– Classify different components of a SAPScript form

like Header, Paragraph formats, Windows, Page Windows, Pages, Character formats etc.

– Apply the Graphical Form Painter.– Employ the SAPScript Editor.

Dec-2008 SAPScript Forms | 2

Page 3: Chapter 02 sap script forms

Some facts about SAPScript Forms• Client specific (client-dependent)• Language specific• Can be translated using the standard SAP

translation tools• Note: If the SAPScript form is not available in the

client in which the document is being printed, then the SAPScript checks for the style or layout set in client 000.

• Recommendation: Keep only one copy of the SAPScript form in client 000.

Dec-2008 SAPScript Forms | 3

Page 4: Chapter 02 sap script forms

Transaction SE71

4 Dec-2008SAPScript Forms |

To create a new SAP Script form or change/display an existing SAP Script form or to copy a standard SAP Script Form, transaction SE71 is used.

To create a new SAPScript Form or to change/display an existing SAPScriptForm or to copy a standard SAPScript Form, transaction SE71 is used.

Copy from client

Page 5: Chapter 02 sap script forms

Transaction SE71 (Contd.)

5 Dec-2008SAPScript Forms |

To create a new SAP Script form or change/display an existing SAP Script form or to copy a standard SAP Script Form, transaction SE71 is used.

To create a new SAPScript Form or to change/display an existing SAPScriptForm or to copy a standard SAPScript Form, transaction SE71 is used.

Copy from client

Page 6: Chapter 02 sap script forms

Header Screen - Administrative Data

Dec-2008 SAPScript Forms | 6

Administrative data:Under Administrative data, Administration information and language attributes are displayed. Under Administration information, form name, description, form status (Active/ Inactive), Package name, client no, creation date, created by, last change date, last changed by etc are displayed. Under Language attributes, login language , original language and language translation options are displayed.

Page 7: Chapter 02 sap script forms

Header Screen - Basic settings

Dec-2008 SAPScript Forms | 7

Basic settings:Under Setup page options, page format(A4 etc.), Orientation, (Line/inch, Characters/inch) and First Page are displayed. The Lines/inch & Character/inch properties are not usually altered. Under Default values for Text formatting options default paragraph ,default tab size, default font family, default font size, etc are displayed.

Page 8: Chapter 02 sap script forms

Pages

Dec-2008 SAPScript Forms | 8

This screen shows the details of all the pages in the form.

The form will always have a first page and may have a next page.

The ‘Mode’ is for the page numbering mode of the form. This can be set to any one of INC,START,HOLD.

The ‘Numbering type’ determines the numbering style for the outline and page numbers.

Page 9: Chapter 02 sap script forms

Windows

Dec-2008 SAPScript Forms | 9

This screen displays all the windows that are used in the form.

Each section of the SAPScript form is written in a window.

Window types are MAIN,VAR,CONST,GRAPH.

All forms will have a MAIN window.If all the data does not fit into one page, printing will continue on the MAIN window of the next page.

Page 10: Chapter 02 sap script forms

Paragraphs - Standard Attributes

Dec-2008 SAPScript Forms | 10

Contains all necessary information needed to format a paragraph of text.

The first column in this screen displays the code for the paragraphs.

The second column displays the descriptions.

The third column displays the alignments.

The fourth and fifth column displays the Left and Right margin.

Details can be changed at the bottom of the screen.

Page 11: Chapter 02 sap script forms

Paragraphs - Font Attributes

Dec-2008 SAPScript Forms | 11

Clicking on the ‘Font’ button at the bottom right of the page will bring this screen.

The Font Attributes part enables one to choose the font and size of the paragraph.

One can also make the font bold, italic or underlined.

If no font is specified , then the default font from the layout set header will be used.

Page 12: Chapter 02 sap script forms

Paragraphs - Tabs

Dec-2008 SAPScript Forms | 12

Clicking on the ‘Tabs’ button at the bottom right of the page will bring this screen.

The tabs section is very useful while outputting a table on the document.

Specifying a list of tabs is the way to create columns for outputting line items of a document.

Tabs can be entered as MM , CM , CH etc. and can also be LEFT , RIGHT , CENTER, DECIMAL, SIGN aligned.

Page 13: Chapter 02 sap script forms

Paragraphs - Online Attributes

Dec-2008 SAPScript Forms | 13

Clicking on the ‘Outline’ button at the bottom right of the page will bring this screen.

The ‘Outline’ field is used to determine the hierarchy of the paragraph format.

In the ‘Outline level’ field, enter the level of the hierarchy that you want the paragraph format to be of.

Page 14: Chapter 02 sap script forms

Character Formats - Standard Attributes

Dec-2008 SAPScript Forms | 14

A default character style is specified at the paragraph level.

Can be used within paragraph to override the default settings for a few words within the paragraph.

Page 15: Chapter 02 sap script forms

Character Formats - Font Attributes

Dec-2008 SAPScript Forms | 15

Clicking on the ‘Font’ button will bring this screen.

Here one can enter the Font Family, Font Size, and characteristics such as bold, underlined etc.

If the ‘Family’ and ‘Font size’ fields are left blank then the character format takes the characteristic of the paragraph font that the text/code is written in.

Page 16: Chapter 02 sap script forms

Page Windows

Dec-2008 SAPScript Forms | 16

List of all the windows for a particular page with coordinates.

The coordinates are given by the upper left-hand corner and the width and length.

A window which should appear on a page must first be defined under ”Windows” and then be added to the page windows.

To see the windows defined for the next page, select the appropriate page and click the ‘Enter’ button.

Page 17: Chapter 02 sap script forms

Graphical Form Painter

Dec-2008 SAPScript Forms | 17

Use the menu path Settings -> Form painter to get the graphical form painter.

This will display a page of the form with the windows laid out.

When a particular window is selected, it becomes active in the graphical editor. Then it is possible to drag and drop the window or drag the window into the desired shape.

Page 18: Chapter 02 sap script forms

Adding code to the windows

Dec-2008 SAPScript Forms | 18

To add code to a window double click on the window in the page window section.Then click on the Text Elements button or click F9.

There are two editors. Use the menu path Goto -> Change editor to change between them. The second editor is shown here.

A window can contain hard-coded texts and the variables to be printed in the window.

Page 19: Chapter 02 sap script forms

Adding code to the windows (Contd.)

Dec-2008 SAPScript Forms | 19

Tag column: Specifies format of the text

Text line column: Contains the actual content of the window.

Standard Tags * Default paragraph /: Command line /* Comment line /E Text element

Page 20: Chapter 02 sap script forms

SAP Script Utilities - Upload/Download

• SAP Scripts are client-dependent objects. Hence, they may often require to be downloaded from or uploaded to SAP system. Following programs can be used to download from or upload to the SAP System– RSTXR3TR – To EXPORT/IMPORT a layout set (FORM)

using a Transport Request (CTS)– RSTXSCRP – To EXPORT/IMPORT a layout set (FORM),

Style, Standard Text or Device Type without using a Transport Request

Dec-2008 SAPScript Forms | 20

Page 21: Chapter 02 sap script forms

SAP Script Utilities - Assignment of Standard text to CTS

• Creation of a SAP Script Standard Text does not require a CTS

• Standard Text can be assigned to a CTS using program RSTXTRAN

Dec-2008 SAPScript Forms | 21

Page 22: Chapter 02 sap script forms

Demonstration• Creating a SAPScript using transaction SE71 to print a form

containing flight booking confirmation for a customer.• Creating 4 windows the layout set in a single page:

• MAIN Window ( Containing Flight Booking Details )• Address Window ( Containing address of the customer )• Header Window ( Containing the date and the logo of the concerned

airline )• Signature Window ( Containing the name of the flight booking officer )

• Testing the Form using the menu path Utilities -> Printing Test in transaction SE71.

Dec-2008 SAPScript Forms | 22

Page 23: Chapter 02 sap script forms

Practice• Creating a SAPScript using transaction SE71 to print a form

containing flight booking confirmation for a customer.• Creating 4 windows the layout set in a single page:

• MAIN Window ( Containing Flight Booking Details )• Address Window ( Containing address of the customer )• Header Window ( Containing the date and the logo of the concerned

airline )• Signature Window ( Containing the name of the flight booking officer )

• Testing the Form using the menu path Utilities -> Printing Test in transaction SE71.

Dec-2008 SAPScript Forms | 23

Page 24: Chapter 02 sap script forms

Summary• SAPScripts are client-dependant, language specific and can be translated using

the standard SAP translation tools.• Custom SAPScripts can be created using transaction SE71. The name of the

custom form starts with a ‘Y’ or ‘Z’.• A form can consist of multiple pages and a page can consist of multiple windows.• There are four types of windows : MAIN, VAR, CONST and GRAPH.• Paragraphs contain all necessary information needed to format a paragraph of

text. This is where all the text styles are determined.• Character formats contain all necessary information needed to format a string of

characters within a paragraph.• Page Windows contain a list of all the windows for a particular page with

coordinates.• Code can be added to the windows to display content dynamically in the form.• Programs RSTXR3TR and RSTXSCRP are used to upload or download SAPScripts to

or from the SAP system.

Dec-2008 SAPScript Forms | 24

Page 25: Chapter 02 sap script forms

Questions• Are SAPScripts client-dependent or client independent ?• What are the different window types in a layout set ?• Where are text styles determined in a form ?• What is the menu path to start the graphical form painter ?• What program is used to export/import a layout set using a

transport request ?• What program is used to export/import a layout set

without using a transport request ?• How can standard text created in the SAP R/3 system be

assigned to a CTS ?

Dec-2008 SAPScript Forms | 25