P. 1
BC460 SAPscript Form Printing and Text Management

BC460 SAPscript Form Printing and Text Management

|Views: 992|Likes:
Published by Carlos Anaya Torres

More info:

Published by: Carlos Anaya Torres on Jan 31, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/01/2013

pdf

text

original

BC460 SAPscript Formulardruck und Textmanagement

BC460
SAPscript: Form Printing and Text Management
© SAP AG 2001 © SAP AG

R/3 System Release 4.6C November 2000 5004 2180

© SAP AG

BC460

1-1

Copyright

Copyright 2001 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. All rights reserved.

© SAP AG 2001

Trademarks: Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® are registered trademarks of Microsoft Corporation. IBM®, DB2®, OS/2®, DB2/6000®, Parallel Sysplex®, MVS/ESA®, RS/6000®, AIX®, S/390®, AS/400®, OS/390®, and OS/400® are registered trademarks of IBM Corporation. ORACLE® is a registered trademark of ORACLE Corporation. INFORMIX®-OnLine for SAP and INFORMIX® Dynamic ServerTM are registered trademarks of Informix Software Incorporated. UNIX®, X/Open®, OSF/1®, and Motif® are registered trademarks of the Open Group. HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. JAVA® is a registered trademark of Sun Microsystems, Inc. JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. SAP, SAP Logo, R/2, RIVA, R/3, ABAP, SAP ArchiveLink, SAP Business Workflow, WebFlow, SAP EarlyWatch, BAPI, SAPPHIRE, Management Cockpit, mySAP.com Logo and mySAP.com are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other products mentioned are trademarks or registered trademarks of their respective companies.

© SAP AG

BC460

1-2

ABAP Workbench
Level 2
3 days BC402 ABAP Programming Techniques 3 days BC404 ABAP Objects: Object Oriented Programming in R/3 BC405 3 days Techniques of List Processing and InfoSet Query BC410 Programming User Dialogs BC400 5 days ABAP Workbench: Foundations and Concepts MBC40 2 days BC420 Data Transfer BC430 ABAP Dictionary 5 days

Level 3
BC414 3 days Programming Database Updates 2 days BC415 Communication Interfaces in ABAP BC425 3 days Enhancements and Modifications BC412 3 days Dialog Programming using EnjoySAP Controls BC490 3 days ABAP Performance Tuning

5 days 2 days

Managing ABAP Developments Projects

BC460 3 days SAPscript: Forms Design and Text Management BC470 2 days Form Printing Using SAP Smart Forms CA610 (Rel. 4.0) 2 days CATT:Test Workbench and Computer Aided Test Tool

Recommended supplementary courses are: Business Process Technologies CA925, CA926, CA927 BC095 (Business Integ. Techn.) BC619 (ALE), BC620, BC621

© SAP AG 2001

© SAP AG

BC460

1-3

ITS
Level 2 Level 2 Level 3 Level 3

BC400 5 days ABAP Workbench: Foundation and Concepts

ITS100 2 days Developing EasyWebTransactions

ITS050 3 days SAP Internet Transaction Server: Foundations

2 days ITS110 Developing Web Scenarios and MiniApps using ITS Flow Logic 2 days

ITS150

Corporate Identity Design ITS070 2 days SAP Internet Transaction Server: Administration
© SAP AG 2001

© SAP AG

BC460

1-4

knowledge from the following training course is necessary: BC 400 ABAP Workbench Basics © SAP AG 2001 © SAP AG BC460 1-5 .Prerequisites To take part in this course.

Target Group Participants: Project team Employees responsible for data processing Employees responsible for organization Duration: 3 days © SAP AG 2001 Hints to the user: These training documents are not meant to be used without corresponding classroom instruction.They are only complete when used in tandem with the comments of an SAP trainer. Space is provided for you in the course documents to note this additional information. © SAP AG BC460 1-6 .

Introduction: Contents Course goal Objectives Course content Course overview diagram Main business scenario Course introduction © SAP AG 2001 © SAP AG BC460 1-7 .

Course Goal This course will enable you to: Understand form printing in the context of the SAP R/3 System Make changes to SAP standard forms and SAP print programs Transport SAPscript objects © SAP AG 2001 © SAP AG BC460 1-8 .

Objectives To maintain forms using SAPscript tools To use SAPscript control statements and symbols To control print output using print programs To be able to change print programs and forms in the R/3 System To use font maintenance in the R/3 system © SAP AG 2001 © SAP AG BC460 1-9 .

Course Content Preface Unit 1 Unit 2 Unit 3 Unit 4 Unit 5 Introduction SAPscript Overview Form Elements The PC Editor and the Line Editor Symbols and Control Commands Unit 6 Unit 7 Unit 8 Unit 9 Unit10 The Print Program Styles The Next Generation Modifications Font Maintenance You find the exercises and solutions at the end of each unit Appendix © SAP AG 2001 © SAP AG BC460 1-10 .

stored in the system 8 6 Adjust printer output to form Invoice © SAP AG 2001 © SAP AG BC460 1-11 .Course Overview Diagram Adapt forms Invoice Maintain form elements Create and control texts 3 4 5 7 R/3 Newly created form.

Main Business Scenario All course participants will be responsible for performing print control actions on a changed form: Changing the layout of a form Changing the text of a form Creating a print program and controlling the text output sequence Understanding change scenarios in the R/3 System © SAP AG 2001 © SAP AG BC460 1-12 .

SAPscript Overview Contents: SAPscript in the R/3 System The purpose of SAPscript SAPscript components Forms and the print program The processing sequence © SAP AG 2001 © SAP AG BC460 1-13 .

in particular the print program and forms © SAP AG 2001 © SAP AG BC460 1-14 .Objectives At the end of this unit you: Have an insight into the overall structure of SAPscript See how SAPscript is integrated into the R/3 System Know the components of SAPscript Have an understanding of how SAPscript components interact.

checks. reminders. Form printing is usually a matter of large print runs of documents such as pay slips. Large quantities of these documents may have to be produced. delivery notes. The basic layout of the document is pre-defined. . invoices.. and so forth. but in many cases. such as address data or purchase order items. order confirmations. © SAP AG BC460 1-15 . or retrieved from a database table. other data has to be merged with it.) all the time. This data might be entered manually by an employee. These documents are often created automatically.The Purpose of SAPscript Mail • Entering text • Printing using forms Invoice © SAP AG 2001 Every company needs to routinely output documents with a uniformly defined layout (for example..

production planning.. online documentation.SAPscript in the R/3 System Material Material management Management MM Human resources management HR Sales and Distribution SD Production planning SAPscript: Form printing and text management Controlling CO Financial accounting FI Customer Applications .. © SAP AG BC460 1-16 . sales and distribution..). It is an integrated tool for text entry and form printing in many R/3 applications (accounting. . PP © SAP AG 2001 SAPscript has been developed to meet the above requirements..

Form printing allows for different address layouts based on country and for simultaneous use of multiple currencies. SAPscript can be run on all front-ends supported by SAP. SAPscript supports a unified design in all documents. Editor interfaces provide you with various necessary functions according to application.SAPscript: Benefits Multilingual capability High performance when printing in large quantities Uniform corporate design in documents Word processing scalability R/3 transport and translation connections Platform independence © SAP AG 2001 The PC editor supports Asian languages among other things. © SAP AG BC460 1-17 .

SAPscript from a User's Point of View User Application transactions Maintenance transactions Text editor Layout (forms. You can generate documents automatically from an ABAP program using the SAPscript programming interface. styles) Database ABAP Workbench Programming interface Composer © SAP AG 2001 A document's layout is defined in a form. Most SAPscript users only come in contact with the Editor. These can be stored centrally in the database. The Editor is used in various applications for entering texts such as letters. © SAP AG BC460 1-18 . Text modules are entered using the SAPscript Editor.

Forms Form 1 Invoice Form 2 Document Form 3 Dear. © SAP AG 2001 A form specifies the appearance and structure of a document. To make changes to your documents. © SAP AG BC460 1-19 . you only need to change the form.. such as moving a piece of text. To create your own forms. you can copy and customize existing forms. You can use these text modules for different applications. paragraph formats. To edit forms. choose Tools -> SAPscript -> Form from the main R/3 menu. or changing fonts. Every SAPscript document uses a form.. and tabs. Forms contain predefined text modules with space reserved for variable data.

whether to print immediately. their sequence.selects a form and controls which texts should be printed.The Print Program Form 1 SAP DB Form 3 Form 2 Application transaction Print program © SAP AG 2001 The print program . and their frequency. number of copies. . screen or fax. .determines the printer attributes such as output device.selects data from the database or from user input. .controls the actual text output to the printer. and so on © SAP AG BC460 1-20 .

If the documents contain variables. or with the user data selected by the print program. The print program controls the completion of the form. Once this is done. The documents are formatted according to this layout information. The SAPscript print program initializes the printing process. The composer receives layout information from the form specified in the print program. © SAP AG BC460 Invoice 1-21 . the composer replaces these variables with data from the R/3 system. such as the current date.Processing Sequence: The Composer SAP DB Form Document Invoice Application transaction Print program Composer © SAP AG 2001 The final appearance of your document depends on the interaction between your print program and its form. Every command entered using the SAPscript programming interface is transferred to the composer. the composer places the completed document in the spool.

© SAP AG 2001 © SAP AG BC460 1-22 . especially print program and form. Understand how the components interact.Overview: Summary of the Unit You can now: Position SAPscript in the overall structure of R/3 applications. Name the components of SAPscript. Describe how SAPscript is integrated into R/3.

Form Elements Contents: Windows and pages Paragraph formats Character formats Layout of forms © SAP AG 2001 © SAP AG BC460 1-23 .

Form elements: Objectives At the end of this unit you can: Describe the elements SAPscript offers to lay out a form Create and change form elements in R/3 © SAP AG 2001 © SAP AG BC460 1-24 .

80 USD Page 1 © SAP AG 2001 Page 2 A typical form contains the following details . booking data).. Thank you for your booking.Sender . 145 Apple Valley Ln.00 USD AZ 0790 11/30/99 6:55 1644.00 USD Yours faithfully . Often the texts and data spread over several pages in a form. PA 10101 Fliegen 19078 Turnaround Inc.00 USD AA 2017 12/21/99 21:55 799. Ithaca. NY 14850 Flight Date Depart Price 11/22/99 ----------------------------------LH 0400 12/29/99 6:07 398.Example: Booking Confirmation Fly Smile Fly &&Smile 45 Pears Road Zeppelinstr. We are pleased to confirm the following flights: Flight Date Depart Price ----------------------------------AA 0017 11/24/99 13:15 799. 4 Pittsburg. Dear Sir or Madam.Body copy .Business transaction data (for example..Address .80 USD LH 0003 12/31/99 15:06 990. © SAP AG BC460 1-25 .00 USD LH 0400 12/28/99 6:07 398.

Structuring Pages Using Windows Pages Windows © SAP AG 2001 The various output areas found on a form page are called windows. You can organize texts within your windows using text elements and paragraphs. © SAP AG BC460 1-26 .

00 USD Paragraphs © SAP AG 2001 Various paragraph and character formats provide you with additional ways to structure the texts that you create.Elements for Structuring Texts Fly & Smile 4 Truckee Way Durango. 145 Apple Valley Ln. © SAP AG BC460 1-27 . Depart Price 13:15 799.00 USD 6:55 1644... NY 14850 07/15/98 Type Dear Sir or Madam. Thank you for your booking. Ithaca. We are pleased to confirm the following flights: Flight Date AA 0017 07/20/98 AZ 0790 11/11/98 Yours faithfully . CO 85650 Turnaround Inc.

Forms: Elements Form Page layout Paragraph formats Character formats © SAP AG 2001 The following sub-objects allow you to structure forms in SAPscript: .Paragraph formats .Page layout .Character formats Use the Form Painter to edit the individual sub-objects of a form. © SAP AG BC460 1-28 .

A specific page format is defined for each form (for example. You determine the page sequence of a document by simply entering the page that follows the one you are currently on. You must always enter a starting page in a form's header data.Forms: Pages Page format Page format Page format Static page sequence Static page sequence Static page sequence Page 1 Page 2 DIN A4 LETTER Next page Horizontal DIN A5 © SAP AG 2001 Next page A form can have one or more pages. LETTER or DIN A4). © SAP AG BC460 1-29 . SAPscript allows for automatic page numbering.

© SAP AG BC460 1-30 . output addresses or detail items are called windows. Thank you for your booking.80 USD USD USD USD Page 1 © SAP AG 2001 The output areas on a form page that might.00 6:07 387. 145 Apple Valley Ln. We are pleased to confirm the following flights: Flight AA 0017 AZ 0790 LH 0400 LH 0400 Date 07/20/98 11/11/98 07/21/98 07/28/98 Depart Price 13:15 799. NY 14850 07/15/98 Form: Windows Dear Sir or Madam.00 6:55 1644. CO 85650 Turnaround Inc.Structuring Pages Using Windows Template Fly & Smile 4 Truckee Way Durango. for example.80 6:07 398. Ithaca.

Windows and Page Windows Windows Date Form: Page windows Sender Adressee Window with body text Page 2 Page 1 Footer © SAP AG 2001 Windows can appear on numerous pages within a single form. Texts that appear in page windows are defined for an entire form using that form's corresponding logical window. © SAP AG BC460 1-31 . The user determines the placement of page windows on each page by entering their size and position. Therefore SAPscript differentiates between logical windows and physical page windows. A window can have a different size and position on different pages.

These windows behave in the same way as type VAR windows. © SAP AG BC460 1-32 . The text entered in their corresponding logical windows will.Window Types Windows Date Sender Adressee Window type: VAR Window with body text Window type: MAIN Footer Window type: VAR © SAP AG 2001 Their are two different types of windows in SAPscript: .VAR Windows of type MAIN are used to display text that goes on for multiple pages. Windows of type VAR may vary in size and position for each page that they appear on. however.0 windows of type CONST still exist. In Releases < 4.MAIN . always be displayed on each page where the window occurs. Any text that cannot be fully displayed due to the size of the window is lost.

00 USD Turnaround Inc.. © SAP AG BC460 1-33 . SAPscript continues outputting body text in the main window on the next page. always have the same width. Ithaca. texts of variable length are displayed.80 USD LH 0003 08/16/98 15:06 990.00 6:07 398.. Dear Sir or Madam. NY 14850 Yours faithfully .80 USD USD USD USD Page 2 Page 1 © SAP AG 2001 In main windows. however.Main Window Fly & Smile 4 Truckee Way Durango.00 6:55 1644. Main windows can have different heights and be positioned differently on pages where they appear. 145 Apple Valley Ln.00 21:55 799. they must. Whenever the output area of one page is filled. for example all bookings of a specific customer. CO 85650 7/15/98 Flight Date Depart Price ----------------------------------LH 0400 07/28/98 6:07 398. We are pleased to confirm the following flights: Flight AA 0017 AZ 0790 AA 2017 LH 0400 Date 07/20/98 11/11/98 12/21/98 12/28/98 Depart Price 13:15 799. Thank you for your booking.

Defining Page Windows Top edge Left edge Page window Height Width Page © SAP AG 2001 All forms have pre-determined page formats (for example LETTER or DIN A4). The position of a page window is indicated by its distance from the top and the left-hand edges of the page. © SAP AG BC460 1-34 . A page window's size is determined by its height and width. Both position and size can be given in various units of measure (for example in lines or in characters).

First line indentation .Tabs .Vertical spacing: before and after .Left margin/right margin . Paragraph formats define: .Paragraph alignment (such as left or centered) .Fonts .Outline options © SAP AG BC460 1-35 . Right margin Space after Space before Indent Thank you for your reservation.Paragraph Formats: Metric Sizes Left margin Dear Mr.Line spacing . We are pleased to confirm the following bookings: Window © SAP AG 2001 You can modify the appearance of text in SAPscript by changing its paragraph and character formats. Smythe.

00 USD Times.Bold/italics .Font . 16 point Turnaround Inc.00 USD AZ 0790 11/11/98 6:55 1644. bold point. 145 Apple Valley Ln. Page 1 © SAP AG 2001 You can define the following character format attributes: . Thank you for your booking. italic.Character Formats Fly & Smile 4 Truckee Way Durango. Bold. We are pleased to confirm the following flights: Flight Date Depart Price AA 0017 07/20/98 13:15 799. italic. 14 point. CO 85650 07/15/1998 Bold.Font size . NY 14850 Dear Sir or Madam. Ithaca.Underlining © SAP AG BC460 1-36 .

Editing Forms
Form Edit Goto Utilities Settings Environment System Help

Form Painter: Request

Form Language

S_BC460_DEMO_1 DE

Create

Subobjects
Header Page layout Paragraph formats Character formats Documentation

Display

Change

© SAP AG 2001

To edit forms, choose Tools -> Form printout ->SAPscript -> Form. Choose F4 at the form name field to display a list of all existing forms. You can edit the individual subobjects of a form directly: - Header - Page layout - Paragraph formats - Character formats - Documentation

© SAP AG

BC460

1-37

Editing Forms: The Form Painter

alphanumeric
Header data Windows Pages

Form Painter
Header data

graphical

Layout

Page windows Paragraph formats Character formats Paragraph formats Character formats

© SAP AG 2001

From Release 4.0 a new Form Painter with graphical interface is available for more intuitive and faster form creation. You can also keep using the alphanumeric Form Painter, if you so desire. All form creation functions are still available in the alphanumeric Form Painter. In the maintenance transaction of the graphical Form Painter the 'Windows', 'Pages', and 'Page windows' components from the alphanumeric Form Painter have been consolidated into a single component called 'Layout'. Note: The graphical Form Painter is available from Release 4.0 for front-ends with either a Windows NT 4.0 or Windows 95 operating system. Otherwise you are working with the alphanumeric Form Painter.

© SAP AG

BC460

1-38

Form Painter: Maintenance Screen Structure

Form element
List of elements Element 1 Element 2 ...

Element selected

List of attributes: Element 2 Attribute 1 Attribute 2 ...

© SAP AG 2001

The Form Painter maintenance screen is organized as follows: - Element types - Lists of elements - Lists of attributes for example, a page for example, a list of the windows for this page for example, a list of attributes for each window such as position,size, and window type

© SAP AG

BC460

1-39

Sub-Object Header Data

Header data Header data Page layout Page layout Paragraph formats Paragraph formats Character formats Character formats Documentation Documentation

© SAP AG 2001

© SAP AG

BC460

1-40

bold. italic. .A default value for tabs . or underlined) When creating a new form.A short text describing the form . you should always assign a description of what your form is to be used for.Header Data: Organization Header data Header data Administrative data Administration information Language attributes Basic settings Set up page Default values for text formatting © SAP AG 2001 You must enter the following items in each form's header data: .Page size (page format and orientation) . If you use the units CH (character) or LN (line). . font size. measurements are automatically converted to LPI (lines per inch) or CPI (characters per inch).A first page (page attributes are defined using the Layout function in the graphical Form Painter and the Pages function in the alphanumeric Form Painter) . © SAP AG BC460 1-41 .Font attributes (such as font.A default paragraph format (the format's attributes can be edited using the Paragraph formats function).Line spacing (LPI) and character spacing (CPI): Form attributes such as tab stops or line spacing can be defined using more than one kind of unit.

Author.New: the form has just been created and is not yet ready to be printed.Header Data: Administrative Data Administrative data Administration info. To undo any unwanted changes you have made to a form. However. client. To set the status of a form to active.Not saved Active Revised . choose Form -> Activate..Revised: forms that have been revised and saved are given the status revised. © SAP AG BC460 1-42 . . Language attributes Language key Original language Translate to all languages to individual languages do not translate Classification Development class Client number Creation/ Change info Date. or the date on which it was last changed. Form (name) Description Status New . Release © SAP AG 2001 Administrative information such as a form's name. and language.Saved . choose Utilities -> Reset.Active: the form is ready to be printed. A form can have the following statuses: .. . R/3 continues to use the 'Active' version of the form. is displayed under 'Administrative data'. whenever you print.

If no default paragraph has been specified in the window's attributes. default paragraph. and font size can be made under 'Basic settings'. Header data settings only take effect if no other settings have been made for that component. the system automatically uses the default paragraph set in the header data. Example: You want to use a default paragraph in a particular window. page format. Both the first page setting and the default paragraph setting are mandatory and must be maintained by the user. tab stops. font family. © SAP AG BC460 1-43 .Header Data: Basic Settings Basic Settings Set up page Page format First page Orientation Portrait format Landscape format Lines/inch Characters/inch Spool Default values for text formatting Tab stop Font family Font size Default paragraph Bold Italic Underlined Spacing Thickness Intensity Font maintenance Form definition © SAP AG 2001 Standard settings such as first page.

Sub-Object Page Layout Header data Header data Page layout Page layout Paragraph formats Paragraph formats Character formats Character formats Documentation Documentation © SAP AG 2001 © SAP AG BC460 1-44 .

60 9.Graphical Form Painter: Page Layout Page FIRST Address page Form .00 CM CM CM CM MAIN* Design window Window height 6..60 1. WINDOW1* WINDOW2* Window Graphic Window ADDRESS Description Address Main window Administrative window Default paragraph Left margin Upper margin Window width 1. The most important attributes of the current page and its windows are displayed in the administrative window.. © SAP AG BC460 1-45 .00 Design / Text © SAP AG 2001 Options Page layouts can be edited in both the administrative window and the graphic design window. In the design window. you can determine the size and position of display areas using drag and drop functionality.

.Page Layout: Pages Current page Current page Call: Call: Attributes of Attributes of current page current page Page FIRST Address page Page overview Page overview Next page Next page Create Create Delete Delete Window Graphic Rename Copy Rename Copy Start page Start page © SAP AG 2001 Forms can have multiple pages defined for them. and Delete page are made available to you here. Use the Layout function from the initial Form Painter screen to call the graphical Form Painter. If no next page is specified. either in the Edit -> Page. © SAP AG BC460 1-46 . Copy page. then form printing ends with the current page. Standard functions such as Create page.. A document's page sequence is controlled statically by the 'First page' value entered in its header data and by the 'Next page' value entered in its 'Page attributes'. menu or in the form of a pushbutton on the screen itself. Additional attributes can be entered for all those pages found in the list box display. From the 'Page layout' screen you can now define the pages you need.

The print attributes allow you to choose which paper tray you want to use. and 'Print attributes'.or double-sided. 'Page counter'. © SAP AG BC460 1-47 . The counter settings determine whether page numbers should increase. or revert to their initial value.Pages: Attributes Attributes Page Page Description Address page Page Page 1 Next page NEXT Description Address Page Page counter Next page Page 2 Mode counter Page Mode Initialize counter Initialize counter Increase counter Increase counter Keep counter unchanged Non-changing counter Numbering Numbering Numbering type Numbering type Output length Output length Uppercase Upper case Print attributes Print attributes Resource name Resource name Print mode Print mode © SAP AG 2001 Page attributes FIRST NUMBERING TYPES NUMBERING TYPES ARABIC Arabic numerals ARABIC Arabic numerals CHAR CHAR Fixed character Fixed character LETTER Letters LETTER Letters ROMAN Roman numerals ROMAN Roman numerals For example: For example: Output length -> Output length 4 Output length -> Output length 4 ->Page 1:1:0001 Page 1: 0001 ->Page1: 0001 Page 0001 Paper tray choice Paper tray choice One-sided or double-sided One-sided or double-sided printing default printing default S Simplex mode S Simplex mode D Duplex mode D Duplex mode T Tumble mode T Tumble mode Page attributes include 'Next page'. remain the same. as well as whether you want printout to be single.

. Copy window. you can use your mouse to work with windows.60 9. © SAP AG BC460 1-48 . Current Current window window Windows Window ADDRESS Description Address Main window Default paragraph Left margin Upper margin Window width 1. window type.60 1. the Design / Text pushbutton allows you to switch between design mode and text mode in the design window. A number of standard window editing functions are also available on this screen including Create window. and default paragraph are displayed.00 Pushbuttons for Pushbuttons for editing editing Design / Text Options © SAP AG 2001 The 'Window' list box displays a list of all windows found on the current page. In design mode. window size.00 CM CM CM CM Attributes of the Attributes of the page window page window Window height 6. text mode displays the individual window texts. In addition..Page Layout: Windows and Page Windows Page . Delete window and so forth. For each window. important attributes such as position on the page.

You can also choose what size the individual units of your design window grid should be in a unit of measure of your choice.Page Layout: Options Page .00 CM CM CM CM Grid Step width 4..5 0 Unit of measur. you can choose to have your window aligned automatically to the grid.00 Align automatic . In addition..60 1... 10 MM Window height 6. Options Zoom 118% Windows Window ADDRESS 50% 200% Description Address Main window Default paragraph Left margin Upper margin Window width 1. Design / Text Options © SAP AG 2001 The Options pushbutton allows you to zoom in on a specific section of your page.60 9. © SAP AG BC460 1-49 .

Windows and Page Windows: Attributes

Attributes: Windows Window Description Window type ADDRESS Address VAR

Attributes: Page Windows Window Description Window type Left margin Upper margin Window width Window height ADDRESS Address VAR 1.60 1.60 9.00 6.00 CM CM CM CM

Default paragraph BF

1

2

1
ADDRESS

Units of Units of measurement: measurement:
CH CH CM CM MM MM IN IN PT PT TW TW Characters Characters Centimeters Centimeters Millimeters Millimeters Inches Inches Points Points Twips Twips

2
© SAP AG 2001

Windows and page windows are dealt with separately in the alphanumeric Form Painter. You can define logical windows in a form by specifying the name and type of window. To specify the main window, which can contain text extending across more than one page, use MAIN. To specify the other windows of a form, use VAR or prior to Release 4.0 CONST: - CONST: The window has the same dimensions on all pages where it occurs - VAR: The height and width of the window can vary To create text for individual windows of the form, choose Text elements. The text you create is divided into text elements that are stored together with the form. You will find out about the Text Editor in the next chapter. You can set a default paragraph for any window, which then applies to all text elements within it. You can assign logical windows to any pages of your form. You define the distribution of page windows on a page by specifying the size and position of the windows. To print labels, or to print documents with more than one column, you can define more than one main window on any one page by choosing Edit -> Windows -> Create -> Main window.

© SAP AG

BC460

1-50

Sub-Object Paragraph Formats

Header data Header data Page layout Page layout Paragraph formats Paragraph formats
Standard attributes Font attributes Tabs Outline attributes

Character formats Character formats Documentation Documentation
© SAP AG 2001

© SAP AG

BC460

1-51

Paragraph Formats: Standard Attributes
Alignment: Alignment:
Standard attributes Paragraph Left margin Right margin Indent 1st line Space before Space after HD 1.00 1.50 2.00 1.50 Description CM CM CM CM Alignment Line spacing Header 1 LEFT 1.00 LN BLOCK justified BLOCK justified CENTER centered CENTER centered LEFT aligned left LEFT aligned left RIGHT aligned right RIGHT aligned right

No blank lines Page protection Next paragraph same page

Units of Units of measurement: measurement:
LN LN CM CM MM MM IN IN PT PT TW TW Lines Lines Centimeters Centimeters Millimeters Millimeters Inches Inches Points Points Twips Twips

Left margin

Right margin Space after Space before

Indentation Window
© SAP AG 2001

You can specify the following standard paragraph attributes: - Left / right margin - Paragraph indentation - Line spacing - Vertical spacing: space before / space after - Paragraph alignment: left, right, centered, or justified - Page protection: no automatic page break within a paragraph The characteristics of a paragraph are described by different attributes. Choose Standard, Font, Tabs, or Outline to switch between the different groups of attributes.

© SAP AG

BC460

1-52

Paragraph Formats: Font Attributes

Font attributes Paragraph Family Font size HD COURIER 12,0 Point Description On Bold Italic Underlined Header 1 Off Retain Adopt values Adopt values from header data from header data

SAPscript font SAPscript font maintenance values maintenance values

Override header Override header data values data values

© SAP AG 2001

Font attributes for paragraphs include: - Font family, such as COURIER, HELVETICA, or TIMES - Font size (in tenths of a point) - Bold - Italics - Underlining, including the following additional options: spacing, thickness, intensity You can take a particular font attribute from the general form attributes and use it in the current paragraph by changing your setting values to the following: Font family = space, font size = 0, bold, italic, and underline all set to Retain.

© SAP AG

BC460

1-53

SIGN lets you define numbers right aligned at the tab position. select SIGN or DECIMAL. The standard tabs are available in addition to the tabs of a paragraph format. use the following tab positions: LEFT.sign.50 CM CM Alignment: Alignment: CENTER centered CENTER centered DECIMAL aligned to decimal DECIMAL aligned to decimal character character LEFT aligned left LEFT aligned left RIGHT aligned right RIGHT aligned right SIGN +/. SIGN. To align a paragraph.Paragraph Formats: Tabs Tabs Paragraph Number 1 2 3 HD Descript. This leaves room for a minus sign or implied blank space at the end of the number.sign. SIGN +/. Alignment LEFT LEFT Header 1 Tab position 1. To define the position of numbers in a paragraph. © SAP AG BC460 1-54 .25 2. DECIMAL lets you align decimal points with any tab position. or DECIMAL. aligned right aligned right Units of Units of measurement: measurement: CH CH CM CM MM MM IN IN PT PT TW TW © SAP AG 2001 Characters Characters Centimeters Centimeters Millimeters Millimeters Inches Inches Points Points Twips Twips Scroll pushbuttons Scroll pushbuttons Tab attributes control the tab positions in a paragraph. You can define as many tab positions as you wish. RIGHT. CENTER.

Characters are Characters are formatted with the formatted with the format entered format entered Example: Example: Output length 4 -> Output length 4 -> Page 1: 0001 Page 1: 0001 © SAP AG 2001 You can use the outline attributes provided by SAPscript to divide text into units such as chapters... To number paragraphs automatically.. III . c * .. First level 1. You can also number text units by creating consecutive numbering levels : 1. sub-chapters... Second level...1. linked to first level 2.. linked to first level 1..] © SAP AG BC460 1-55 . . and sections.. . Second level. First level [.2.. select one of the following numbering types: Arabic numerals: Roman numerals: Letters Fixed characters: 1 I a * 2 II b * 3 ..Paragraph Formats: Outlines Outline attributes Paragraph Outline Outline level Number margin Left delimiter Right delimiter Number chaining ( ) BF N1 01 Numbering type Fixed character Output length Uppercase Character string Description Numbering 1 Numbering types Numbering types ARABIC arabic numerals ARABIC arabic numerals CHAR CHAR fixed character fixed character LETTER letters LETTER letters ROMAN roman numerals ROMAN roman numerals LETTER Display: (a) (b) First of all .

Sub-Object Character Formats Header data Header data Page layout Page layout Paragraph formats Paragraph formats Character formats Character formats Standard attributes Font attributes Documentation Documentation © SAP AG 2001 © SAP AG BC460 1-56 .

Subscript: The character string is printed one half line space below the line .Superscript: The character string is printed one half line space above the line .Character Formats: Standard Attributes Standard attributes String BF Description Protected Hidden Superscript Subscript Boldface On Marker Bar code Off Retain Adopt header Adopt header data or paragraph data or paragraph format settings format settings Symbolic name of a Symbolic name of a bar code from SAPscript bar code from SAPscript font maintenance font maintenance Override header Override header data or paragraph data or paragraph format settings format settings © SAP AG 2001 Standard character format attributes include: .Barcode: The character string is encrypted and printed as a barcode.Hidden: The character string is not printed .Protected: The character string cannot be broken up and the entire string will be printed on one line . © SAP AG BC460 1-57 .

or underlining. bold. © SAP AG BC460 1-58 .0 Point Description Bold Italic Underlined On Boldface Off Retain Adopt header Adopt header data or paragraph data or paragraph format settings format settings SAPscript font SAPscript font maintenance values maintenance values Override header Override header data or paragraph data or paragraph format settings format settings © SAP AG 2001 You can define font attributes by specifying font.Character Formats: Font Attributes Font attributes String Family Font size BF COURIER 12. To override a previously defined form header or paragraph format. italics. font size. choose Retain or leave the values for 'Font family' and 'Font size' blank.' If you want the font attributes you have selected for a specific paragraph to be valid for the remainder of the form. choose 'On' or 'Off.

Sub-Object Documentation Header data Header data Page layout Page layout Paragraph formats Paragraph formats Character formats Character formats Documentation Documentation © SAP AG 2001 © SAP AG BC460 1-59 .

.. When you choose this pushbutton.. Editor Enter long texts List of all windows WINDOW_1 MAIN .ITEM_HEADER MAIN . You can maintain form documentation using the Form documentation pushbutton.ITEM_LINE .. On this screen. © SAP AG BC460 1-60 . List of all text elements MAIN . text elements.. a list of form components (pages. and so forth) is displayed.. you can enter long texts documenting the individual components.Form Elements: Documentation List of all pages PAGE_1 PAGE_2 . windows. © SAP AG 2001 Any changes that you make to a form should be documented accordingly.

Form Elements: Summary of the Unit You can now: Name the elements that SAPscript provides for structuring your form. © SAP AG 2001 © SAP AG BC460 1-61 . Create these elements in the system and change them.

SAPscript: The PC Editor and the Line Editor Contents: How the PC editor and the line editor work Entering text using the editors Outputting text to the screen or a printer Simple text operations Text formatting © SAP AG 2001 © SAP AG BC460 1-62 .

you can: Describe the structure of the PC editor and the line editor Create texts in the PC editor and the line editor List which text operations and formatting possibilities are available Explain text elements © SAP AG 2001 © SAP AG BC460 1-63 .SAPscript Editors: Objectives At the end of this unit.

The SAPscript Editor The SAPscript Editor The SAPscript Editor Form element: Text element Form element: Text element © SAP AG 2001 © SAP AG BC460 1-64 .

A dialog box simply asks you if the most current versions of these DLL and OCX files should be installed..4...... SAPscript . In order to use the PC editor. Line editor ..+..1... Your front-end must have either Windows NT 4.0 or Windows95 installed on it..+.+ User-specific settings * This is a normal text...+. your operating system must meet several requirements. Users do not have to worry about installing these themselves.....2. From the 'Standard Text: Request' screen you can choose which editor you want to work with. Choose Goto -> Change editor from within one editor to change to the other.3. PC Editor Graphical PC editor PC editor This is a normal text.+..... The PC editor also requires various DLL and OCX files that are automatically installed by the SAP GUI..PC Editor and Line Editor Standard text: Request Settings PC editor..o © SAP AG 2001 Two different editors are available in SAPscript for entering text: The PC editor and the line editor..... © SAP AG BC460 1-65 .....

Character formats can be found in the menu. paragraph formats are assigned using the tag column. standard texts. From Release 4. The major advantage of the PC editor is that all its functions can be reached either by mouse click or by using pushbuttons. Paragraph and character format assignments can be made using pushbuttons and any changes made are immediately displayed on the screen. In the line editor. SAPscript navigation commands are also automatically tested using an integrated syntax check. © SAP AG BC460 1-66 . an integrated syntax check is also available in the line editor. The attributes of individual formats must be displayed using the menu. Special text structures are also identified in the tag column. Text can be selected by double clicking on it or by using a special pushbutton.0A. or texts in forms.PC and Line Editor Operations PC editor Paragraph and character formats visible on the screen Paragraph and character format selection using pushbuttons Functions can be reached using mouse or pushbuttons Line editor Paragraph formats in format column using F4 Character format selection using menu Text area selection using pushbutton or by double-clicking Special text structures such as SAPscript navigation commands are identified in the format column Integrated syntax check for SAPscript navigation commands Special text structures displayed separately Integrated syntax check for SAPscript navigation commands © SAP AG 2001 Use the PC editor and the line editor for entering texts such as long texts in applications (for example materials texts).

The PC Editor Text Edit Goto Format Include System Help Paragraph formats Character formats Reset character formats Display formats Paste Copy Cut Print preview Display/Change © SAP AG 2001 The PC editor is similar to other common text editors and functions according to the WYSIWYG principle (What You See Is What You Get). © SAP AG BC460 1-67 . using pushbuttons and menu functions. PC editor operations are called. in contrast to line editor operations. The paragraph format and character format pushbuttons allow you to assign your text paragraph and character formats according what is selected.

If no paragraph format has been used up to this point. New line This is a normal text. Otherwise the new paragraph assumes the format of the one immediately preceding it.o This is a normal text in a new line in the same paragraph. position the cursor and press ENTER.o This is a normal text in a new paragraph.Entering Texts in the PC Editor New paragraph This is a normal text. your text automatically wraps when it reaches the right edge of your window. © SAP AG BC460 1-68 . the new paragraph is formatted according to the default paragraph setting. use SHIFT + ENTER. To insert a line break within a paragraph. To create a new paragraph.o Shift + © SAP AG 2001 The editor provides automatic word wraparound. Within a paragraph.

either by using your mouse to click the corresponding pushbutton on your screen. Release the mouse button and the text that you chose should be selected.o © SAP AG 2001 You can use the PC editor to format paragraphs. Now choose the paragraph or character format you want for that bit of text. The paragraph and character formats available are visible on the screen in the PC editor.o C Centered H Bold font Assign new paragraph or character format This is a normal text in a new centered paragraph.Character. © SAP AG BC460 1-69 . choose Edit -> Selected area -> Last character format and Edit -> Selected area -> Last paragraph format.Assigning Paragraph and Character Formats Select text with mouse This is a normal text in a left-justified paragraph. In order to reset the new format to what it previously was. Select the text you want to format by holding down your left mouse button and pulling the cursor over the area that you want to select. or by choosing Format Paragraph and Format .

.. To display the output on the screen. Print: General Standard Text .Outputting Texts Using the PC Editor Standard text: Request Standard text . print immediately). choose Text → Print from the PC editor or Standard text -> Print from the Standard Text: Request dialog box. you can specify various print parameters.. © SAP AG BC460 1-70 . PC Editor Text ... choose Print preview...o Output options Print immediately Delete after printing New spool request . Print preview © SAP AG 2001 Print To output a text.. In the subsequent dialog window.... Spool request ... This is a normal text. Print . choose Print on this display. such as the output device. Output device . From the PC editor menu you can choose between Printing or Print preview. . Print . the number of copies or pages...... To start printing on the selected output device. and several parameters for print control (for example.

.+. The status bar provides status information about various editing functions..1/ 1 ---------- © SAP AG 2001 The title bar in the line editor displays the name of the current editing action and of the text being edited.+ This is a normal text.6.........3. Enter desired paragraph formats here..The line segment (screen line / total number of lines) ..+.....+.+.. including: ... Format column Text Status line --------------------------System--------------------Lines 1 ..The form currently being edited ....5..The Line Editor Ruler * .The last paragraph and character formats used © SAP AG BC460 1-71 .....1..4.+..The texts currently selected .. The tag column contains the format ID or 'tag' that determines how the text will be formatted for output.....2. The menu bar offers users various application functions such as 'Save' or 'Print'...+...

+.. The new paragraph has the same format as the preceding one... A slash (/) in the tag column indicates this line break..2.choose Format To merge two paragraphs: 1...+....... Choose Format © SAP AG BC460 1-72 .Entering Text in the Line Editor New paragraph New line F6 ......3...+.+..1.. position the cursor and press ENTER..... To insert a line break within a paragraph..... The editor provides automatic word wraparound when you: ....2.2..1. Use blank spaces to overwrite the format key '/' 2...choose a function key .+. use F6. * * * * / © SAP AG 2001 To create a new paragraph.3..... Use blank spaces to overwrite the key in the tag column 2..+...3. Choose Format To delete blank lines or merge separate lines: 1...1.. . An asterisk (*) in the tag column indicates the default paragraph format...choose a menu function .press ENTER .+.......+... ......+.

4..... although you can change this if you wish..+.........2.+. The title bar shows that the Insert mode is active......+ * F5 Insert Insert new text ... choose End insert.Inserting Text in the Line Editor ....+. The Insert mode displays blank lines...........2.+.. The system returns to the original mode and inserts the new text at the cursor position..+.+... The paragraph format stays the same when text is inserted.+..+...4..3.. © SAP AG BC460 1-73 .. position the cursor and choose Insert. Enter the text to be inserted..1...... To exit the Insert mode..+ F5 F3 * End insert © SAP AG 2001 To insert text..1.3....

..2. You can also select whole lines by simply double-clicking on that line's entry in the tag column.+..1. The area you have selected is also displayed in the status bar at the bottom of the page...2.......+ End Select F2 * © SAP AG 2001 You can select text in the line editor using either the Select pushbutton or the by double clicking on it. © SAP AG BC460 1-74 ...3....3.Selecting Text in the Line Editor .4...4.....+.+ * Begin Select F2 ... The system automatically starts the select mode after you have set the first select marker with your cursor...... place your cursor at the beginning of the text you want to select and then choose the pushbutton.+..+.......+.. When using the Select pushbutton... Selected text is highlighted in a different color.+...+.+.. This selects the area you want to edit.. Next place your cursor at the end of the text you want to select and choose the Select pushbutton.........1... Additional clicks in the tag column incrementally increase the size of the area you have selected..

Copy does not delete the marked text .. Choose Goto → User Clipboard.. * this is any normal Paste (this is . continuous text. © SAP AG BC460 1-75 ..3. the text you have selected is copied to the clipboard: .1..... To copy text to a different editor..+.When you cut or copy text..2...+. position the cursor and choose Paste.Selecting. the previous contents of the clipboard are deleted. To insert the contents of the clipboard. Cutting and Copying Text Select ..... When you choose Cut or Copy.+.... use the clipboard.. There are three user clipboards that you can use to save text.Cut deletes the marked text .. ) continuous text Cut or copy © SAP AG 2001 The select function allows you to delete or copy entire text passages with relative ease...

4..3....2...+... ensure there is no blank space between the last word to be marked and the cursor.+.1....</>.+ L Format: Character Form Character format H U ( ..+.. You can change or delete format keys that have already been entered.2....+.+.+... When marking a character sequence... When you mark an entire section.+...1.. its description and its attributes. choose Format → Paragraph or Format → Character...+...... The dialog box displays the format key.... you can display the attributes of the different formats... the system formats the word at the cursor position......... In this dialog box..2.4....+. © SAP AG BC460 1-76 .... To apply paragraph and character formats.+ Description Highlighted Underlined Raw character string B © SAP AG 2001 You can organize text using the paragraph and character formats that are available in the current form............ NN stands for a one or two character key.....+. choose Last character format or Last paragraph format.....+ Format character .4...+.. To format a character string enter <NN>.. To display a list of possible paragraph formats choose F4....1.. Enter paragraph keys in the tag column.....Paragraph and Character Formatting Format paragraph .3.3.+.. To reapply the format last used within marking mode..

. To use a SAPscript control command.. Symbols consist of spaces reserved for variable data. the commands are not interpreted until the document is processed by the composer.... The data is inserted during preparation for printing.) at the beginning of the text you want to move.. enter /* in the tag column. You can define tab positions in paragraphs. To format symbols. the default positions of the underlying layout set are used. To add a comment line which is ignored when the text is formatted.</> . enter =.N& Character string Tab character Hidden special characters Symbol Paragraph New line Raw line Line feed + raw line Default paragraph Comment line Extended line Line feed with extended line Command line NN / ( /( * /* = /= /: © SAP AG 2001 To suppress special character recognition. <(>.<)> &N.. To protect an extended line from the previously defined line format.Special Characters <NN>.. enter &N. This function also suppresses the implicit blank space in the Editor at the end of the previous line.. © SAP AG BC460 1-77 . See also section 4.<)>. set a double comma (. If you do not define tabs. To move a piece of text to the next tab position. Chapter 4 contains further details about this topic. Control commands do not affect editor formatting..N&... use <(>. enter /: in the tag column.

Form Element: Text Element The SAPscript editor The SAPscript editor Form element: Text element Form element: Text element © SAP AG 2001 © SAP AG BC460 1-78 .

Ithaca. Thank you for your booking. © SAP AG BC460 1-79 . 145 Apple Valley Ln. NY 14850 Dear Sir or Madam.80 USD LH 0400 07/28/98 6:07 398.00 USD LH 0400 07/21/98 6:07 387. CO 85650 07/15/98 Form: Page window Turnaround Inc.00 USD AZ 0790 11/11/98 6:55 1644. Page window texts can be structured using text elements.Structuring Pages Using Forms Template Fly & Smile 4 Truckee Way Durango. We are pleased to confirm the following flights: Flight Date Depart Price ----------------------------------AA 0017 07/20/98 13:15 799.80 USD Page 1 © SAP AG 2001 The various output areas that appear on form pages are called page windows.

and data for the individual detail positions. wraparound text.Windows Template Dear Sir or Madam. © SAP AG BC460 1-80 . column headers.00 USD AZ 0790 11/11/98 6:55 1644. Thank you for your booking.80 USD LH 0400 07/28/98 6:07 398. We are pleased to confirm the following flights: Flight Date Depart Price ----------------------------------AA 0017 07/20/98 13:15 799. This body text contains the opening form of address.00 USD LH 0400 07/21/98 6:07 387.80 USD Window Dynamic body text © SAP AG 2001 The main window of a form should always output body text as a default.

one for the form of address and subsequent text. In addition. Thank you for your booking.80 USD Dynamic body text List of text elements in List of text elements in window MAIN: window MAIN: INTRODUCTION Dear Sir or Madam..Text Elements Template Window Dear Sir or Madam.00 USD 6:07 387.00 USD 6:55 1644. one for the table header. Thank you for your booking. You can also use the print program to determine if you want certain texts to be displayed at all.. We are pleased to confirm the following flights: Flight Date Depart Price ----------------------------------AA 0017 07/20/98 AZ 0790 11/11/98 LH 0400 07/21/98 13:15 799. and one for the individual item data.. . Dear Sir or Madam. © SAP AG 2001 The text in the example above has been divided into three different text elements. texts within the main window such as the table header can be displayed multiple times in different areas within the window on different pages. We Thank you for your booking. The sequence in which these elements are output is controlled by the print program. . © SAP AG BC460 1-81 . refer to the print program chapter. For more information about these functions. We are pleased to confirm the are pleased to confirm the following flights: following flights: ITEM_HEADER Flight Date Depart Price Flight Date Depart Price --------------------------------------------------------------------------------------------ITEM_LINE .

.Text Elements in the Line Editor Format ID Text element named INTRODUCTION /E AS AS INTRODUCTION Dear Sir or Madam. The name by which the text element is identified is highlighted in red in the line editor.. we would to confirm the following bookings: /E LI /: /E LP © SAP AG 2001 Beginning End ITEM_HEADER Flight.Price uline(30) ITEM_LINE &VAR1&.. . Use the format ID /E in the format column of the line editor to denote the beginning of a text element. The end of a text element comes when a new text element is started using /E in the format column.Date. ..&VAR2&. © SAP AG BC460 1-82 .Departure. The names of text elements that have already been created by users are displayed in bold print in the PC editor and the entire background of the line is gray. ..

but no /E text element is defined in the tag column. In contrast to named text elements. You can tell that you are dealing with a default text element whenever you have body text at the beginning of a window (for example. an address in a window other than a main window or a page number). which means that no print control functions are available. © SAP AG BC460 1-83 . default text elements are output automatically.Text Element Types Text elements per window Named text elements Can have as many as you want per window Identified by name Output when chosen in print program Output sequence controlled by print program Default text elements Only one per window allowed Must be the first text specified Printed automatically © SAP AG 2001 SAPscript differentiates between default text elements and text elements with names.

. Use either the dialog box Form: Change Page Layout (graphical Form Painter) or the dialog box Form: Change Windows (alphanumeric Form Painter) to maintain these elements.... Maintain text elements Maintain text elements Call editor Call editor © SAP AG 2001 You can use the Form Painter to maintain all text elements in any given window.... . .. .Maintaining Text Elements in the Form Painter graphical Form Painter Windows Graphic Window ADDRESS Description Address alphanumeric Form Painter . Windows Window Maintain text elements Maintain text elements Call editor Description Call editor Address ADDRESS .. © SAP AG BC460 1-84 .. Choose either Edit -> Text elements or the corresponding pushbutton (see slide above) to branch to the editor for that text element.

Enter texts in the PC editor and in the line editor. © SAP AG 2001 © SAP AG BC460 1-85 . Name the functions SAPscript provides for the layout of your text. Use text elements.SAPscript Editor: Summary of the Unit You can now: Understand the structure of the PC editor and the line editor.

BC460 1-86 © SAP AG . Activities Object Name of the print program to be used Name of the form to be used Name of the form to be created Development class Note: ## is your group number Name / Description SAPBC460D_01 SAPBC460D_FM_03 Z_BC460_EX3_## $TMP 1 Make a copy of the Form SAPBC460D_FM_03 and review the output on your monitor. standard forms are altered to reflect the needs of individual customers.Exercises Unit: The PC Editor and the Line Editor • • • • Changes to SAP standard forms Layout using the graphical Form Painter and the alphanumeric Form Painter Text changes Print preview using the print program In most cases.

Use the Form -> Copy to copy the form SAPBC460D_FM_03.Paste Note that the PC Editor allows you to work in a way that is very similar to other text editors.” Define new tabs for the appropriate paragraph formats. Enter the discounts in this column. Then observe the results in the line editor.Select .Copy . Choose Activate.Insert . In the next dialog window choose Print Preview. It is very important that you use both the line editor and the PC Editor tools. Save and activate the form.Cut . Create a paragraph format to write justified text in a bold format. Apply this character format while in the PC Editor. Suppress the page number on the first page. Move the DATE window to the same line as the ADDRESS window. Use bold for the flight number mentioned in the letter. Make a change in one and observe the change in the other. Add a new column called “Discount. Choose Save. Choose Screen Display. 2-1 Change the text of the letter (in the MAIN window) as desired. 2-2 2-3 2-4 Change the address in your form. 1-3 Run the print program SAPBC460D_01 for your form name. To toggle between the two editors choose Goto->Change editor. 2-5 2-6 2-7 © SAP AG BC460 1-87 . 2 Perform multiple modifications to your form. In the window Object Catalog Entry select Local Private Object. Use the following functions in the editors: . Note: The graphical Form Painter allows you to easily move a window to a different place on a page. Test your form as described in 1-3.1-1 1-2 Create a new form with the name Z_BC460_EX3_xx. Add some text using this new paragraph type.

Solutions Unit: PC Editor and Line Editor • • • • Changes to SAP standard forms Layout using the graphical Form Painter and the alphanumeric Form Painter Text changes Print preview using the print program In most cases. 1-2 Save and activate the form. 1-2-1 Choose Save. 1-1-1 Choose Copy to copy form SAPBC460D_FM_03. standard forms are altered to reflect the needs of individual customers. 1-1-4 Choose Create. 1-1-6 To copy the form choose Form –> Copy. 1-1-3 Enter the name of the new form: Z_BC460_EX3_xx. 1 Copy form SAPBC460D_FM_03 and check the output on the screen. © SAP AG BC460 1-88 . 1-1-2 Choose Tools –> SAPscript –> Form. 1-2-2 In the dialog window Create object catalog entry choose Local object. 1-1-5 Enter a Description. 1-1 Create a new form named Z_BC460_EX3_xx. 1-2-3 To activate your form choose Form –> Activate.

© SAP AG BC460 1-89 . 2-2 Change the address in your form. execute the print program SAPBC460D_01. 2-1-4 In the dialog window select the MAIN window with the mouse. 2 Make the changes to your form. 2-1-1 Make sure to use the graphical Form Painter. 2-2-2 Choose Text. 1-3-2 Enter the program name and choose Execute. 2-1-3 Choose Layout. 2-1 Change the letter text (in the MAIN window). 1-3-4 In the subsequent dialog window choose Print preview. 2-1-5 Choose Text. Use the PC Editor as well as the Line Editor.Insert . 2-1-2 Return to the form in change mode.1-3 For your form name. In the form maintenance transaction choose the graphical Form Painter (Tools –> SAPscript –> Form. 1-3-3 Enter the form name and choose Screen display. 2-2-4 To activate the form choose Form –> Activate and to test it choose Form –> Check. 2-2-1 Switch to the ADDRESS window.Copy .Select .Cut . 2-1-7 To activate the form choose Form –> Activate and to test it choose Form – > Check. Test the form as described in 1-3. 2-2-3 Make changes. and then Settings –> Form Painter). 2-1-6 Use the following functions in the editors: . To toggle between the two editors choose Goto –> Editor. 1-3-1 Choose System –> Services –> Reporting.Paste Note that you can work with the PC Editor as with any other word processing editor. Make a change in one editor and look at the change in the other.

2-5-3 Enter a two-character key and a description. 2-5-9 Position the cursor on the paragraph and use the mouse to select the newly created paragraph format. Have a look at the paragraph tag. you can assign the same upper left coordinates as defined for the ADDRESS window. 2-5-10 Choose Goto –> Editor to switch to the Line Editor. 2-3-3 Switch to the window PAGENO. 2-5-1 To switch to the paragraph view choose Goto –> Paragraph formats. © SAP AG BC460 1-90 . Enter text that uses the new paragraph format. 2-3-1 Return to the graphical Form Painter. Note: For the DATE window. 2-5-2 To create a new paragraph choose Edit –> Create element. 2-5 Create a paragraph format that allows you to write text justified and bold. Note: With the graphical Form Painter. 2-4-1 Return to the graphical Form Painter. 2-4-2 Make sure to be on the FIRST page. 2-4 Move the DATE window to the same level as the ADDRESS window. 2-5-11 To activate the form choose Form –> Activate and to test it choose Form –> Check. 2-5-5 Choose Font to activate bold printing and to select a font family. 2-5-4 Set the alignment to JUSTIFIED. you can move a window using Drag&Drop. 2-3-2 Make sure to be on the FIRST page. 2-3-4 Choose Form –> Change page layout and then Delete. 2-5-8 Insert a new paragraph. 2-4-3 Select the DATE window using the mouse. 2-4-4 Keep the left mouse button depressed and move the DATE window to the same level as the ADDRESS window. 2-5-6 To return to the layout view choose Goto –> Layout. 2-4-5 To activate the form choose Form –> Activate and to test it choose Form –> Check. 2-5-7 Edit the text elements of the MAIN window as before.2-3 Suppress the page number on the first page.

2-7-9 To modify the tabs choose Tabs and enter your own alignment and position for the discount column. 2-7-4 Go back to the PC Editor. 2-7-10 Do the same for paragraph IL.. 2-6-1 Edit the text elements of the MAIN window as before. 2-7-3 Go to the Line Editor. 2-7-5 Insert a tab and enter discounts for several item lines. 2-7-7 Choose Goto –> Paragraph formats to go to the paragraph maintenance. To activate the form choose Form -> Activate and to test it choose Form –> Check. 2-7-2 In the header line after the price insert a tab and enter “Discount”. 2-7-8 Choose paragraph IH. 2-7-6 Choose Back. Define new tabs for the relevant paragraph formats. © SAP AG BC460 1-91 . 2-7-1 Edit the text elements of the MAIN window as before. 2-6-4 Go to the Line Editor to see how the character format appears there. Then look at the result in the Line Editor. Enter the discounts in this column. 2-7 Add a new column named “Discount”. The tab there appears as a double comma (. 2-6-3 Choose character format Bold.2-6 In the PC Editor use bold for the flight number specified in the letter.). 2-6-2 Double-click on the flight number in each line to mark it.

Symbols and Control Commands Contents: Using symbols Types of symbols Formatting options with symbols Control commands in the SAPscript Editor © SAP AG 2001 © SAP AG BC460 1-92 .

Objectives At the end of this unit you can: Use SAPscript symbols Describe the difference between the types of symbols Include the various formatting options Control the output of a SAPscript text using control commands in the editor © SAP AG 2001 © SAP AG BC460 1-93 .

.+.6..+.Using Symbols Jane Smith 81 Third Ave.they are not allowed to wrap to the next line of text. Symbols must always completely fit on a single text line--. The use of symbols allows you to output the most current values from SAP tables in the form of text modules.+.. VA 20654 © SAP AG 2001 Symbols are placeholders for values that are inserted during print formatting.+........ Capital City... and that are not case sensitive...... Symbol names may not contain a blank space.2..+....... Symbols are identified by names surrounded by ”&” characters at beginning and end.4/ 1 ---------- Capital City... ---------------------System-------------Zeilen 1 .3..+.4. * / / / &Name& &Street& &City& &Name& &Street& &City& Jane Smith 81 Third Ave...1.5..... © SAP AG BC460 1-94 .. VA 20654 ...

Text symbols These symbol types differ in the way in which values are assigned to them. © SAP AG BC460 1-95 .Standard symbols .Program symbols .Types of Symbols System symbols Standard symbols Program symbols Text symbols © SAP AG 2001 SAPscript uses four different types of symbol: . You can select symbols by choosing Include → Symbols.System symbols .

choose Include → Symbols → System. is also available to users. which contains system symbols. You can use system symbols in any document. © SAP AG BC460 1-96 .5 A. To choose a system symbol.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 © SAP AG 2001 SAPscript provides standard system symbols that are automatically replaced with data from the R/3System when a document is printed. the table TTXSY. From Release 4.

Standard symbols are language-specific. or by choosing Tools → SAPscript → Administration → Settings. Examples of standard symbols are: .&MFG& for the closing salutation: "Yours faithfully" © SAP AG BC460 1-97 . You can use standard symbols in any document. 22 characters Value: max. You can display or change standard symbols either by choosing System → Services → Tablemaintenance → Extended table maint. 60 characters © SAP AG 2001 Standard symbols are application-defined..Standard Symbols Table TTDTG Symbols are user-defined Symbols are language-dependent Name: max.&SGDH& for the opening salutation: "Dear Sir/Madam:" . They are maintained centrally in table TTDTG.

© SAP AG BC460 1-98 . 60 characters © SAP AG 2001 You can define a text symbol for any text module. The system displays all available text symbols in the current text and/or -form.. choose Include → Symbols → Text symbols . The value assigned to the symbol is saved when you save the text module. . use DEFINE every time you assign a new value.Text Symbols Value is defined in the text module DEFINE &symbol& = ’value’ Name: max. You can assign any value to the symbols.Use a standard text symbol.Use DEFINE. This symbol is valid only in the text module for which you have defined it. This value is not saved together with the text. The value assigned to a text symbol is only temporary.. You can assign values to a symbol in the following two ways: . 32 characters Value: max. To assign several different values to the same symbol. To do so.

The necessary data base fields must be defined in a table or a structure in the ABAP Dictionary and be defined in the print program with a TABLES statement. Global program symbols can be defined in the print program over DATA.ORT01& &COUNTRY& © SAP AG 2001 Program symbols are substitute symbols for values. Program symbols are for contents of data base fields or global program symbols. CA 81 Third Ave Form Jane Smith 81 Third Ave. DATA: COUNTRY LIKE ...STRAS& &KNA1 .NAME1& &KNA1 ..Program Symbols KNA1 ABAP TABLES KNA1. © SAP AG BC460 1-99 . * Start of form printing . * Data selection . Capital City. SELECT OPTION etc. which originate from the ABAP program.. CA 80801 USA &KNA1 .. The data objects must be filled with values by the print program. NAME1 PSTLZ ORT01 STRAS Jane Smith 80801 Capital City. The editing of the values effected via SAPscript in accordance with in the ABAP Dictionary or in the program defined characteristics..PSTLZ&&KNA1 .

A dialog box called Print program for form appears... Here choose Append print prog.. TABLES: spfli.... © SAP AG BC460 1-100 . You can add these symbols to your text simply by clicking on them. DDIC fields Short description . Programm symbols Program symbols Symbol definition Symbol definition Print program for form Print programs for form Description Print programm Print report RIPRAT01 RIPRAT01 .. Global data ..... SPFLI SFLIGHT CRTX . ... © SAP AG 2001 Choose the Program symbols pushbutton or Insert -> Symbols -> Program symbols to display a detailed list of program symbols for your corresponding print program. ...... In order to assign additional print programs to a form...... Symbol definition REPORT riprat01..Program Symbols and Symbol Definition Text Edit Goto Format Include System Help Text Edit Goto Format Insert System Help Program symbols . choose Insert -> Symbols -> Program symbols.. Choose the Symbol definition pushbutton or Goto -> Print program -> Symbol definition to branch to a specific data object's definition screen in the print program.. Choose Goto -> Print program -> Symbol definition with dialog in order to be able to jump to various print programs using the dialog box that this function calls.. sflight. DATA: sums LIKE ..

Length Data of a specified length is output .I .Offset Output begins here. You can also combine formatting options.2)& Decimal format &抰 ext1扴YMBOL’text2’& Text before and after © SAP AG 2001 The value of a symbol is displayed in full. . nothing is output Leading zeros are suppressed . Leading blank spaces are suppressed. for example: &’text1’SYMBOL’text2’&. refer to the online documentation. blank spaces at the end of the value are cut off.C Several consecutive blank spaces are compressed into a single blank space.(x.Formatting Options &SYMBOL& Offset &SYMBOL+4& &SYMBOL(5)& Length &SYMBOL(I)& Suppress initial value &SYMBOL(Z)& Suppress leading zeros &SYMBOL(C)& Compress blank spaces &SYMBOL(R)& Right-aligned output &SYMBOL(S)& Suppress operators &SYMBOL(*)& Dictionary length &SYMBOL(8. © SAP AG BC460 1-101 .S .R . Offset always refers to the formatted value.y) The output is right-justified The sign is hidden Decimal notation: the data has x length with y decimal places Text can also be inserted before or after a symbol. . However. For more formatting options.Z If the field has initial value. use the following additional options: . To change the symbol display.

. symbols.Creating Additional Information in the PC Editor Text Edit Goto Format Include System Help Text Edit Goto Format Insert System Help Creating Additional Information Create Additional Information Symbols Symbols Command Command Text element Text element Comment Comment SAP character SAP characters .. Those commands and symbols inserted using the dialog box undergo a syntax check before they are inserted into your text. © SAP AG BC460 1-102 . and text elements in the PC editor by using Edit -> Insert command.. These structures can be deleted or changed by placing your cursor on the appropriate line and choosing either Edit -> Delete command or Edit -> Change command. You can also check syntax manually using Text -> Check.. .5A you can also check unknown symbols in form texts. From 4. © SAP AG 2001 Delete command Display command Delete command Change command Change command Insert command Insert command You can insert commands. The structures you insert appear in fields on the screen.

.evaluate conditions To enter a command. These commands allow you to: .Control Commands /: /: /: /: /: /: /: INCLUDE DEFINE ADDRESS . use the format key /: in the format column. ENDPROTECT NEW-PAGE IF .... © SAP AG 2001 You can use control commands to modify text output.reset outline paragraphs .. ENDCASE . © SAP AG BC460 1-103 .include text in a document .. ENDIF CASE .....assign values to text symbols . ENDADDRESS PROTECT . The length of a command must not exceed one line.start or suppress a page break .

Smith ?S.H. Richardson Invoice Letter XYZ Bank (Bank Number 699 700 99) 099 55555 SWIFT XYZ DESM 699 Executive Board: T. K. or "Standard Text". name. T. or a company footer that includes bank account numbers. Richards XYZ Bank (Bank Number 699 700 99) 099 55555 SWIFT XYZ DESM 699 Executive Board: T.You can use a text module in more than one form To identify a text.A. language.H. such as "Item Text: Purchasing Document". .A. You enter and store these text modules separately.Text Modules Text name: ADRS_FOOTER OBJECT: TEXT ID: ADRS XYZ Bank (Bank Number 699 700 99) 099 55555 SWIFT XYZ DESM 699 Language: E Executive Board: T. text object and text ID.that is.K.T. Smith ?S. the names of the executive board members.A. H. Williams ?S. Jones ?C. customer descriptions. © SAP AG BC460 1-104 .K.Text objects are divided into text IDs to permit a more precise classification of text types. the category "Sales and Distribution Texts" is a subcategory of "Materials Texts". Richards © SAP AG 2001 A form often contains predefined text modules such as materials lists. The text object and text ID are used to classify texts. . Smith ?S. Jones ?C. all texts allocated to Object TEXT . specify the client. "Materials Text". Williams ?S.T.You can combine and display these modules in a form . Williams ?S. For example.choose Tools -> SAPscript -> Standard text.A text object describes the context of a document. To work on any standard document . Such texts can be used for more than one application.and so on. . Jones ?C.

OBJECT ..ID .Including Text Modules / : INCLUDE ADRS_FOOTER OBJECT TEXT ID ADRS . INCLUDE name [parameter] parameter: . ID and LANGUAGE parameters. use INCLUDE. You can specify additional key fields for the text using the OBJECT.. You can also include text modules in other text modules. You must specify the name of the text you want to include. © SAP AG BC460 1-105 .. Enter the name of the text that you want to include in the dialog box that appears. In either case. Form: RVINVOICE01 Window : FOOTER / : INCLUDE &T001G-TXTFU& OBJECT TEXT ID ADRS . this will be used as the default format in the inserted text..PARAGRAPH © SAP AG 2001 You can include text modules from the current client in any window in a form. Use Insert -> Text -> Standard ... If you use the PARAGRAPH parameter to specify a paragraph format in a form.LANGUAGE . to include standard texts.

Defining Text Symbols Form: RVINVOICE01 Window: FOOTER / : DEFINE &SYMBOL& = 'String1 String2 String3' . In addition. The DEFINE command allows you to anchor the value you assign in a text. you can easily change the value of a text symbol that appears repeatedly in your text.. To assign values to text symbols.. use DEFINE before the text symbol is displayed for the first time. © SAP AG BC460 1-106 . Text symbols are retained in the document. This means that the text symbol remains in the text module the next time you call it. © SAP AG 2001 You must specify values for text symbols explicitly.

For additional information. You should always include the FROMCOUNTRY parameter when formatting addresses. For example. otherwise the sender's address will be formatted according to the COUNTRY parameter. The composer calls the function module ADDRESS_INTO_PRINTFORM when formatting addresses and transfers the appropriate format parameter from the text to the function module. the sender's postal code will be output as D-80801. You can assign both literals and symbols to the parameter. refer to the online documentation for function module ADDRESS_INTO_PRINTFORM. if COUNTRY = Germany and no FROMCOUNTRY parameter is included. The corresponding reference fields are described in structure ADRS.Formatting Addresses Form Form routines for formatting addresses according to country /: ADDRESS DELIVERY PARAGRAPH AD /: NAME &KNA1-NAME1& /: STREET &KNA1-STRAS& /: POSTCODE &KNA1-PSTLZ& /: CITY &KNA1-ORT01& /: COUNTRY &KNA1-LAND1& /: FROMCOUNTRY 慏E /: ENDADDRESS Composer Jane Smith 10 Jones Rd. with postal codes. © SAP AG BC460 1-107 . MT 80801 USA International postal standards © SAP AG 2001 The ADDRESS-ENDADDRESS command formats addresses according to the postal norms of the recipient's country as defined in the COUNTRY parameter. Butte.

..../: SET TIME MASK = ?.. and decimal format are user-specific.. © SAP AG BC460 1-108 . use command lines. /: SET DATE MASK © SAP AG 2001 Time.. date. To modify the format of program and system symbols of this type. use the following control commands: SET TIME MASK controls the time field format SET DATE MASK controls the date field format SET COUNTRY provides a choice of country-specific date or decimal formats that differ from the user master data To define format masks.

. the page defined in the form is used as the next page. All text lines enclosed by these commands are printed on one page.. To override the automatic page break in the main window and insert a manual page break.. You can specify the subsequent page explicitly.. If you do not. © SAP AG BC460 1-109 .ENDPROTECT. If the text lines fit onto the current page. /: ENDPROTECT © SAP AG 2001 SAPscript automatically inserts a page break when the main window (MAIN) is full.. they are printed on that page as if the PROTECT command had not been used.. If there is not enough room on the page. use PROTECT. To avoid unwanted page breaks. use the control command NEW-PAGE.. the PROTECT command acts as a NEWPAGE command and inserts a page break.Page Break and Page Protection Start new form page: /: NEW-PAGE [page] Protection against page break: /: PROTECT .

only one symbol can be tested for equivalence with different values. AND. The following comparison operators are permissible for the logical expression: .. they are ignored.= . For the various cases. use IF. CASE is a special type of multilevel case distinction using IF commands. To distinguish between dual-level and multilevel cases. the text lines enclosed by IF . ENDIF are printed. OR comparison operators . © SAP AG BC460 1-110 . If the logical expression within the IF command is evaluated as being true.Conditional Text Output: Case Distinction Conditional text output: / : IF condition : : / : ENDIF / : CASE symbol / : WHEN value : : / : ENDCASE Case distinction: © SAP AG 2001 You can specify that text lines should be output only when certain conditions are met...<= LE less than or equal These comparisons are text comparisons only.ENDIF.< . To set such conditions..> EQ equal LT less than GT greater than >= GE <> NE greater than or equal not equal NOT. Otherwise... use ELSE and ELSEIF within IF.ENDIF.

POSITION. and SIZE allow you to output windows and individual text passages in a box or frame or with a shaded background. © SAP AG BC460 1-111 . . YPOS] (left upper corner of the frame in relation to the values contained in the POSITION command). and Shading Form Window1 Window1 [/ : POSITION WINDOW ] [/ : SIZE WIDTH 2 CM HEIGHT +40 TW] / : BOX FRAME 10 TW Window2 / : BOX INTENSITY 10 Window2 Window3 Window3 / : BOX HEIGHT 0 CM FRAME 20 TW / : BOX WIDTH 0 CM FRAME 20 TW © SAP AG 2001 The SAPscript commands BOX. The WINDOW addition sets the values for the top and left margins to those of the current window. use appropriate units of measurement. shading should be entered in percent. Lines. The PAGE addition sets the values for the top and left margins to those of the page currently being displayed.Frames. The FRAME addition determines what line thickness the frame has./: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE] to fix the source coordinates XORIGIN and YORIGIN for the XPOS and YPOS parameters in the BOX command. size./: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE] to define the WIDTH and HEIGHT values for the BOX command for the current WINDOW or PAGE. Position. . The INTENSITY addition shades background area contained within the frame. and frame thickness./: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY] for a frame of size WIDTH and HEIGHT at position [XPOS. Use the following syntax: .

.. ABAP Dictionary REPORT <prog>. .. ENDFORM. All symbols (parameter name and contents) that are transferred from SAPscript to the program being called are listed in the PERFORM command using USING.. © SAP AG BC460 1-112 . . Parameters transferred back to SAPscript from internal tables in programs are received by the PERFORM command as text symbols using the keyword CHANGING. Text fields are transferred into the NAME field and text field contents into the VALUE field.Calling ABAP Subroutines Form /: PERFORM <form> IN PROGRAM <prog> /: USING &invar1& /: USING &invar2& 厖 ? /: CHANGING &outvar1& 厖 . /: ENDPERFORM IN_TAB structure ITCSY NAME invar1 invar2 VALUE . . Example: You want to use data from a SAPscript database table that cannot be read by the print program assigned to it. The structure ITCSY is composed of two fields. NAME and VALUE. Have a program in customer namespace Z read the data and then use the PERFORM command in SAPscript to call the program. FORM <form> TABLES in_tab STRUCTURE itcsy out_tab STRUCTURE itcsy. © SAP AG 2001 ABAP report Use the PERFORM command to transfer SAPscript data to programs and program data into SAPscript without having to change your print program. The form routine called during this procedure has to use an internal table based on the structure ITCSY. The variables listed under the PERFORM command are symbols. ..

Symbols and Control Commands: Summary of the Unit You can now: Include SAPscript symbols Differentiate between the various symbol types Include several different formatting options Use control commands in the editor to prepare a SAPscript text for output © SAP AG 2001 © SAP AG BC460 1-113 .

Exercises Unit: Symbols and Control Commands • • • • Changes to SAP standard forms Layout using the graphical Form Painter and the alphanumeric Form Painter Text changes Print preview using the print program In most cases. Choose Form -> Copy (see Exercises: PC Editor and Line Editor). 2 Change the greeting in Element INTRODUCTION of Window MAIN to print the customer’s name. The print program does not have access to this information. standard forms are altered to reflect the needs of individual customers. Activities Object Name of the form to be creates Name of the form to be used Name of the print program to be used Name of the program to be created Development class Note: ## is your group number Name / Description Z_BC460_EX4_## SAPBC460T_FM_04 SAPBC460D_01 Z_BC460_EX4_## $TMP 1 Create a separate form called Z_BC460_EX4_xx to be used in this exercise. Use a text symbol which you fill using your own program. © SAP AG BC460 1-114 . 1-1 Make a copy of the sample form SAPBC460T_FM_04.

3 Put a box around the SENDER window.2 cm left and .) Assign this value to the new symbol &NAME&. Use the BOX FRAME command to draw the box using a line width of 10 TW. (The performed program will be created below. You may want to use the DEBUG mode to check the values of INTTAB and OUTTAB. it must have a structure that looks like this: REPORT Z_BC460_EX4_##. This positions the top left corner of the box . This should be just a little larger than the window so that it will not touch any of the text inside the window. FORM GET_NAME TABLES INTTAB STRUCTURE ITCSY OUTTAB STRUCTURE ITCSY.2’ cm. Use the PERFORM command in SAPscript to pass the date from your own program into the form. 3-3 3-4 3-5 © SAP AG BC460 1-115 . Test your changes using program SAPBC460D_01. Remember. 3-1 3-2 Select the SENDER window and choose Text. 2-2 2-3 2-4 2-5 2-6 Test your changes using program SAPBC460D_01. *read the entry of the imported internal table *select the desired record from table SCUSTOM using the customer ID in *the field inttab-value(8)) *write the selected record back into the internal table to be exported.2-1 Use the DEFINE command to assign the value ‘00000022’ to a new symbol &CUST& in the MAIN window.2 cm up from the top left corner of the window. ENDFORM.2 cm to the window width and height. Write the ABAP program Z_BC460_EX4_xx. Read the name of this customer from table SCUSTOM in a form routine of an ABAP program. Use the POSITION command to set the x and y origin to ‘-.4’ cm. Change the Greeting by using the symbol &NAME& now. This makes up for the upper position and adds another 0. Use the SIZE command to set the width and height at ‘+0.

Use the INCLUDE command to select the standard text to be printed in your form. Add the parameter PARAGRAPH to select the appropriate paragraph tag to make the text use CENTER alignment for printing. Note: To easily insert your newly created text module. 4-1 Create a standard text module using Tools->SAPscript->Standard text. Note: Do not select any paragraph format because you want to control the paragraph formatting from the form. Enter a few lines of text and save. 4-2 4-3 4-4 4-5 © SAP AG BC460 1-116 . choose Insert->Text>Standard. Print the text with an alignment of CENTER. Change the Text ID to SDVD (Standard text for SD forms). Test your changes using program SAPBC460D_01.4 Create a standard text module with a name of Z_BC460_EX4_## and Text ID of SDVD. Include this text in your form.

Solutions Unit: Symbols and Control Commands • • • • Changes to SAP standard forms Layout using the graphical Form Painter and the alphanumeric Form Painter Text changes Print preview using the print program In most cases. because the print program cannot access the customer name. 1-1-1 The solution form is called SAPBC460S_FM_04. Choose Command and enter the following: DEFINE &CUST& = ‘00000022‘ 2-1-2 Alternatively. Use a text symbol that you must fill from within your own program. enter the following command in the Line Editor: /: DEFINE &CUST& = ‘00000022‘ © SAP AG BC460 1-117 . 1 For this exercise. 2-1-1 In the PC Editor in the MAIN window for text element INTRODUCTION choose Edit –> Insert command. 2-1 In the MAIN window use the DEFINE command to assign the value ‘00000022‘ to the new symbol &CUST&. 2 In the text element INTRODUCTION in the MAIN window change the salutation to print the customer name. 1-1 To copy form SAPBC460T_FM_04 as a template choose Form –> Copy (see Exercise: PC Editor and Line Editor). create a new form named Z_BC460_EX4_##. standard forms are altered to reflect the needs of individual customers.

2-3-5 Choose Symbols and enter the following: &NAME& 2-3-6 Alternatively. (You will later create the executed program). Note that the program must have the following structure: REPORT Z_BC460_EX4_##. * Write the selected record back into the internal table to be exported ENDFORM. * Read the entry of the imported internal table * Select the desired record from table SCUSTOM using the customer ID in field inttab-value(8). 2-3-2 Delete the text you want to replace. 2-3-3 Position the cursor on that place in the line at which you want the name to appear. in the Line Editor enter the follwing command: /: Dear Mr &NAME&. 2-3-1 Go to the PC Editor to the MAIN window under text element INTRODUCTION. © SAP AG BC460 1-118 . 2-2-1 Immediately after the DEFINE command add the following command lines: /: /: /: /: PERFORM GET_NAME IN PROGRAM Z_BC460_EX4_## USING &CUST& CHANGING &NAME& ENDPERFORM 2-3 Change the salutation by using the symbol &NAME&.2-2 Read the name of the customer form table SCUSTOM in a form routine of an ABAP program. 2-3-4 Choose Edit –> Insert command. In SAPscript use the PERFORM command to pass data from your own program into the form. 2-4 Now write the ABAP program Z_BC460_EX4_##. Assign this value to the new symbol &NAME&. FORM GET_NAME TABLES INTTAB STRUCTURE ITCSY OUTTAB STRUCTURE ITCSY.

The program coding reads as follows: REPORT sapbc460s_04 . IF sy-subrc = 0. MOVE 'no name' TO outtab-value. TABLES: scustom. MODIFY outtab INDEX sy-tabix.2-4-1 The solution program is called SAPBC460S_04. READ TABLE outtab INDEX 1. MOVE scustom-name TO outtab-value. " GET_NAME © SAP AG BC460 1-119 . MODIFY outtab INDEX sy-tabix. READ TABLE outtab INDEX 1. *&----------------------------------------------* *& Form GET_NAME *&----------------------------------------------* FORM get_name TABLES inttab STRUCTURE itcsy outtab STRUCTURE itcsy. ENDIF. * select from scustom and modify outtab with new data SELECT SINGLE * FROM scustom WHERE id = inttab-value(8). * read first line of inttab READ TABLE inttab INDEX 1. ENDFORM. ELSE.

3-2-1 Use the following command: /: POSITION XORIGIN ‘-0. If necessary correct the syntax.4‘ cm. This levels out the upper position and adds 0. 2-5 2-6 Use program SAPBC460D_01 to test your changes.2-4-2 To make a syntax check of the text modifications choose Form –> Check – > Texts. 3 Put a frame around the SENDER window. To do this position the cursor on the incorrect text and choose Change command. 2-6-4 You can deactivate the debugger only while it is running. 3-1 3-2 Select the SENDER window and choose Text. Starting from the upper left corner of the window. 2-6-1 The ABAP Debugger is no subject of this course and will therefore not be described here.2‘ CM 3-3 Use the SIZE command to set the width and the height to ‘+0. 3-4-1 Insert the following command: /: BOX FRAME 10 TW 3-5 Use program SAPBC460D_01 to test your changes.2‘cm each.2‘ CM YORIGIN ‘-0.2 cm to the left and by 0. 2-6-3 Execute the program and check the form in the debugger. © SAP AG BC460 1-120 .2 cm to the top.4‘ CM 3-4 Use the BOX FRAME command to draw a frame with a line thickness of 10 TW.4‘ CM HEIGHT ‘+0. Use the debugging mode to check the values of INTTAB and OUTTAB. Make it slightly larger that the window in order not to overlay any text. To do this choose Debugger –> Exit. position the upper left corner of the frame by 0. Use the POSITION command to set the origins of x and y to ‘-0. 2-6-2 In transaction SE71 activate the SAPscript Debugger (Tools –> SAPscript – > Form and then Utilities –> Activate debugger). 3-3-1 Insert the following command: /: SIZE WIDTH ‘+0.2 cm to the window width and height.

4-1 Choose Tools –>SAPscript –> Standard text to create a standard text. © SAP AG BC460 1-121 . 4-1-1 Text name: 4-1-2 Text ID: 4-2 Z_BC460_EX4_## SDVD Enter a few lines of text and save them. Note: You can include your newly created standard text by choosing Include -> Text -> Standard. 4-3-1 Note that you can search for your text with Search (F4). 4-3 Use the INCLUDE command to include the text you want to print in your form. 4-2-1 Use * as paragraph tag. 4-5 Use program SAPBC460D_01 to test your changes. 4-4-1 To add the PARAGRAPH parameter choose Change command. 4-3-2 After using Include –> Text –> Standard to include the text the command reads as follows: /: INCLUDE Z_BC460_EX4_## OBJECT TEXT ID SDVD LANGUAGE EN 4-4 Enter the PARAGRAPH parameter to select the paragraph format that prints the text justified. Note: Do not select a paragraph format since you want to control paragraph formatting from within the form. The default can be overruled from within the form. Copy this text into your form. Change the text ID to SDVD (standard texts for SD forms).4 Create a standard text named Z_BC460_EX4_## with the text ID SDVD. Print the text justified. Add PARAGRAPH C after LANGUAGE EN. which means that you want to use the default.

The Print Program Contents: Tasks of the print program and the composer Structure of the print program Important function modules Printing text elements Processing headings Composer procedure © SAP AG 2001 © SAP AG BC460 1-122 .

The Print Program: Objectives At the end of this unit. you can: Explain the structure of print programs in SAPscript Explain how print programs and forms work together Name the most important SAPscript function modules Write text element output in forms Describe how the SAPscript composer works © SAP AG 2001 © SAP AG BC460 1-123 .

50.150..line and page breaks in the form .No. number of copies... the composer controls formatting of the document.the inclusion of long texts in a document .the page description for the spool request (Final Format or OTF). or fax .retrieves R/3 application data from the database ..defines the form processing logic (the order and repetition of text elements) . 00345 00379 02378 00458 Total XYZ Bank Acct...700.. select * from scustom.300..selects the output device. ... especially: ..- © SAP AG 2001 In the R/3 System. No. The print program is either an ABAP report (type 1 program) or a module pool (Type M Program). call function 'START_FORM' .. call function 'WRITE_FORM' . monitor.formatting of SAPscript control commands and symbol variables ..sets print attributes such as immediate output. both the print program and the form are needed to print documents. Smith 7 Second Ave. Date Invoice No.. 47110 XYZ City Place. such as printer. The print program . J.. © SAP AG BC460 1-124 ..chooses a form for printing .... and pages to be printed.. Form ABAP program Application DB data tables: scustom.The Print Program and Composer Print program report jh_form_01. During the actual print process. call function 'OPEN_FORM' ...: 00 00 00 00 0 Price 200.4 123-45-556-678 Composer Art.: 0 81 5 4711 Ba nk No.

sbook... To combine forms into a single spool request... use CONTROL_FORM. call function 'END_FORM' .printing out text onto the form Every time you print a form.....starting and ending form printing . Changes to another form Prints output on form R/3 applications such as FI.. A print program can also print several forms which are either administered individually as separate spool requests or combined into a single spool request. .... call function 'END_FORM' . select * from . use START_FORM and END_FORM. tables: scustom. . call function 'CLOSE_FORM' . and MM are supplied with standard forms and print programs that can be customized.The Structure of a Print Program Retrieves data Opens form printing Closes form printing © SAP AG 2001 program rstxexp1. . CO... To transfer control commands to a form. . © SAP AG BC460 1-125 ... . .. you must use the paired function modules OPEN_FORM and CLOSE_FORM. To print text elements in form windows.. call function 'START_FORM' ...changing to different forms .. use WRITE_FORM. .. window = .. call function 'OPEN_FORM' exporting form = .. Within the print program you must distinguish between: .... call function 'WRITE_FORM' exporting element = ..... call function 'START_FORM' ...retrieving data from the R/3 System .. .

use the DIALOG parameter..TELEFAX for fax output using spool or SAPconnect . .... immediate output. EXCEPTIONS ... use the DEVICE parameter with: . .. CALL FUNCTION 'CLOSE_FORM' IMPORTING RESULT = . you can obtain status information and the print and fax parameters from the RESULT parameter (structure ITCPP)... To specify the form and the desired language. use the CLOSE_FORM function module.. . Once the form printing has finished.. To suppress the dialog box for output device parameters.use the OPTIONS parameter (structure ITCPO). = . You must call OPEN_FORM before you can work with any of the other form function modules.such as the number of copies. and so on . © SAP AG BC460 1-126 . such as the name of the device in DEVICE = PRINTER or DEVICE = TELEFAX.. use the FORM and LANGUAGE parameters.. . © SAP AG 2001 The function module OPEN_FORM initializes form printing... = . To control the output channel. . To end form printing. To specify attributes for printing or faxing .SCREEN for monitor output using GUI....PRINTER for print output using spool ... . . . You cannot print the text if you use this value.Beginning and End of Form Printing CALL FUNCTION 'OPEN_FORM' EXPORTING FORM = LANGUAGE = DEVICE = OPTIONS = DIALOG = IMPORTING LANGUAGE = EXCEPTIONS .

. begin each form using START_FORM and end it using END_FORM.. END_FORM does not end the printing process... you must call OPEN_FORM. EXCEPTIONS . Before using START_FORM for the first time.. LANGUAGE = . © SAP AG BC460 1-127 ..... Note: END_FORM cannot replace CLOSE_FORM. use the FORM and LANGUAGE parameters.. STARTPAGE = . EXCEPTIONS . To specify the form under START_FORM. Use either START_FORM or CLOSE_FORM after END_FORM.. IMPORTING LANGUAGE = ..... To choose a start page other than the default start page. = .Outputting Several Forms Using a Single Spool Request CALL FUNCTION 'START_FORM' EXPORTING FORM = .. = . © SAP AG 2001 To print several identical forms containing different data within a single spool request... CALL FUNCTION 'END_FORM' IMPORTING RESULT = . The function modules for each form are called between START_FORM and END_FORM. use the STARTPAGE parameter.

The order in which text elements are printed corresponds to the order in which WRITE_FORM is called. The TYPE parameter specifies the output area of the main window. = . ... © SAP AG BC460 1-128 . ...Output Options for Text Elements CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = FUNCTION = TYPE = WINDOW = EXCEPTIONS . The WINDOW parameter specifies the window in which the text element is output... it is determined by the print program. use the function module WRITE_FORM. .. Main window (MAIN) • To append text • To define headings • To delete headings Non-main window • To append text • To replace text • To delete text © SAP AG 2001 To output text elements in the window of a form. You must specify the desired text element using the ELEMENT parameter..... The FUNCTION parameter specifies whether text is to be appended.. . replaced or deleted. In other words.

The amount of space needed for this text is deducted from the BODY area. SAPscript automatically outputs the current contents of these areas on every page that contains a main window. © SAP AG BC460 1-129 . BODY or BOTTOM. You can enter and change the contents of the TOP. The size of the top and bottom areas depends on the size of the text contained in the field. The top and bottom areas of the main window allow you to create headers (titles) and footers (similar to creating page headers and footers in ABAP during print list generation).Main Windows TOP BODY MAIN BOTTOM © SAP AG 2001 You can output text in the main window (type MAIN) in one of three areas: TOP. and BOTTOM areas dynamically during form output. BODY.

- WRITE_FORM element = 'ITEM_LINE' window = 'MAIN' Art. The WINDOW parameter must be set to MAIN.. use WRITE_FORM. &vbdpa-netpr& Art. The output of text elements in the main window triggers a page break as soon as the current page window is full. You must specify the desired text element using the ELEMENT parameter.. You can also use the WRITE_FORM_LINES function module.. © SAP AG BC460 1-130 .Price /E ITEM_LINE &vbdpa-matnr&..150.- MAIN © SAP AG 2001 To print text elements in the main window of a form. EXCEPTIONS .. The TYPE parameter must be set to BODY. The order in which text elements are printed corresponds to the order in which WRITE_FORM is used in the print program.. To do so.. The FUNCTION parameter is not relevant here.. /E ITEM_HEADER Art. This is the default value.Outputting Text Elements in the Main Window CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = . 00345 Price 200..No.No. go directly to the LINES parameter and specify the text to be printed. This is the default value. 00345 00379 MAIN Price 200.No. = .

. call function 'END_FORM' . a form of address and short text appear on the first page before the headers are output. no header can be subsequently deleted from the TOP area. This deletion first takes effect on the following page... FUNCTION = 'DELETE'. a line item from an invoice) are output to the main window using WRITE_FORM.. the header is deleted by calling WRITE_FORM. After a header has been created. . If text has been entered in the BODY area. if there is already text present in that BODY. FUNCTION = 'SET'. This is why. If no text has been entered in the BODY area. This output can be several pages in length. in the example above.. the header is first output in the BODY area and then output in the TOP area on subsequent pages. © SAP AG BC460 1-131 .. call function 'WRITE_FORM' exporting element = 'ITEM_HEADER' function = 'DELETE' type = 'TOP' window = 'MAIN' . the header is output for the first time at the beginning of the next page. TYPE = 'BODY'. the text elements that are to be output underneath it (for example. After these text elements have been output in their entirety.... the header is output to the current page. TYPE = 'TOP'. With many application forms. Output heading to current page Write heading in TOP area Delete heading from TOP area for next page © SAP AG 2001 You can add headers to main windows using WRITE_FORM. In other words.Creating and Deleting Headings call function 'START_FORM' . TYPE = 'TOP'. call function 'WRITE_FORM' exporting element = 'ITEM_HEADER' type = 'BODY' window = 'MAIN' call function 'WRITE_FORM' exporting element = 'ITEM_HEADER' function = 'SET' type = 'TOP' window = 'MAIN' ..

..50..- WRITE_FORM element = 'INFOTEXT2' function = 'APPEND' window = 'INFO' Art.. Unlike text inserted into the main window.Adding Text Elements to Non-Main Windows CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = . You must specify the name of the text element in the ELEMENT parameter.700.150.- © SAP AG 2001 To add a text element to a non-main window. FUNCTION = 'APPEND' WINDOW = 'INFO' EXCEPTIONS . INFO INFOTEXT1 INFO INFOTEXT1 INFOTEXT2 Art. use WRITE_FORM with FUNCTION = ’APPEND’.. the order in which text elements are printed corresponds to the order in which WRITE_FORM is used in the print program. = .50.300.No. © SAP AG BC460 1-132 . any text that does not fit into the current page window is lost.. The TYPE parameter is not relevant here.No.700. 00345 00379 02378 00458 Total Price 200. 00345 00379 02378 00458 Total Price 200. As with the main window. The FUNCTION parameter must have the value ‘APPEND’.300. You must specify the name of the non-main window in the WINDOW parameter.150.

No...300.No. 00345 00379 02378 00458 Total Price 200. INFO INFOTEXT1 INFOTEXT2 Art. The FUNCTION parameter must have the value ‘SET’ (which is its default value). © SAP AG BC460 1-133 .700.. The TYPE parameter is not relevant here. FUNCTION = 'SET' WINDOW = 'INFO' EXCEPTIONS . You must specify the name of the text element in the ELEMENT parameter. = .700...- © SAP AG 2001 To replace the current content of a non-main window with a text element.- INFO INFOTEXT3 WRITE_FORM element = 'INFOTEXT3' function = 'SET' window = 'INFO' Art. You must specify the name of the window in the WINDOW parameter.300.150.Replacing Text Elements in Non-Main Windows CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = .50..150. 00345 00379 02378 00458 Total Price 200. use WRITE_FORM with FUNCTION = ’SET’.50.

. 'DELETE' 'INFO' . The FUNCTION parameter must have the value ‘DELETE’..Deleting a Text Element in a Non-Main Window CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = FUNCTION = WINDOW = EXCEPTIONS .- © SAP AG 2001 To delete a text element from a non-main window. The TYPE parameter is not relevant here.. = .- INFO INFOTEXT1 WRITE_FORM element = 'INFOTEXT2' function = 'DELETE' window = 'INFO' Art.. INFO INFOTEXT1 INFOTEXT2 Art.300.300..No. You must specify the text element in the ELEMENT parameter. use WRITE_FORM with FUNCTION = ’DELETE’.150.50.700.50.700. 00345 00379 02378 00458 Total Price 200. You must specify the window in the WINDOW parameter.. © SAP AG BC460 1-134 .150. 00345 00379 02378 00458 Total Price 200.No.

700. The text elements of non-main windows are not processed until a page break.No. BODY or BOTTOM area of the main window.150. 00345 00379 02378 00458 Total Price 200.150. To print text elements in the TOP.700.an overflow of the main window (automatic) .No. 00345 00379 02378 00458 Total Price 200.:0815 4711 Bank No. Date Invoice No.50. A default text element at the beginning of a non-main window is printed once in the window as soon as the window is processed. following a page break. default text elements in the main window do not appear in the main window of the subsequent page.- XYZ Bank Acct. However.300. or in non-main windows. use WRITE_FORM.How the Composer Works The main window controls page breaks. © SAP AG BC460 1-135 . No. Symbols in the BODY area of the main window are replaced with data immediately.- Page break in the main window Art. Smith 7 Second Ave. A page break can be triggered by: . Symbols in non-main windows are replaced when a page break occurs J.300. 4 123-45-556-678 Art. 47110 XYZ City Place.a NEW-PAGE command in the main window (manual) The main window of a form is divided into the TOP.:000000000 © SAP AG 2001 The main window controls the page break.50. Symbols in the TOP or BOTTOM area are replaced with data whenever changes are made to that area. Text elements in non-main windows are processed at page breaks or at the end of the layout set. BODY and BOTTOM areas.

ABAP program . . CALL FUNCTION 'CONTROL_FORM' EXPORTING COMMAND = 'PROTECT'... . ITEM_LINE © SAP AG 2001 The function module CONTROL_FORM allows you to create SAPscript control statements from within an ABAP program.. . CALL FUNCTION 'CONTROL_FORM' EXPORTING COMMAND = 'ENDPROTECT'. Normally. . text element ITEM_LINE is page protected.. ENDPROTECT in SAPscript (see Chapter 4: Symbols and Control Commands). © SAP AG BC460 1-136 . hence the contents of text element ITEM_LINE are always output in one block on a single page. = ..Calling Commands Using a Program CALL FUNCTION 'CONTROL_FORM' EXPORTING COMMAND = . you would have to have to execute the SAPscript statement PROTECT .. . EXCEPTIONS . Enter the SAPscript statement you want to use to control output in the COMMAND parameter of the function module without the ‘/:‘ addition. . CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = 'ITEM_LINE'. In the example above... . .

Understand how the print program and the form interact. Name the most important SAPscript function modules. Understand how the SAPscript composer works. Output text elements in forms.The Print Program: Summary of the Unit You can now: Describe the structure of print programs in SAPscript. © SAP AG 2001 © SAP AG BC460 1-137 .

Write a print program that outputs form SAPBC460D_FM_03. 2. Allow users to determine which page printout should begin with by including a selection screen on which they can enter a page number. standard forms are altered to reflect the needs of individual customers. In some cases. NOTE: Choose Pattern to adopt function modules.Exercises Unit: The Print Program • • • • Calling function modules for form printing Controlling printing using print programs Enhancements to print programs Print preview using the print program In most cases. Take a look at the form in the Form Painter first so that you know in which sequence the print program should display the form's text elements. the print program must also be altered to reflect these needs. Activities Object Name / Description Name of the form to be used Name of the print program to be created Development class Note: ## is your group number SAPBC460D_FM_03 Z_BC460_EX5A_## $TMP 1. © SAP AG BC460 1-138 .

consult the training documentation for more information about the basic structure of print programs. 1-1-2 Enter the program name SAPBC460T_05 and choose Program –> Copy. Complete the report by inserting function modules calls. 1-1 Copy program SAPBC460T_05. 1-1-4 Choose the Local object function from the Create object catalog entry window. This report contains a print program whose function module calls for SAPscript form output is marked by asterisks. 1-1-1 Choose Tools –> ABAP Workbench –> Development –> ABAP Editor. © SAP AG BC460 1-139 . It may also be useful to check the MAIN window of form SAPBC460D_FM_05. 1-2 Edit the source code of report Z_BC460_EX5_##. Such a check will show you the order of text elements. start. The sections where code must be inserted are marked as follows: *CALL FUNCTION **************************************** * fill in missing statements **************************************** NOTE: Choose Pattern to adopt function modules.Activities Object Name / Description Name of the form to be created Name of the form to be used Name of the print program to be used as a template Name of the print program to be created Development class Note: ## is your group number Z_BC460_EX5_## SAPBC460D_FM_05 SAPBC460T_05 Z_BC460_EX5_## $TMP 1 Copy print program SAPBC460T_05 and complete the report by inserting function module calls that open. 1-1-3 Enter Z_BC460_EX5_## and choose Copy to copy source code and text elements. and fill the form with data. If you have problems determining the proper sequence of the function calls.

4-1 Add a tab and the destination city to the end of the line item. (Note: Merely going back to your selection screen is not enough. Activate the form and execute print program Z_BC460_EX5_## with your new form. Run your program using Program –> Execute. 3-1 3-2 3-3 Choose Include –> Symbols –> Program symbols. Insert the program symbol for destination city from table SPFLI. Use the command IF . 4-2 Add the new column to the text elements for item headers as well (ITEM_HEADER). 2 Create a new form with the name Z_BC460_EX5_## that is to be used by your program.. choose Print preview.. 4 Add a field to form Z_BC460_EX5_## for destination city (text element ITEM_LINE). If not enough space is left at the end of the line item. 2-1 Copy form SAPBC460D_FM_05 using Form –> Copy (see the exercises on the PC editor and the line editor) 3 Use Program symbols to add your program to the print program list.1-3 Test your finished program. The FORM parameter has to be supplied with the name of the SAPscript form used for printing.. Choose Add print program. If you have a printer. To check form output. display the following message in bold type after the line item: ”Please be aware of delayed check-in times in New York due to an American air traffic controllers strike!” 5-1 Print this text in a separate line after the line item..) 4-3 5 If your destination is NEW YORK. ELSE . ENDIF. Do not change the value SAPBC460D_FM_05 suggested in this example. Define a new tab position to position the field. reduce output length using formatting options. © SAP AG BC460 1-140 . you can even print the form out. Enter the name of your print program.

address output should appear in one of two different ways. 6-2 When you test this. Add country names to customer addresses if the country of the sender differs from that of the customer. Insert the program symbol for the customer's country after COUNTRY. The corresponding program symbol can be found in table SCUSTOM. In this exercise you may use ‘US‘ as land of origin. © SAP AG BC460 1-141 . then no country should appear in the last line of the address. use the commands PROTECT .5-2 6 In order to prevent a page break from occurring between the line item and the message. If the customer's country is US. Add FROMCOUNTRY as a subcommand to the ADDRESS control command.. then 'Germany' should appear in the last line of the address. 6-1 Add COUNTRY as a subcommand to the ADDRESS control command in the ADDRESS window. ENDPROTECT.. If the customer's country is DE.

1 The solution program for the first exercise is called SAPBC460S_05A. -------------------------------------------------------------* * Open form printing © SAP AG BC460 1-142 .Solutions Unit: The Print Program • • • • Calls of function modules for form printing Output control via print program Enhancement of the print program in cooperation with the related form Print preview using the print program In most cases. In some cases the print program must be altered to reflect these needs. standard forms are altered to reflect the needs of individual customers. *&-----------------------------------------------------------* *& Report SAPBC460S_05A * *------------------------------------------------------------* & Example print program for training course BC460. PARAMETERS: stpage(10) DEFAULT 'FIRST'. unit 5 * &------------------------------------------------------------* REPORT sapbc460s_05a .

= 1. ENDIF. = stpage * Write text element INTRODUCTION CALL FUNCTION 'WRITE_FORM' EXPORTING element EXCEPTIONS OTHERS = 1. = 1. = 'INTRODUCTION ' © SAP AG BC460 1-143 . WRITE: 'Error in OPEN_FORM'(001). ENDIF.CALL FUNCTION 'OPEN_FORM' EXPORTING form EXCEPTIONS OTHERS IF sy-subrc <> 0. WRITE: / 'Error in START_FORM'(002). = 'SAPBC460D_FM_03' * Select start page CALL FUNCTION 'START_FORM' EXPORTING startpage EXCEPTIONS OTHERS IF sy-subrc <> 0.

= 'CLOSING_REMARK' * End form printing CALL FUNCTION 'END_FORM' © SAP AG BC460 1-144 . WRITE: / 'Error in WRITE_FORM. element INTRODUCTION'(003). WRITE: / 'Error in WRITE_FORM. ENDIF. WRITE: / 'Error in WRITE_FORM. ENDIF. = 1. element CLOSING_REMARK'(005). = 'ITEMS' * Write text element CLOSING_REMARK CALL FUNCTION 'WRITE_FORM' EXPORTING element EXCEPTIONS OTHERS IF sy-subrc <> 0. element ITEMS'(004).IF sy-subrc <> 0. ENDIF. * Write text element ITEMS CALL FUNCTION 'WRITE_FORM' EXPORTING element EXCEPTIONS OTHERS IF sy-subrc <> 0. = 1.

WRITE: / 'Error in END_FORM'(006). = 3. = 3. WRITE: / 'Error in CLOSE_FORM'(007).EXCEPTIONS unopened = 1 bad_pageformat_for_print = 2 OTHERS IF sy-subrc <> 0. ENDIF. © SAP AG BC460 1-145 . ENDIF. * Close form printing CALL FUNCTION 'CLOSE_FORM' EXCEPTIONS unopened = 1 bad_pageformat_for_print = 2 OTHERS IF sy-subrc <> 0.

DATA customers LIKE scustom OCCURS 100 WITH HEADER LINE. sbook. END OF sums.2 The solution program of the second exercise is called SAPBC460S_05B. DATA bookings LIKE sbook OCCURS 1000 WITH HEADER LINE. spfli.unit 5 *&----------------------------------------------------------* REPORT sapbc460s_05b . TABLES: scustom. PARAMETERS: form LIKE thead-tdform DEFAULT 'SAPBC460D_FM_05'. DATA: BEGIN OF sums OCCURS 10. s_fli FOR sbook-carrid DEFAULT 'LH' TO 'LH'. SELECT-OPTIONS: s_id FOR scustom-id DEFAULT 200 TO 200. DATA connections LIKE spfli OCCURS 1000 WITH HEADER LINE. forcuram LIKE sbook-forcuram. Any added program lines are highlighted. © SAP AG BC460 1-146 . *&----------------------------------------------------------* *& Report SAPBC460S_05B * *&----------------------------------------------------------* *& Example print program for training course BC460. forcurkey LIKE sbook-forcurkey.

options-tdnewid = 'X'. INCLUDE STRUCTURE itcpp. DATA BEGIN OF result. * Open print job options-tddest = '*'. DATA END * Get data SELECT * FROM scustom INTO TABLE customers OF result.DATA BEGIN OF options. INCLUDE STRUCTURE itcpo. DATA END OF options. SELECT * FROM sbook INTO TABLE bookings WHERE customid IN s_id AND carrid IN s_fli AND forcurkey NE space ORDER BY PRIMARY KEY. CALL FUNCTION 'OPEN_FORM' EXPORTING device © SAP AG = 'PRINTER' BC460 1-147 . WHERE id IN s_id ORDER BY PRIMARY KEY. options-tddelete = '*'. options-tdimmed = '*'. SELECT * FROM spfli INTO TABLE connections FOR ALL ENTRIES IN bookings WHERE carrid = bookings-carrid AND connid = bookings-connid ORDER BY PRIMARY KEY.

= 'X' = options = 1 = 2 = 3 = 4 = 5 = 6.dialog options EXCEPTIONS canceled device form options unclosed OTHERS IF sy-subrc <> 0. © SAP AG BC460 1-148 . * Open form of respective customer CALL FUNCTION 'START_FORM' EXPORTING form EXCEPTIONS OTHERS = 1. EXIT. WRITE 'Error in START_FORM'(002). = form IF sy-subrc <> 0. * Print form for all customers LOOP AT customers. ENDIF. * Set customer address scustom = customers. WRITE 'Error in OPEN_FORM'(001).

* Output column headings of main window CALL FUNCTION 'WRITE_FORM' EXPORTING element EXCEPTIONS OTHERS IF sy-subrc <> 0. element ITEM_HEADER'(004). = 'INTRODUCTION' © SAP AG BC460 1-149 . * Set column headings into TOP area of main window for * subsequent pages = 1. EXIT. element INTRODUCTION'(003). = 'ITEM_HEADER' = 1.EXIT. WRITE 'Error in WRITE_FORM. * Output introduction text CALL FUNCTION 'WRITE_FORM' EXPORTING element EXCEPTIONS OTHERS IF sy-subrc <> 0. ENDIF. EXIT. WRITE 'Error in WRITE_FORM. ENDIF. ENDIF.

CALL FUNCTION 'WRITE_FORM' EXPORTING element function type EXCEPTIONS OTHERS IF sy-subrc <> 0. = 'ITEM_HEADER' = 'SET' = 'TOP' IF sy-subrc = 0. LOOP AT bookings WHERE customid = customers-id. ENDIF. = 1. ENDIF. REFRESH sums. top element ITEM_HEADER'(005). * Get departure time READ TABLE connections WITH KEY carrid = bookings-carrid connid = bookings-connid. * Customer bookings CLEAR sums. CLEAR spfli. EXIT. WRITE 'Error in WRITE_FORM. ELSE. © SAP AG BC460 1-150 . sbook = bookings. spfli = connections.

© SAP AG BC460 1-151 = 'ITEM_HEADER' = 'DELETE' = 'TOP' = 1. EXIT. . ENDLOOP. EXIT. " at bookings * Delete column headings from TOP area of main window CALL FUNCTION 'WRITE_FORM' EXPORTING element function type EXCEPTIONS OTHERS IF sy-subrc <> 0. WRITE 'Error in WRITE_FORM. WRITE 'Error in WRITE_FORM. = 'ITEM_LINE' * Add current position to corresponding entry in table sums MOVE-CORRESPONDING sbook TO sums. COLLECT sums. delete element ITEM_HEADER'(007).* Print item CALL FUNCTION 'WRITE_FORM' EXPORTING element EXCEPTIONS OTHERS IF sy-subrc <> 0. ENDIF. = 1. element ITEM_LINE'(006).

EXIT. element SUM'(009). MOVE-CORRESPONDING sums TO sbook. WRITE 'Error in WRITE_FORM. CALL FUNCTION 'WRITE_FORM' EXPORTING element EXCEPTIONS OTHERS IF sy-subrc <> 0. ENDIF. * Print final remark CALL FUNCTION 'WRITE_FORM' EXPORTING element EXCEPTIONS OTHERS IF sy-subrc <> 0. " at sums = 1. = 'SUM' = 1. * Print sum LOOP AT sums. element CLOSING_REMARK'(008).ENDIF. EXIT. ENDLOOP. = 'CLOSING_REMARK' © SAP AG BC460 1-152 . ENDIF. WRITE 'Error in WRITE_FORM.

EXIT. WRITE 'Error in CLOSE_FORM'(011). /E IM = = ITEM_LINE &SBOOK-CARRID&... WRITE 'Error in END_FORM'(010).&SBOOK-FORCURKEY&. &SPFLI-DEPTIME&. ENDIF.&SBOOK-FORCURAM&. 1 2 Copy the paragraphs IL to IM and add a sixth tab position: 15 CM. EXIT.* Close customer form CALL FUNCTION 'END_FORM' EXCEPTIONS OTHERS IF sy-subrc <> 0..&SBOOK-CONNID&. ENDIF.. The text element ITEM_LINE is defined as follows: = 1. = result " at customers = 1. ENDLOOP. LEFT. * close print job CALL FUNCTION 'CLOSE_FORM' IMPORTING result EXCEPTIONS OTHERS IF sy-subrc <> 0.. The solution form is called SAPBC460S_FM_05..&SBOOK-FLDATE&. &SPFLI-CITYTO(8)& © SAP AG BC460 1-153 .

. The text element ITEM_HEADER is defined as follows: /E IJ ITEM_HEADER Flight.&SBOOKFORCURKEY&.&SBOOK-CONNID&..3 4 Copy the paragraphs IH to IJ and add a forth tab position: 15 CM...&SPFLI-CITYTO(8)& /: ENDIF Activate the form and execute Z_BC460_EX_## with your new form. Depart.&SBOOK-FORCURAM&. Destination 5 The text element ITEM_LINE reads as follows: / Delayed departures at New York Airport due to strikes of the American flight controllers!</> /: ENDPROTECT /: ELSE IM &SBOOK-CARRID&. Date....&SBOOKFLDATE&.. LEFT. Price..&SPFLI-DEPTIME& = .. 6 The ADDRESS window is defined as follows: /: ADDRESS PARAGRAPH AS /: TITLE &SCUSTOM-FORM& /: NAME &SCUSTOM-NAME& /: STREET &SCUSTOM-STREET& /: POSTCODE &SCUSTOM-POSTCODE& /: CITY &SCUSTOM-CITY& /: COUNTRY &SCUSTOM-COUNTRY& /: FROMCOUNTRY 'DE' /: ENDADDRESS © SAP AG BC460 1-154 .

Styles Contents: Defining and using styles © SAP AG 2001 © SAP AG BC460 1-155 .

Styles: Objectives At the end of this unit. you can: Create and maintain styles Use styles © SAP AG 2001 © SAP AG BC460 1-156 .

. To access it from within form maintenance or standard text maintenance.. choose Format -> Character and Format -> Paragraph....6. To do so.. change styles. such as those for electronic mail messages or online documentation.. in the editor.1/ 1 ----------CU Italic. SAPscript provides several standard styles... the paragraph and character format definitions used in this style override those of the current form. choose Tools -> Form printout -> SAPscript -> Style.. choose Format -> Change style..+. find existing styles or display all available styles. Besides the definitions in the form.. this is an additional method to format text.... underlined G1 Outline level 1 Outline level 2 Outline level 3 F4 G2 G3 © SAP AG 2001 You define paragraph and character formats in styles that are then available independently of the existing forms. To make temporary style changes within a document... To display all formats defined in a style. First level Second level Third level F... You use the style maintenance transaction to create new styles..+. use the control command /: STYLE.+. When you assign a style...+...5....2.. You can assign a style to any text.. © SAP AG BC460 1-157 ...3. This is an outline: => First level => Second level => Third level ----------MYSTYLE---------System-------------Lines 1 . The format definitions in the form have no effect then. B You have assigned a STYLE to this text..+. choose Environment -> Style.+. To access the style maintenance transaction.4. Description G3 AS B Outline level 3 Standard paragraph Bold CU This is an outline: G1 G2 G3 Format column(1) 6 En.1.......+ You have assigned a style to this text..Styles: A Formatting Aid ........

Styles: Summary of the Unit You can now: Create and maintain styles Use styles © SAP AG 1999 © SAP AG BC460 1-158 .

Form Printing: The Next Generation Contents: Objectives and advantages of SAP Smart Forms © SAP AG 2001 © SAP AG BC460 1-159 .

The Next Generation: Unit Objectives At the conclusion of this unit. you will be able to: List the objectives and advantages of SAP Smart Forms © SAP AG 2001 © SAP AG BC460 1-160 .

© SAP AG BC460 1-161 . the system automatically generates the associated ABAP code in the form of a function module. This eliminates the maintenance effort in the print program. The Form Builder gives you an overview of all components used in the form (see next slide). When you activate your SAP Smart Form.SAP Smart Forms: Objectives • Clear representation of the form logic • Reduced maintenance effort (by approximately 50%) • Automatic generation of the ABAP code © SAP AG 2001 SAP Smart Forms are maintained in the SAP Form Builder. You integrate this module with your data retrieval program.

© SAP AG BC460 1-162 . The SAP Form Builder is divided into three areas: On the left-hand side: The navigation tree. The Form Painter is used to define the layout of a page. ADDRESS Address INFO Clerk SENDER Sender NEXT Next page Window Description MAIN Letter text SENDER INFO Gen. You can hide the Form Painter if you wish: Utilities → Form Painter on/off. You can also enter text with the editor or use the Table Painter to determine the layout of a table. This screen has several tabs on which you set and change the attributes of the node currently selected.Areas of the SAP Form Builder Form Edit Goto Utilities Environment System Help SAP Form Builder: Change Form ZBC470_INVOICE FormZBC470_INVOICE Global settings Pages and windows FIRST First page LOGO Company logo MAIN Main window INTRO Salut. you use the graphical SAP Form Builder. attributes Output options Cond. such as the position and size of text windows and graphics. On the right-hand side: The Form Painter. You can additionally display the field list with variables below the navigation tree. The individual form elements (such as pages or graphics) are represented by nodes. ADDRESS MAIN Main window Navigation tree © SAP AG 2001 Maintenance screen Form Painter To edit forms using SAP Smart Forms. You can select nodes to edit by double-clicking them in the navigation tree or the Form Painter. In the middle: The maintenance screen. This tree graphically displays the hierarchy of the SAP Smart Form.

For example. In SAP Smart Forms.SAP Smart Forms: Advantages • No control commands required • Table processing using SAP Smart Forms • Clearly defined interface between the form and the application program © SAP AG 2001 The technology of the SAPscript control commands is replaced with a new concept in SAP Smart Forms. displaying items in complex tables requires a large number of tasks to be performed in the form and print program. In SAPscript. you can use SAP Smart Forms to display the items with a dynamic table grid. SAP Smart Forms also support the output of documents in XML format. This new concept is more intuitive and has been necessary because the function module is generated automatically. © SAP AG BC460 1-163 . this is automated using nodes.

00 Tax 3344563125667 DEM 2. 6NOV00 Flight Cl.59 Please do not write on or stamp this field.00 2.00 1.200.00 USD 1.00 669. they are both designed with the Table Painter tool.400.860. are completely defined in the Form Painter.00 USD USD USD DEM DEM DEM DEM To Carr.Tables and Templates Table Your bookings: Flight Date AA017 12/16/2000 AA017 12/31/2000 Sum for AA LH400 11/17/2000 LH402 11/17/2000 LH403 12/12/2000 Sum for LH Total Template Name of passenger (not transferrable) Issued YILMAZ/E MS Price 1.00 1. For example. This means that the type and the number of their cells cannot be modified at application program runtime.00 DEM Total 52. © SAP AG BC460 1-164 .00 581.200. Templates. however. depending on the type and the number of records read by the application program from the database.860. and they use different line types.00 610. Date Time FRANKFURT BERLIN TXL Flight price LH LH 2362 2351 L 27NOV 1840 L 28NOV 1910 Form and serial number DEM 350. DEM 402.59 • Layout • Size © SAP AG 2001 Only at runtime • Layout fixed • Size fixed Tables and templates have several things in common. You therefore use templates primarily for external forms. The most important difference between them is how their layout is determined: The precise layout and the length of tables can only be determined at runtime.400.

© SAP AG BC460 1-165 .Future of SAPscript • SAP provides continued support for SAPscript forms • You can continue to use SAPscript forms • You can use SAPscript text modules in SAP Smart Forms © SAP AG 2001 You can use SAPscript forms simultaneously with SAP Smart Forms. SAP does not plan to further develop SAPscript. In the long term. you should therefore convert your SAPscript forms into SAP Smart Forms. However. SAP provides continued support for SAPscript forms.

Since.6C • SAPscript forms and SAPscript styles can be converted into SAP Smart Forms and Smart Styles (using the migration tool.SAPscript to SAP Smart Forms Migration • SAP Smart Forms are available as of Release 4. the display of tables in SAPscript is primarily implemented using the print program. some adjustments may be required) © SAP AG 2001 You can find the function to convert SAPscript forms into SAP Smart Forms in the Utilities menu of the SAP Smart Forms maintenance transaction as of Release 4. © SAP AG BC460 1-166 . for example.6C. you must adjust such functions to the new SAP Smart Forms technology after migrating the form.

The Next Generation: Unit Summary You are now able to: List the objectives and advantages of SAP Smart Forms © SAP AG 2001 © SAP AG BC460 1-167 .

Modifications

Contents:
Assigning print programs to forms Change procedure Transporting SAPscript objects

© SAP AG 2001

© SAP AG

BC460

1-168

Modifications: Objectives

At the end of this unit you can: Assign print programs to forms during Customizing Explain what changes made to the SAP Standard mean to the end user List considerations when you correct and transport SAPscript objects

© SAP AG 2001

© SAP AG

BC460

1-169

Form Printing Procedure

RVADOR01 Create purchase order Transaction SAPMV45A VA01 Order confirmation
Print program

RVORDER01 Form Printer

Assignment stored in Customizing
Art. BA00 BA00 Medium Program 1 RVADOR01 2 RVADOR01 Form RVORDER01 RVORDER01

© SAP AG 2001

Forms can be printed automatically from a customer request, such as a purchase order. The above example is a simplified representation of just such a process. The customer submits an order. The system creates a purchase order. Order confirmation is generated when the purchase order is saved and this is sent to the customer to confirm that his order is being processed. The name of the form that is created, together with its print program, is stored in the corresponding application component during Customizing. If you want to use a different form or print program for printing, you should store it in your application component during Customizing.

© SAP AG

BC460

1-170

Enhancements to the SAP Standard

SAP delivers standard forms for all applications SAP also delivers corresponding print programs for these forms Sometimes forms must be altered to conform to customer needs Often forms can be changed to meet customer needs without having to alter the corresponding print program

© SAP AG 2001

SAP delivers standard forms for all applications as well as the corresponding print programs for these forms SAP standard forms can be altered to meet customer needs Often forms can be changed to meet customer needs without having to alter the corresponding print program

© SAP AG

BC460

1-171

Hence. this is called a modification. Only make changes to an SAP print program after having seriously considered whether the modifications are absolutely necessary.When is it necessary to alter the print program? Additional data is needed Structural changes New text elements are needed Print program used to print different form © SAP AG 2001 Whenever SAP objects are altered. it is necessary to use a copy of the print program delivered by SAP when making changes to it. Modified objects are not protected from changes made during upgrades. Reasons to change an SAP print program: Need Structural changes New text elements are needed Print program used to print additional forms Additional data needed Action Change necessary Change necessary Change necessary Change may be performed if desired © SAP AG BC460 1-172 .

Making Changes (1) Which new fields and which new tables are needed? Do these fields already exist in the tables already available or are new fields and tables necessary? Which program and which form are affected? © SAP AG 2001 Sometimes you need more data than is provided to you by the standard. Before making any changes. Are these fields already available in the tables already being used or do you need additional tables? Have the table fields that you need already been supplied with data? Open up your application component in Customizing and note the forms and programs you are currently using to fulfill your needs. © SAP AG BC460 1-173 . try to get a clear overview of exactly which additional fields you need.

Such customer exits remain intact during upgrades and do not need to be subsequently adjusted. includes already exist that have been created by SAP application developers and that you can use to include your enhancements. In some cases. Execute the PERFORM command in your form and write the subroutine called in a separate program in the customer namespace. Be aware that additional data can be retrieved using the PERFORM command in SAPscript. or if it will be sufficient to simply alter your form. © SAP AG BC460 1-174 .Making Changes (2) Does the print program have to be changed or only the form? Can the data you need be delivered by another program using a PERFORM statement? Do SAP enhancements already exist in the shape of customer exits? © SAP AG 2001 Consider carefully whether it is necessary to change the print program. The subroutine then retrieves the additional data you want.

To do this. Test your changes. Use the SAP standard as a model for enhancements. print programs to the customer namespaces Z and Y • Change copies • Store new forms and print programs in Customizing • Test changes © SAP AG 2001 Avoid making modifications if at all possible. When making changes to an SAP standard form. Store your newly created forms and print programs in Customizing. copy the print program to one of the customer namespaces (Z or Y) and then make your changes to the copy. © SAP AG BC460 1-175 . if necessary. Whenever a form's structure has been altered. make a copy of it in one of the customer namespaces (Z or Y) and then make your changes to the copy. its print program will likely require changes as well.Making Changes (3) • Copy SAP standard forms and.

Then. SAP standard forms are. the system checks to see if the form exists in client 000. You can make use of this kind of cross-client form access by storing your forms in client 000. whenever your form is not available in the current client.Requesting Forms Form request RVORDER01 Form request RVORDER01 Client 400 RVORDER01 is not available in clients 400 and 401 Client 401 All SAP forms are available in client 000 Client 000 © SAP AG 2001 Forms are client-dependent. except for the SAP standard forms stored in client 000. it is then made available in the current client. Whenever a form is not available in the current client. If the form exists in client 000. the system will automatically access the version available in client 000. forms are only available in the client in which they were created. This means that. © SAP AG BC460 1-176 . all stored in client 000. as a matter of course. Forms in client 000 have a special status.

Client 000 is entered as the default source client. Enter the name of the form to be copied and choose a name for the target form in the current client. it must be available in the current client. In order to copy a SAP standard form. © SAP AG BC460 1-177 . Call the form maintenance transaction (SE71) and choose Utilities -> Copy from Client.Copying Forms Between Clients Program Edit Goto System Help Copying Forms Between Clients Form name Source client Target form x RVORDER01 000 ZRVORDER01 Original language only Action log © SAP AG 2001 SAP standard forms are client-dependent.

... Now you can edit the program you have copied. insert the new print program at the appropriate point in Customizing.... enter the name of the copied program in customer namespace Z or Y and choose Copy . © SAP AG BC460 1-178 .Copying Print Programs Program Edit Goto Utilities Environment System Hilfe ABAP Editor: Request Program Sub-objects RVADOR01 Create Source text Variants . Program . Source program Target program Copy RVADOR01 ZZZDOR01 © SAP AG 2001 To copy print programs. call the ABAP Editor from the ABAP Workbench. After you have made the changes you want. In the dialog box. Enter the name of the program you want to copy and choose Copy ..

Test Printing

Delivery note
XXXXXXXX XXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX

Date
XXXXXXXXXX

Number
XXXXXXXXXXXXXXXXXXXXX

Print preview of the form maintenance screen (without print program)

/E HEADER_DATA ... IF &VBDKL-INC01& NE &SPACE&
Terms of delivery
XXX XXXXXXXXXXXXXXXXXXXX

... /E HEADER_TEXT INCLUDE SD_RVADDN01 OBJEKT ... ... ...

© SAP AG 2001

You always use a print program when printing a form. If you want to preview your document before printing it without actually starting the print program, choose Utilities -> Test print in the form maintenance transaction. The print preview that you get using this function is, however, not an exact representation of what your form will look like when it is output to a printer. Symbols that are filled by a program at runtime are represented by 'x's, for example, and the sequence of text elements with names is not the same during a test print as in a 'real' printing. Also, control commands are displayed in a test print. Starting with 4.6C, graphics are displayed in the preview.

© SAP AG

BC460

1-179

Transporting SAPscript Objects

SAP System

SAP System

Jane Doe 14 Wildman Way Moscow, ID 80801 USA

Transport with Workbench Organizer or Customizing Organizer

Jane Doe 14 Wildman Way Moscow, ID 80801 USA

Object list
PgmID Obj Object name R3TR Form ZRVORDER01 ...
© SAP AG 2001

From Release 3.0A, the SAP transport system is available for transporting forms and styles. The first time an object is saved, a dialog box connected to the Workbench Organizer (WBO) is displayed. Workbench Organizer functionality allows you to transport objects out of development clients and into other clients without hassle. Client 000 is the default target client for such transport. By transferring your forms and styles to this client, you make them available to all clients (see the slide on Requesting Forms). From Release 4.0, texts administered by SAPscript (standard texts, for example) can be transported using the Customizing Organizer. Prior to Release 4.0 please use the Workbench Organizer for such transport. If you want to transport documents of this type, they must first be manually attached to a transport request in the Customizing Organizer. Enter the following after double-clicking on the task number: R3TR TEXT <OBJECT>,<NAME>,<ID>,<L> (OBJECT = text object, NAME = text name, ID = text ID, L = text language) After attaching your document a transport request, all standard transport functions of the Customizing Organizer are available.

© SAP AG

BC460

1-180

Client-Specific Transport

SAP System

SAP System

Source system
Jane Doe 14 Wildman Way Moscow, ID 80801 USA

Target system

Export

Jane Doe 14 Wildman Way Moscow, ID 80801 USA

Import
Client xxx

Client 000 and development client or other arbitrary client

© SAP AG 2001

SAPscript texts, styles and forms are client-specific. During transport request export, make sure that your SAPscript objects are available in the client where the transport request is released. From Release 3.0, export takes place from the source system client where the transport request is released. Prior to Release 3.0 export takes place from source system client 000. From Release 4.0, all transports are made into target system client 000 as well as into an additional client that can be either a development client or another client explicitly specified during the import process (using transport control program TP). In Release 3.0x/3.1x, all transports are made into target system client 000 or into another client explicitly specified during the import process (using transport control program TP).

© SAP AG

BC460

1-181

Modifications: Summary of the Unit

You can now: Understand the concepts behind assigning a form to a print program during Customizing. Handle changes to the SAP Standard. Understand the considerations you have to make when correcting and transporting SAPscript objects.

© SAP AG 2001

© SAP AG

BC460

1-182

The purpose of this exercise is to familiarize you with a real SAP print program and SAP form. 1-1 See Appendix A. the print program must also be altered to reflect these needs. 1-3 What are the names of the program and of the form for the BA00 Order Confirmation? BC460 1-183 © SAP AG . In some cases. 1 Find in Customizing configuration area that assigns forms and print programs for SD Order output documents. Choose Tools -> Business Engineer -> Customizing -> Execute project ->SAP Reference IMG Follow the following path within the IMG 5 5 5 5 5 5 Sales and Distribution Basic Functions Output Control Output Determination Output Determination Using the Condition Technique Maintain Output Determination for Sales Documents 1-2 0 Σ Maintain Output Types Then select Output type BA00 and a processing routine.Exercises Unit: Modifications • • Example of possible changes that could be made to the SAP standard Illustration of how forms are assigned a print programming in Customizing In most cases. standard forms are altered to reflect the needs of individual customers.

Find the program symbol that is used to display the PO number.2 Display the sales confirmation for an order on your screen. Print the screen output using Sales document->Issue output to->Screen Select output type BA00 and choose Execute When the Issue Output screen displays. select Execute again. however. use the same sales order as in 2. 2-1 Choose Logistics->Sales and Distribution->Sales Order->Display Enter the order number. 2-4 What is the PO Number? This is also known as the reference number. 2-2 2-3 3 What is the screen field name for the PO number? 3-1 3-2 3-3 On the Display Sales Order screen choose Enter. This is common. What is the screen field name? 4 Display the form for the sales confirmation. Your instructor will provide a sales order number for you. Choose F1 and then Technical information. switch to the Form Painter. 4-1 Which window on the FIRST page corresponds to the area on the printout that contains the PO number? What is the field name? Note that the table name is different from the screen name in exercise 3. To do this. Note the PO number. the field name is the same. but not a rule. 4-2 © SAP AG BC460 1-184 . Find the PO number on the overview screen Position your cursor on the field.

Are they available in the program? Is the transparent table that contains the PO number in 3 available to the program? Can you find the structure table that the form uses to display the PO number? 6-2 6-3 7 The business unit would like the sales confirmation to include the telephone number of the person that placed the order. Observe the following structure of ITEM_PRINT: Print Item header information Loop record-wise through an internal table (tvbdpa) Create print condition of various items for the form. 6-1 Some of the sales order tables are VBAK (header). On the Display Sales Order Overview screen choose Goto->Header->Purchase order data What is the field name on the screen? What would the symbol name be in the form? What other things would you have to consider when adding this field to the window? 7-2 7-3 7-4 © SAP AG BC460 1-185 . Develop a strategy for accomplishing this. 5-1 In the coding start at FORM PROCESSING and observe the following structure of the program: Get the data for the form. It should be placed in the same window as the PO number. 7-1 This field can be found on the order. and VBKD (business data). Print header information Print item information Print ending information Close the form. Open the form.5 Display the print program for the sales confirmation. switch to the ABAP Editor. To do this. VBAP (item). Review the structure. Endloop 5-2 6 Observe that the transparent tables for the Sales Order are not available to the print program.

The sales document tables are NOT available in the program. If you want to insert only one line.Solutions Unit: Modifications • • Example of possible changes that could be made to the SAP standard Illustration of how forms are assigned a print programming in Customizing In most cases. the symbol is called VBDKA-TELF1. The window of page FIRST that contains the PO number is INFO (see print preview). In the form. The names of the program and the form for the order confirmation are: Program: Form: RVADOR01 RVORDER01. © SAP AG BC460 1-186 . you must enlarge the window. The field name in window INFO is VBDKA-BSTKD. there is no need to adapt the sizes of other windows. The transparent table VBKD is NOT available in the program. The screen field name for the order number is VBKD-BSTKD. the print program must also be altered to reflect these needs. The field name on the screen for the phone number of the ordering customer is VBAK-TELF1. Table VBDKA is available in the program. Make sure that there is enough space in the window to insert an additional line. If there is not enough space. In some cases. standard forms are altered to reflect the needs of individual customers. The PO number depends on the sales order.

Font Maintenance Contents: System fonts and printer fonts System barcodes and printer barcodes © SAP AG 2001 © SAP AG BC460 1-187 .

Font Maintenance: Objectives At the end of this unit you can: Explain differences between system fonts and printer fonts Maintain system fonts and printer fonts © SAP AG 2001 © SAP AG BC460 1-188 .

Font Maintenance: Overview R/3 SAPscript Font Maintenance Font families Text entry in fonts used by SAPscript System fonts Printer fonts/AFM metrics System barcodes Printer barcodes © SAP AG 2001 All fonts and barcodes used in SAPscript are administered in the SAPscript font maintenance transaction. To access this transaction. screens. © SAP AG BC460 1-189 . They are independent of available output devices. telex machines and so on). choose Tools -> Word Processing -> Administration -> Font. System fonts represent the font selections that can be used for styles and forms. There is also a flag to show whether the fonts are proportional or equidistant. Printer fonts are the fonts available to SAPscript on existing device types (printers. The usable font names for system and printer fonts are entered in font families.

The printer is controlled by various printer drivers who convert the internal SAPscript output format (OTF. You assign drivers to devices types in the spool administration transaction. you need to maintain replacement fonts for each font family. Conversions between system fonts and printer fonts are displayed in font maintenance. © SAP AG BC460 1-190 . or to convert a number of different system fonts for a single printer device.System Fonts and Printer Fonts R/3 Maintain system fonts Fonts for text layout Maintain printer fonts Combination of system fonts and device type Driver Conversion of system fonts to printer specific fonts © SAP AG 2001 SAPscript provides for automatic conversion between system fonts appearing in a given document and printer fonts installed on a particular printer. The control sequences are mostly defined using print controls. You can. for example. choose to convert a given system font for a number of different printer devices. output text format) into control sequences that can be interpreted by printers. To enable this conversion.

You maintain print controls using the spool administration transaction. When a bar code is printed. another print control. an 8-digit number).System and Printer Bar Codes R/3 Maintain system barcodes Display using the character string attribute barcode Maintain printer barcodes Opens connection to print controls Driver Converts system barcodes to printer specific control sequences © SAP AG 2001 The character string attribute Barcode allows you to output barcodes using SAPscript. To access this transaction. For printer types which support bar code printing. the printer bar code establishes a connection with the device-specific control sequence known as a print control. © SAP AG BC460 1-191 . Finally. You maintain the various bar code types independently of any device as system bar codes. This is followed by the bar code data (for example. Spool -> Spool administration. a print control called the bar code prefix is first sent to the printer. is sent. choose Tools -> CCMS . called the bar code suffix.

You use the spool administration transaction to maintain print controls for individual device types. © SAP AG BC460 1-192 . In the font maintenance transaction. Print controls are responsible for controlling printer fonts and printer bar codes. only the symbolic name of the print control is entered for printer fonts and printer bar codes.Print Controls R/3 HPLJ4 Courier Font maintenance Printer fonts 120 X _ 10 CPI SF003 SF003 Printer bar codes HPLJ4 EAN8 SBP01 SBS01 Spool Management HPLJ4 HPJL4 SBP01 SBS01 xxxxxxxx yyyyyyyy Printer command for setting Bar codes on / off Printer command for font conversion HPLJ4 © SAP AG 2001 SF003 zzzzzzzz A print control is a control sequence for an output device that is addressed using a symbolic name.

Font Maintenance: Summary of the Unit You can now: Understand the differences between system fonts and printer fonts. Maintain system and printer fonts. © SAP AG 2001 © SAP AG BC460 1-193 .

parts or all of it may not be used during the course. © SAP AG 2001 © SAP AG BC460 1-194 . Therefore.Appendix This unit contains additional information you can reference. This information is not part of the standard training course.

Appendix A: SAPscript Programming Interface Contents: SAPscript programming interface functions Initializing and changing text Searching for text Updating text Saving text directly © SAP AG 2001 © SAP AG BC460 1-195 .

delete) in document administration. change. © SAP AG 2001 © SAP AG BC460 1-196 . Understand how to save SAPscript texts using the update procedure. save. Describe how application transactions work that use SAPscript texts.Appendix A: Objectives At the end of this unit you can: Name the functions and purposes of the most important SAPscript function modules (read.

Saves.initializing and changing text using the Editor . Typical functions include: . and deleting text . change.Programming Interface Functions Text header Text lines Communication using function modules STXL Initializes Searches Reads.generic searching for text . saving.reading. Deletes Changes Database SAPscript text © SAP AG 2001 The programming interface consists of a range of function modules used to create.updating text in the database © SAP AG BC460 1-197 . and administer SAPscript text.

The line table contains the text lines.Initializing and Changing Texts Work areas for SAPscript text in the print program: HEADER: Text header (field string with Dictionary structure THEAD) LINES: line table (internal table with Dictionary structure TLINE) INIT_TEXT: initializes work areas in the program required to create a new text. The command CLEAR HEADER is not sufficient. To transfer the text to be edited to the function module EDIT_TEXT. EDIT_TEXT: calls the Editor. The text header contains all administration data belonging to a document. © SAP AG BC460 1-198 . initialize the work areas using INIT_TEXT. the function module SAVE_TEXT is automatically called. use EDIT_TEXT. using input parameters. such as the display or change mode. © SAP AG 2001 You should prepare a text header and line table for every document to be edited by an applications program. To suppress this function. which allows you to enter data into a new or existing text. The HEADER is filled with administration data. When you create a new text. use the parameter SAVE = SPACE. use HEADER and LINES. The HEADER and LINES serve as transfer parameters. The LINES are deleted. To call the long text Editor. You can control numerous functions. When you choose Text → Save while using EDIT_TEXT.

The text key contains four components: OBJECT ID NAME LANGUAGE .Text language You can select text generically with SELECT_TEXT by using an asterisk “*”.Text name . © SAP AG BC460 1-199 . Displays a text catalog Entry: Output: Text key (generic entries are permitted) Table with header information on all texts found © SAP AG 2001 The function module SELECT_TEXT generates a table with the text headers of all text modules corresponding to the search key.Searching for Text SELECT_TEXT: Selects text on the basis of the search criteria given by the user.Text ID .Text object . SAPscript texts are client-specific.

D=direct without update) is an attribute of an entire document class. that is. The text memory contains all of the text changes made in the applications program.The Text Update Process READ_TEXT Database Tables RE AD _T EX SA T VE _T EX T COMMIT WORK T1 T2 T3 T4 T5 T4 Insert Delete Update Delete T1 DELETE_TEXT COMMIT_TEXT Table of updated orders Text Memory © SAP AG 2001 Most SAPscript documents in the application programs are saved via the update procedure. The backup mode (V=update. © SAP AG BC460 1-200 . The R/3 Update concept is explained fully in the R/3 Documentation. all text changes are lost and the update is terminated. To store changes to a text in the database: . of all documents allocated to a particular text object.Use COMMIT_TEXT . all function modules work with the text memory. The developer defines this mode in a separate transaction (Tools -> SAPscript ->Administration -> Settings). When you save a text via the update procedure.Use the ABAP/4 command COMMIT WORK If you fail to follow the two steps above.

D = Deleted text To delete text from the text memory or database. © SAP AG BC460 1-201 .Object . and Deleting Text READ_TEXT: Reads a single text from the text memory or database in the work area Entry: Text key Output: HEADER and LINES SAVE_TEXT: Stores a single text from the work area in the text memory or database Entry: HEADER and LINES DELETE_TEXT: Deletes one or more texts in the text memory or database Entry: Text key (can be generic) © SAP AG 2001 The function module READ_TEXT reads a text from the text memory or database into the internal work areas HEADER and LINES. Texts are either deleted immediately or recorded in the text memory.Language Generic entries are not permitted. To define the text key you must specify: . which are parts of the print program. use DELETE_TEXT.ID . To store a text module in the text memory or database. Generic entries for the text key are permitted.U = Changed text .I = New text . use SAVE_TEXT.Reading. Saving. The parameter FUNCTION returns one of the following: . depending on the text object.Name .

Use the ABAP/4 command COMMIT WORK COMMIT_TEXT does not replace the ABAP/4 command COMMIT WORK. You can call COMMIT_TEXT and COMMIT WORK only once per logical unit of work (LUW).Updating Texts COMMIT_TEXT: Updates text from the text memory in the update file Text memory is empty after successful call COMMIT WORK: Call from within an application program (ABAP command) Necessary for storing texts in the database © SAP AG 2001 When the R/3 System saves texts (or data in general) via update. To store text changes for the text update procedure: . this takes place asynchronously in a separate process. the text memory is empty. namely the update task. After COMMIT_TEXT has been executed.Use COMMIT_TEXT . and you must do so at the end of the procedure. If you fail to execute either COMMIT_TEXT or COMMIT WORK. © SAP AG BC460 1-202 . all text changes are lost.

When you define SAVEMODE_DIRECT = ’X’. the function modules SAVE_TEXT and DELETE_TEXT proceed as shown above. that is. For mass processing of texts (such as transport. © SAP AG BC460 1-203 . of all texts allocated to a particular text object. SAVEMODE_DIRECT works only once. The developer defines this mode in a separate transaction (Tools -> SAPscript -> Administration -> Settings). or company reorganization). use the parameter SAVEMODE_DIRECT. The backup mode (V=update. you can save texts directly in the database.Saving Text Directly TTXID TTXOB INIT_TEXT REA D_TE XT XT EDIT_TEXT SAV E_TE DELETE_TEXT Database Tables © SAP AG 2001 SAPscript Editor As an alternative to the update file. D=direct without update) is an attribute of an entire text class. NOTE: Do not mix “normal” updates with SAVEMODE_DIRECT under any circumstances. for a single call of the corresponding function module. To make use of this temporary mode under SAVE_TEXT or DELETE_TEXT. This applies to all texts whose text object has the backup mode D. client copies. you can specify the backup mode temporarily as D.

change. Describe how application transactions work that use SAPscript texts. delete) for text administration. save. © SAP AG 2001 © SAP AG BC460 1-204 .Appendix A: Summary of the Unit You can now: Name the functions and purposes of the most important SAPscript function modules (read. Understand how to save SAPscript texts using the update procedure.

Appendix B: Customizing R/3 Forms Contents: Customizing Form Overview Invoice form (SD) Order form (MM) Account statement (FI) © SAP AG 2001 © SAP AG BC460 1-205 .

Navigating to Form Customizing Implementation Guide Edit Goto Additional information Utilities System Help Display Implementation Guide Implementation Guide for R/3 Customizing Global Settings Enterprise Structure Cross-Application Components Financial Accounting Treasury Controlling Investment Management Sales and Distribution Materials Management Logistics . you can branch to the appropriate application (such as Financial Accounting. Logistics General or Sales and Distribution). The Enterprise Implementation Guide (IMG) is a subset of the SAP Reference IMG (from which it is generated). choose Tools → Business Engineer → Customizing. then SAP Reference IMG. © SAP AG BC460 1-206 . From this menu.General © SAP AG 2001 To access the R/3 Customizing Implementation Guide.

. Maintain Output Determination for Sales Documents Maintain Condition Tables Maintain Output Types .....Invoice Form SD (1) Implementation Guide Edit Goto Additional information Utilities System Help Display Implementation Guide Sales and Distribution Basic Funktions Output Control Output Determination Output Determination Using the Condition Technique Maintain Output Determination for . choose Sales and Distribution → Basic Functions → Output Control → Output Determination → Output Determination Using the Condition Technique → Maintain Output Determination for Sales Documents → Maintain Output Types. © SAP AG BC460 1-207 .. © SAP AG 2001 To assign print programs to forms within SD.

© SAP AG BC460 1-208 .Invoice Form SD (2) Table view Edit Goto Additional information Utilities System Help Display view 揙 utput types": Overview Output types V1 Outtut types Output program Out Name BA00 Order confirmation © SAP AG 2001 Select an output type and double-click on Output programs.

The message type indicates the type of form to be used. The medium indicates how the message is to be sent. If you want to change the print program or the form.. Column 3 contains the entries for the standard print programs. you should enter your own object (or a modified object) at this point. Prog RVADOR01 RVADOR01 Form ENTRY ENTRY Form RVORDER01 RVORDER01 © SAP AG 2001 Here. © SAP AG BC460 1-209 .. the assignment of print program and form is determined.Invoice Form SD (3) Table view Edit Goto Additional information Utilities System Help Display view 揙 utput programs? Overview Output types Output type Application BA00 V1 Output program Output programs Med 1 2 6 Name Print output Telefax .according to the message type.

© SAP AG BC460 1-210 . select Materials Management → Purchasing →.Order Form MM (1) Implementation Guide Edit Goto Additional information Utilities System Help Display Implementation Guide Messages Texts for Messages Forms (Layout Sets) for Messages Adjust Form for Purchasing Documents Assign Form and Output Program for RFQ Assign Form and Output Program for Purchase Order © SAP AG 2001 To assign print programs to forms within Materials Management (MM).Messages → Forms for Messages → Assign Form and Output Program for Purchase Order.

The overview contains the entries of the standard programs. Med Prog SAPFM06P SAPFM06P SAPFM06P Form Form ENTRY_AUFB MEDRUCK ENTRY_MAHN MEDRUCK ENTRY_NEU MEDRUCK Dunning Sales order Text © SAP AG 2001 Text Depending on the output type. enter your own object on this screen.Order Form MM (2) Implementation Guide Edit Goto Additional information Utilities System Help Change view 揙 utput: Output programs? Overview Text Out. © SAP AG BC460 1-211 . dunn. If you want to change the print program or the form.. AUFB MAHN NEU Name Sales conf. you use this view to assign a print program to a form..

. choose Financial Accounting → Financial Accounting Global Settings → Correspondence → Define Form Names for Correspondence Print.Account Statement FI (1) Implementation Guide Edit Goto Additional information Utilities System Help Display Implementation Guide Financial Accounting Financial Accounting Global Settings Correspondence Define Correspondence types . an account statement).. © SAP AG BC460 1-212 . Define Form Names for Correspondence Print © SAP AG 2001 To assign print programs to correspondence within FI modules (for example.

© SAP AG BC460 1-213 .Account Statement FI (2) Implementation Guide Edit Goto Additional information Utilities System Help Change view Forms for correspondence? Overview Prog Prog FoID Form F140_PAY_CON_050 F140_PAY_CON_051 F140_PAY_CON_052 F140_ACC_STAT_03 RFKORD00 Print program: Payment confirmation 50 RFKORD00 Print program: Payment confirmation 51 RFKORD00 Print program: Payment confirmation 52 RFKORD10 Print program: Account statement Position VB © SAP AG 2001 Use this screen to assign print programs to forms The entries of the standard programs are recorded.

Outgoing Payments FI (1) Implementation Guide Edit Goto Additional information Utilities System Help Display Implementation Guide Accounts Receivable and Accounts Payable Business Transactions Outgoing Payments Automatic Outgoing Payments Payment Method/Bank Selection for Payment Transaction Set Up Payment Program © SAP AG 2001 To change the entry of the print program and the form to outgoing payments within FI. choose Financial Accounting → Accounts Receivable and Accounts Payable → Business Transactions → Outgoing Payments → Automatic Outgoing Payments → Payment Method/Bank Selection for Payment Transaction → Set Up Payment Program. © SAP AG BC460 1-214 .

Maintain Payment Program Config. Double-click to select the desired country. The subsequent dialog window displays the available countries.: Countries Company codes Country AR AT AU BE BR Name Argentina Austria Australia Belgium Brasil © SAP AG 2001 From here on out. © SAP AG BC460 1-215 .Outgoing Payments FI (2) SAP R/3 CtryPaymentMeth. choose Ctry payment methods. a different menu path must be chosen to change print programs and forms: To change the print program.

© SAP AG BC460 1-216 .Outgoing Payments FI (3) Maintain Payment Program Config. In our example above.List Country Method 1 DE Germany Name (in national language) TRLO: individual payment A C Bank direct debit check (with checkmanagement) E Automatic debit © SAP AG 2001 Double-click to select the payment method from those displayed.: Country Pmnt Methods . payment method C (check) has been selected.

.. © SAP AG BC460 1-217 ....... Doc. Bill/exchange .. LIST1S 01 Enter changes to your print program here.. box .. .. type for payment . Update specifications Street....O.. P. .. .... ..Outgoing Payments FI (4) Payment method Edit Goto Utilities System Help Maintain Payment Program Config.. .. Form printout Name of print program Name of print dataset © SAP AG 2001 RFFOUS_C Key in code line .. .Details Country key Payment method DE C Germany Check Payment method classification Check will be created .: Country Payment Methods . Allowed for personnel payments Required master record specifications Check/bill of exchange .

Choose the appropriate entries. © SAP AG BC460 1-218 .Outgoing Payments FI (5) SAP R/3 Paying CCs Maintain Payment Program Config. the payment method is Check. The same payment method is displayed as in the print programs. Double-click to select a company code. In the example above. The dialog window displays the company codes.: Company Codes Countries Country 0001 AR01 AT01 AU01 Company name SAP AG Template AR Template AT Template AU City Walldorf Argentina Austria Australia © SAP AG 2001 To change your form. choose Paying company codes.

Outgoing Payments FI (6) Maintain Payment Program Config.code Payment method Forms DE01 C Country Template Check (with checkmanagement) F110_PRENUM_CHCK Form for payment transfer Next form Correspondence sort variant Paid items printout Display form Line items per form Pmnt adv.: CC Pmnt Methods-General Data Form data Maintain Payment Program Config. choose Form data. if form is full Extra form if form is full Line items sort variant © SAP AG 2001 99 To go to the entry for the payment medium. © SAP AG BC460 1-219 .: CC Pmnt Methods-Form data Paying co.

Appendix B: Unit Summary You are now able to: Navigate in Customizing to assign forms to print programs for SD. MM. and FI © SAP AG 2001 © SAP AG BC460 1-220 .

Appendix C: Inserting Graphical Elements Contents : Inserting a company logo using program RSTXLDMC Inserting bitmaps © SAP AG 2001 © SAP AG BC460 1-221 .

In the form maintenance initial screen choose Environment -> Administration -> Graphic.5 you can include graphic administration into the page layout of the form maintenance. define a new window into which you insert the graphic as text module (after uploading it into a standard text). Your graphic must be a BMP file. Choose Import to import your graphic into R/3.The graphic to be inserted must be available on the front-end in TIFF 6. © SAP AG BC460 1-222 .0 format (Tag Image File format). note the following: .Requirements Access TIFF graphic file on frontend Upload PC file as text module using ABAP report RSTXLDMC Define new window in form Incorporate existing text element in a new window © SAP AG 2001 To insert a graphical element into a form using program RSTXLDMC (before Release 4. . Choose Edit -> Graphic -> Create graphic.In the form. You can upload BMP files directly from the graphic administration into a standard text.5). To upload the TIFF file into a standard text. As of Release 4. use the ABAP report RSTXLDMC.

so the resulting name is ZHEX-MACROBMON. . .Use RSTXLDMC to save the TIFF file on your frontend as text module. BCOL=color) Resolution for graphic (dpi) Graphic resident in printer Parameters for standard text /tmp/file. . © SAP AG BC460 1-223 .. the system prints the graphic in the current page window.tif BMON Text name Text language Text ID Text title Line width for text Absolute positioning Absolute x position Absolute y position ZHEX-MACRO-* ST . The asterisk denotes the file type. 132 Parameters for positioning the TIFF graphic .To check the resulting change to the form..You can specify the exact positioning of the graphic when uploading. © SAP AG 2001 Procedure.. In our example the file is BMON. . see the documentation on the report RSTXLDMC. . Use the ID "ST" and the logon language.. Print the spool request created with the test print on a printer that is capable of printing graphics. choose Utilities → Test print.For more information on input parameters.The system generates a suggested name for the text: ZHEX-MACRO-*. If you make no specifications.RSTXLDMC: Creating Graphical Elements Program Edit Goto System Help Uploading TIFF Graphics into SAPscript Texts File name and parameter for TIFF conversion File name Type (BMON=b/w.

Enter the file path and the name the graphic should have in the R/3 System. See the OSS note no. choose Tools -> Form printout -> Administration -> Graphic. You do not have to reimport the graphic into R/3.6C. Using the SAPscript control command BITMAP you can also insert graphics dynamically.. Name Name Description Logo1 ID BMAP Object Graphics Black and white grid screen Color grid screen Technical attributes DPI Resolution 0.00 CM CM Left margin Upper margin Window width Window height 0. 307414.. Starting with Release 4.Page Layout: Graphic Page .. you choose the Create pushbutton on the Graphic tab and then the Import pushbutton on the dialog box that is displayed next. If you want to resize the graphic in the form.6 you can import graphics and include them in your form using the Graphic tab in the Form Painter. To do this. To start graphics administration. Graph.. All graphics imported are managed in the SAPscript graphics administration transaction. Import the graphic and position the graphic window at the desired position in the form. © SAP AG BC460 1-224 . recreate the graphic in the form and specify a lower resolution. Include graphic Stored on.00 Design / Text Options Import graphic © SAP AG 2001 Starting with Release 4. graphics are displayed in the print preview.

© SAP AG 2001 © SAP AG BC460 1-225 .Appendix C: Summary of the Unit You can now: Insert graphical elements using program RSTXLDMC.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->