Professional Documents
Culture Documents
4 SAP Script
4 SAP Script
SAP Scripts I
Agenda
About Forms Header Page Layout
Windows Pages Page Windows
Different Forms
Form 1
Invoice
Form 2
Document
Form 3
Dear
Processing Sequence
Application transaction
Print program
Composer
Invoice
SAP Script
A form of the graphical Form Painter consists of Header data Page layout Paragraph format Character format Documentation
SE71
Basic settings
Set up page Default values fortext formatting
Set uppage
Page format First page Orientation Portrait format Landscape format Lines/inch Characters/inch
Spool
Font maintenance
Form definition
alphanumeric
Header data Windows Pages
Form Painter
Header data
graphical
Layout
Page windows Paragraph formats Character formats Paragraph formats Character formats
Pages Windows
Window Types
Windows
Date
Sender Adressee
Const Window
SAP AG 1999
Page Windows
Window names are linked to page names. The position and size of the window on the assigned page should be specified
Left margin Upper margin Window width Window height
Topedge Topedge Left edge
Page window
Height
Width
Page
Form:
Page windows
Sender
Date
Adressee
Page 2 Page 1
Footer
Pages
Define at least one page for every form Designate a "first" page in the form header Inform the system which page is to be used after reaching the end of the first page
Pages - Attributes
Mode INC Increases the counter by 1 HOLD Counter remains unchanged START Sets the counter to 1 NUMBERING TYPES ARABICArabic numerals CHAR Fixed character LETTERLetters ROMAN Roman numerals Papertray choice
S S D D T T
Simplex mode Simplex mode Duplex mode Duplex mode Tumble mode Tumble mode
Character formats
Allows to format entire blocks of text within a paragraph Character attribute groups can be:
Font Standard
Font attributes - attributes such as font family, size, bold, italic etc. Standard attributes
Marker Bar code Protected Hidden Superscript/subscript
Paragraph formats
In SAPScript, paragraphs are formatted using formats and their corresponding attributes Helps simplifying the text processing
Attributes
Standard Font Tabs Outline
Paragraph formats
Standard attributes
Description Left or right margin Indent first line Space before and space after Alignment Line spacing No blank lines Page protection Next paragraph same page
Standard attributes Paragraph Left margin HD 1.00 Description CM CM CM CM Alignment Line spacing Header 1 LEFT 1.00 LN
Alignment: Alignment:
BLOCK justified BLOCK justified CENTER centered CENTER centered LEFT LEFT aligned left aligned left RIGHT aligned right RIGHT aligned right
Right margin 1.50 Indent 1st line 2.00 Space before Space after 1.50
No blank lines Page protection Next paragraph same page Right margin Space after Space before
Left margin
Indentation Window
Paragraph formats
Font attributes - attributes such as font family, size, bold, italic etc.
Outline - Outline, outline level, Number margin, left/right delimiter, Number chaining, character string, Numbering type.
Left margin
Dear Mr. Smythe . ,
Right margin
Window
WINDOW2*
Window Graphic Window ADDRESS Description Address Main window Administrative window Default paragraph Left margin 1,60 CM CM CM CM Upper margin 1,60 Window width 9,00 Window height 6,00
MAIN*
Design window
Design / Text
Options
E ditor
E ter lo gtexts n n
Day 4
SAP Scripts II
Agenda
Text Elements Control Commands Symbols System, Program, Standard, Text Function Modules
Text Elements
Text elements are defined for each window. On the Form: choose Edit Text elements. In the layout of a text element, we can use the paragraph and character formats defined in the form. Example /E ITEM_LINE IL &VBDPA-POSNR&,,&VBDPA-MATNR / &'Customerarticlenumber 'VBDPA-IDNKD'
Formatting Addresses /: ADDRESS [DELIVERY] [TYPE t] [PARAGRAPH a] [PRIORITY p] [LINES l] /: TITLE title . /: STREET street name HOUSE house number . /: ENDADDRESS
System Symbols
DATE DAY NAME_OF_DAY MONTH NAME_OF_MONTH YEAR TIME HOURS MINUTES SECONDS PAGE NEXTPAGE DEVICE SPACE ULINE VLINE
Date Day Name of day Month Name of month Year Time Hours Minutes Seconds Page number Number of next page Output device Blank space Underline Vertical line
Standard Symbols
Table TTDTG
Text Symbols
DEFINE &symbol& =
value
Program Symbols
KNA1 ABAP
TABLES KNA1. DATA: COUNTRY LIKE ... * Data selection ... * Start of form printing ...
NAME1 PSTLZ ORT01 STRAS Jane Smith 80801 Capital City, CA 81 Third Ave
Form
Programm symbols Program symbols Symbol definition Symbol definition Print programfor form Print programs for formDescription Print programm Print report RIPRAT01 RIPRAT01 ..... DDIC fields Short description ..... ..... Global data .....
Symbol definition REPORT riprat01. TABLES: spfli, sflight, ... DATA: sums LIKE ...
Form :
RVINVOICE01
W indow: FOOTER
/: SET TIME MASK = ......... /: SET DATE MASK = ........ /: SET COUNTRY ........
Example : /: SET TIME MASK = HH : MM /: SET DATE MASK = DD.MMMM YYYY /: SET COUNTRY US
W indow1 [/ : POSITION W INDO W] [/ : SIZE W IDTH 2 CMHEIGHT +40 TW ] / : BOX FRA 10 TW ME W indow2 / : BOX INTENSITY 10
W indow2
W indow3
ABAP Dictionary
REPORT <prog>. FORM <form> TABLES in_tab STRUCTURE itcsy out_tab STRUCTURE itcsy. ... ENDFORM. ABAP report
Print program
report jh_form_01.
Application
DB
data
tables: scustom. select * from scustom... ...... call function 'OPEN_FORM' ...... call function 'START_FORM' ...... call function 'WRITE_FORM' ......
Composer
Price 200.150.50.300.700.-
Main Windows
TOP
BODY
MAIN
BOTTOM
Art.No. 00345
Price 200.-
Price 200.150.-
MAIN
CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = ... FUNCTION = 'APPEND' WINDOW = 'INFO' EXCEPTIONS ... = ...
INFO INFOTEXT1
Price 200.150.50.300.700.-
Price 200.150.50.300.700.-
. . . . +. . . . 1. . . . +. . . . 2. . . . +. . . . 3. . . . +. . . . 4. . . . +. . . . 5. . . . +. . . . 6. . . . +
This is an outline: => First level => Second level => Third level
F4
G2 G3
Thank You