BC460 SAP Script
243
0
0
Full text
(2) Copyright Copyright © 2004 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. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.. Trademarks •. 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.. •. Citrix®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc.. •. 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, 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.. Disclaimer THESE MATERIALS ARE PROVIDED BY SAP ON AN "AS IS" BASIS, AND SAP EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR APPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THESE MATERIALS AND THE SERVICE, INFORMATION, TEXT, GRAPHICS, LINKS, OR ANY OTHER MATERIALS AND PRODUCTS CONTAINED HEREIN. IN NO EVENT SHALL SAP BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES OF ANY KIND WHATSOEVER, INCLUDING WITHOUT LIMITATION LOST REVENUES OR LOST PROFITS, WHICH MAY RESULT FROM THE USE OF THESE MATERIALS OR INCLUDED SOFTWARE COMPONENTS..
(3) About This Handbook This handbook is intended to complement the instructor-led presentation of this course, and serve as a source of reference. It is not suitable for self-study.. Typographic Conventions American English is the standard used in this handbook. The following typographic conventions are also used. Type Style. Description. Example text. Words or characters that appear on the screen. These include field names, screen titles, pushbuttons as well as menu names, paths, and options. Also used for cross-references to other documentation both internal (in this documentation) and external (in other locations, such as SAPNet).. 2001/Q3. Example text. Emphasized words or phrases in body text, titles of graphics, and tables. EXAMPLE TEXT. Names of elements in the system. These include report names, program names, transaction codes, table names, and individual key words of a programming language, when surrounded by body text, for example SELECT and INCLUDE.. Example text. Screen output. This includes file and directory names and their paths, messages, names of variables and parameters, and passages of the source text of a program.. Example text. Exact user entry. These are words and characters that you enter in the system exactly as they appear in the documentation.. <Example text>. Variable user entry. Pointed brackets indicate that you replace these words and characters with appropriate entries.. © 2004 SAP AG. All rights reserved.. iii.
(4) About This Handbook. BC460. Icons in Body Text The following icons are used in this handbook. Icon. Meaning For more information, tips, or background Note or further explanation of previous point Exception or caution Procedures. Indicates that the item is displayed in the instructor’s presentation.. iv. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(5) Contents Course Overview ............................................................................. vii Course Goals.................................................................................vii Course Objectives ...........................................................................vii. Unit 1: SAPscripts Overview.................................................................1 Introduction to SAPscript .................................................................... 2 Components of SAPscript ................................................................... 7. Unit 2: Form Elements ...................................................................... 15 Structuring Pages........................................................................... 16 Structuring Forms........................................................................... 28 Editing Forms ............................................................................... 43. Unit 3: The PC Editor and the Line Editor .............................................. 53 SAPscript Editors ........................................................................... 54 Form Elements .............................................................................. 76. Unit 4: Symbols and Control Commands ............................................... 85 Symbols ...................................................................................... 86 Control Commands ......................................................................... 96. Unit 5: Print Program ....................................................................... 119 Introduction to the Print Program ........................................................ 120 Using the Print Program .................................................................. 124. Unit 6: Styles .................................................................................157 Introduction to Styles ...................................................................... 158. Unit 7: SAPscript: The Next Generation ...............................................165 Introduction to SAP Smart Forms ....................................................... 166 Future of SAPscript........................................................................ 171. Unit 8: Modifications in SAPscripts .....................................................177 Modifying the Print Program.............................................................. 178. 2001/Q3. © 2004 SAP AG. All rights reserved.. v.
(6) Contents. BC460. Modifying Forms ........................................................................... 193 Transporting SAPscript Objects ......................................................... 196. Unit 9: Font Maintenance ..................................................................203 Introduction to Font Maintenance........................................................ 204. Appendix 1: Appendix. ...................................................................215. Index ............................................................................................233. vi. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(7) Course Overview This course provides you with an overview of SAPscripts. The course discusses the various form elements and the editors that are used to write to SAPscripts, such as PC Editor and Line Editor. This course also introduces several symbols and control commands that are used to perform various operations on SAPscripts, such as formatting SAPscripts. Next, the course discusses the print program and describes how to print using the print program. The course also describes the use of various styles to format SAPscripts and the modifications that you can apply to SAPscripts. Finally, the course introduces you to various fonts and their maintenance.. Target Audience This course is intended for the following audiences: • • •. Project team Employees processing data Employees responsible for organization organizing data. Course Prerequisites Required Knowledge •. BC 400 ABAP Workbench Basics. Course Goals This course will prepare you to: • • •. Describe form printing in the context of SAP R/3 Enterprise Make changes to SAP standard forms and SAP print programs Transport SAPscript objects. Course Objectives After completing this course, you will be able to: • • •. 2001/Q3. Maintain forms using SAPscript tools Use SAPscript control statements and symbols Control the print output using print programs. © 2004 SAP AG. All rights reserved.. vii.
(8) Course Overview. • •. BC460. Change print programs and forms in SAP R/3 Enterprise Use font maintenance in the SAP R/3 Enterprise. SAP Software Component Information The information in this course pertains to the following SAP Software Components and releases:. viii. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(9) Unit 1 SAPscripts Overview Unit Overview This unit is designed to give an overview of SAPscript. This unit discusses how SAPscript is used and integrated into SAP R/3 Enterprise and the advantages of the integration. Next, the unit introduces how forms interact with the print program and the role of the composer in the interaction. Finally, the unit discusses the need for a print program to print forms.. Unit Objectives After completing this unit, you will be able to: • • •. Understand SAPscripts List the advantages of SAPscripts Understand the components of SAPscripts. Unit Contents Lesson: Introduction to SAPscript ................................................... 2 Lesson: Components of SAPscript .................................................. 7. 2001/Q3. © 2004 SAP AG. All rights reserved.. 1.
(10) Unit 1: SAPscripts Overview. BC460. Lesson: Introduction to SAPscript Lesson Overview This lesson introduces SAPscripts and the need for using SAPscripts. It also discusses the advantages of using SAPscripts and explains the user’s perspective of SAPscripts.. Lesson Objectives After completing this lesson, you will be able to: • •. Understand SAPscripts List the advantages of SAPscripts. Business Example You are working with a garment export house that exports a large variety of readymade garments to various distributors across the world. As a result, the Sales and Distribution department of the export house needs to frequently create and print invoices in a specified format. The export house is looking for options that can be used to make their task simple. As the Technology Head of this export house, you suggest the use of SAPscripts. Next, you need to make a presentation on SAPscripts, the need for SAPscripts, and the advantages of SAPscripts to the management. You also need to discuss the components of SAPscripts in the presentation.. Need for SAPscript. Figure 1: The Purpose of SAPscript. 2. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(11) BC460. Lesson: Introduction to SAPscript. Every company needs to print documents, such as invoices and delivery notes, with a uniformly defined layout. These documents are often created automatically. The basic layout of the document is predefined. But, in many cases, other data, such as address data or purchase order items, has to be merged with the document. This data might be entered manually by an employee or retrieved from a database table. Large quantities of these documents may have to be produced. Form printing includes large print runs of documents, such as pay slips, checks, order confirmations, and reminders.. SAPscript in SAP R/3 Enterprise. Figure 2: SAPscript in SAP R/3 Enterprise. SAPscript is an integrated tool used to enter text and print forms in many SAP R/3 Enterprise applications, such as accounting, sales and distribution, production planning, and online documentation.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 3.
(12) Unit 1: SAPscripts Overview. BC460. Advantages of SAPscript • • • • • •. Multilingual capability High performance when printing large quantities Uniform corporate design in documents Word processing scalability SAP R/3 Enterprise transport and translation connections Platform independence. The PC editor supports Asian languages in addition to other languages. Form printing enables you to use different address layouts based on the country and use multiple currencies simultaneously. SAPscript supports a uniform design across all documents. Editor interfaces provide you with various functions according to the application. SAPscript can be run on all front-end applications supported by SAP.. SAPscript: User’s Perspective. Figure 3: SAPscript from a User’s Point of View. A document’s layout is defined in a form. Text modules are entered using the SAPscript Editor and stored centrally in the database.. 4. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(13) BC460. Lesson: Introduction to SAPscript. Most SAPscript users only use the Editor, which is used to type text such as letters. You can generate documents automatically from an ABAP program using the SAPscript programming interface.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 5.
(14) Unit 1: SAPscripts Overview. BC460. Lesson Summary You should now be able to: • Understand SAPscripts • List the advantages of SAPscripts. 6. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(15) BC460. Lesson: Components of SAPscript. Lesson: Components of SAPscript Lesson Overview This lesson introduces you to the various components of SAPscript, such as forms and print programs.. Lesson Objectives After completing this lesson, you will be able to: •. Understand the components of SAPscripts. Business Example You are working with a garment export house that exports a large variety of readymade garments to various distributors across the world. The export house uses SAPscripts to create and print invoices generated by the Sales and Distribution department. As a sales executive of the export house, you need to edit the invoices.. Forms. Figure 4: Forms. A form specifies the appearance and structure of a document. Every SAPscript document uses a form. Forms contain predefined text modules with space reserved for variable data. You can use these text modules in various applications.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 7.
(16) Unit 1: SAPscripts Overview. BC460. To make changes to your documents, such as moving a piece of text or changing fonts, paragraph formats, and tabs, you only need to change the form. To edit forms, select Tools → SAPscript → Form from the SAP R/3 Enterprise main menu. You can create your own form by copying and customizing existing forms.. Print Program. Figure 5: The Print Program. The print program performs the following tasks: • • • •. 8. Controls the actual output text to the printer, screen, or fax machine Selects data from the database or from user input Selects a form and controls the text to be printed, the sequence of the text, and the frequency of occurrence of the text Determines various printer attributes, such as output device, number of copies, whether or not to print. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(17) BC460. Lesson: Components of SAPscript. Interaction Between the Components of SAPscript. Figure 6: Processing Sequence: The Composer. The final appearance of your document depends on the interaction between your print program and the form. The SAPscript print program initializes the printing process. Every command entered using the SAPscript programming interface is transferred to the composer. The composer receives layout information from the form specified in the print program. The documents are formatted according to this layout information. If the documents contain variables, the composer replaces these variables with data from SAP R/3 Enterprise or with the user data selected by the print program. The print program controls the completion of the form. After the form is completed, the composer places the completed document in the spool to start printing the form.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 9.
(18) Unit 1: SAPscripts Overview. BC460. Lesson Summary You should now be able to: • Understand the components of SAPscripts. 10. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(19) BC460. Unit Summary. Unit Summary You should now be able to: • Understand SAPscripts • List the advantages of SAPscripts • Understand the components of SAPscripts. 2001/Q3. © 2004 SAP AG. All rights reserved.. 11.
(20) Unit Summary. 12. BC460. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(21) BC460. Test Your Knowledge. Test Your Knowledge 1.. In which departments can SAPscript be used? Choose the correct answer(s).. □ □ □ □ 2.. A B C D. Human Resources Management Material Management Sales and Distribution Production Planning. Which feature of SAPscript enables it to run on all front-end applications supported by SAP? Choose the correct answer(s).. □ □ □ □ □ □ 3.. A. A B C D E F. Multilingual capability High performance when printing large quantities Uniform corporate design in documents Word processing scalability SAP R/3 Enterprise transport and translation connections Platform independence specifies the appearance and structure of a document.. Fill in the blanks to complete the sentence.. 4.. 2001/Q3. List a few functions of a print program.. © 2004 SAP AG. All rights reserved.. 13.
(22) Test Your Knowledge. BC460. Answers 1.. In which departments can SAPscript be used? Answer: A, B, C, D SAPscript can be used in Human Resources Management, Material Management, Sales and Distribution, and Production Planning departments.. 2.. Which feature of SAPscript enables it to run on all front-end applications supported by SAP? Answer: F Platform independence enables SAPscript to run on all front-end applications supported by SAP.. 3.. A form specifies the appearance and structure of a document. Answer: form. 4.. List a few functions of a print program. Answer: A print program performs the following functions: • • • •. 14. Controls the actual text output to the printer, screen or fax machine Selects data from the database or from user input Selects a form and controls the text to be printed, the sequence of the text, and the frequency of occurrence of the text Determines various printer attributes, such as output device and number of copies. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(23) Unit 2 Form Elements Unit Overview This unit introduces forms and their structures. Next, the unit gives an overview of the components of the form, such as the header, page layout, paragraph and character formats, and documentation. The unit also describes the methods used to maintain forms and the form maintenance transaction. You can use this information to edit forms.. Unit Objectives After completing this unit, you will be able to: • • • • •. Understand pages and windows Structure pages using windows Understand form formats Identify page layouts Use Form Painter. Unit Contents Lesson: Structuring Pages ......................................................... 16 Lesson: Structuring Forms ......................................................... 28 Lesson: Editing Forms .............................................................. 43. 2001/Q3. © 2004 SAP AG. All rights reserved.. 15.
(24) Unit 2: Form Elements. BC460. Lesson: Structuring Pages Lesson Overview This lesson introduces you to pages and windows and describes how to structure pages using windows.. Lesson Objectives After completing this lesson, you will be able to: • •. Understand pages and windows Structure pages using windows. Business Example You are working with a garment export house that exports a large variety of readymade garments to various distributors across the world. The export house uses SAPscripts to create and print invoices generated by the Sales and Distribution department. You have created forms to edit the invoices created by the Sales and Distribution department of your export house. The form contains various output areas called windows. To format the invoice, you need to organize the text of the invoice within the form windows using text elements and paragraphs.. 16. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(25) BC460. Lesson: Structuring Pages. Introduction to Pages. Figure 7: Example: Booking Confirmation. A typical form contains the following information: • • • •. Address Sender Body copy Business transaction data such as booking data. The text and data is spread over several pages in a form.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 17.
(26) Unit 2: Form Elements. BC460. Figure 8: Forms: Pages. A form can have one or more pages. You determine the page sequence of a document by entering the page that follows the one you are currently on. You must always enter a starting page in the header of a form. A specific page format, such as LETTER or DIN A4, is defined for each form. SAPscript allows automatic page numbering.. 18. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(27) BC460. Lesson: Structuring Pages. Figure 9: Pages: Attributes. Page attributes include Next page, Page counter, and Print attributes. The counter settings determine whether or not page numbers should increase, remain the same, or revert to their initial value. The print attributes allow you to choose which paper tray you want to use and whether or not you want to print the form on single sheets or on both sides of the sheet.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 19.
(28) Unit 2: Form Elements. BC460. Introduction to Windows. Figure 10: Windows and Page Windows. Windows can appear on numerous pages within a form. As a result, SAPscript differentiates between logical windows and physical page windows. The user determines the location of page windows on each page by entering the size and position. A window can have a different size and position on different pages. Text that appears in page windows is defined for an entire form using the form’s corresponding logical window.. 20. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(29) BC460. Lesson: Structuring Pages. Figure 11: Window Types. There are two types of windows in SAPscript: • •. MAIN VAR. Windows of type MAIN are used to display text that spreads across multiple pages. Windows of type VAR may vary in size and position for each page that they appear on. The text entered in the corresponding logical windows is always displayed on each page where the window appears. Any text that cannot be fully displayed due to the small size of the window is lost. Up to Release 4.0, windows of type CONST exist. These windows function similar to the VAR windows.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 21.
(30) Unit 2: Form Elements. BC460. Figure 12: Main Window. In main windows, variable length text is displayed, for example, all bookings of a specific customer. Whenever the output area of one page is filled, SAPscript continues displaying the body text in the main window on the next page. Main windows can have different heights and can be positioned differently on pages where they appear; but the windows must be of the same width.. 22. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(31) BC460. Lesson: Structuring Pages. Figure 13: Defining Page Windows. All forms have predetermined page formats, such as LETTER or DIN A4. The position of a page window is indicated by its distance from the top and left edges of the page. The size of a page window is determined by its height and width. Both position and size can be defined using various units of measure, such as lines or characters.. Figure 14: Windows and Page Windows: Attributes. 2001/Q3. © 2004 SAP AG. All rights reserved.. 23.
(32) Unit 2: Form Elements. BC460. 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 the window. To specify the main window, which can contain text exceeding one page, use MAIN. To specify other windows of a form, use VAR in Release 4.0. In earlier releases, use CONST. • •. CONST: The window has the same dimensions on all pages where the window appears. 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 with the form. You will learn 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 the paragraph. You can assign logical windows to any page of your form. You can define the distribution of page windows on a page by specifying the size and position of the windows. To print labels or documents with more than one column, you can define more than one main window on any page by selecting Edit → Windows → Create → Main window.. 24. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(33) BC460. Lesson: Structuring Pages. Structuring Pages Using Windows. Figure 15: Structuring Pages Using Windows. The various output areas found on a form page are called windows. You can organize text within windows using text elements and paragraphs.. Figure 16: Structuring Pages Using Windows. 2001/Q3. © 2004 SAP AG. All rights reserved.. 25.
(34) Unit 2: Form Elements. BC460. Windows on a form page display output such as addresses or detail items.. 26. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(35) BC460. Lesson: Structuring Pages. Lesson Summary You should now be able to: • Understand pages and windows • Structure pages using windows. 2001/Q3. © 2004 SAP AG. All rights reserved.. 27.
(36) Unit 2: Form Elements. BC460. Lesson: Structuring Forms Lesson Overview This lesson starts with an introduction to form elements and then describes how to structure forms in various formats, such as paragraph and character formats. Finally, it discusses the various page layouts.. Lesson Objectives After completing this lesson, you will be able to: • •. Understand form formats Identify page layouts. Business Example You are working with a garment export house that exports a large variety of readymade garments to various distributors across the world. The export house uses SAPscripts to create and print invoices generated by the Sales and Distribution department. As a sales executive of the export house, you need to modify the appearance of text in invoices printed using SAPscripts.. Elements. Figure 17: Forms: Elements. 28. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(37) BC460. Lesson: Structuring Forms. The following sub-objects allow you to structure forms in SAPscript: • • •. Page layout Paragraph formats Character formats. Use the Form Painter to edit the individual sub-objects of a form.. Figure 18: Form Elements: Documentation. Any changes that you make to a form should be documented accordingly. You can maintain form documentation using the Form documentation button. When you click this button, a list of form components, such as pages, windows, and text elements, is displayed. On this screen, you can enter text describing the individual components.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 29.
(38) Unit 2: Form Elements. BC460. Paragraph Formats. Figure 19: Paragraph Formats: Metric Sizes. You can modify the appearance of text in SAPscript by changing the paragraph and character formats. Paragraph formats define the following:. 30. • • • • • • • •. Line spacing Vertical spacing: before and after Left margin/right margin Paragraph alignment: left or centered First line indentation Tabs Fonts Outline options. • • • •. Standard attributes Font attributes Tabs Outline attributes. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(39) BC460. Lesson: Structuring Forms. Figure 20: Paragraph Formats: Standard Attributes. You can specify the following standard paragraph attributes: • • • • • •. Left/right margin Paragraph indentation Line spacing Vertical spacing: space before or 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 various attributes.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 31.
(40) Unit 2: Form Elements. BC460. Figure 21: Paragraph Formats: Font Attributes. Font attributes for paragraphs include: • • • • •. Font family, such as Courier, Helvetica or Times Roman Font size (in tenths of a point) Bold Italics Underlining, including the following additional options: spacing, thickness, and intensity. You can take a particular font attribute from the general form attributes and use the attribute in the current paragraph by changing your settings to the following: • • •. 32. Font family = space Font size = 0 Bold, italics, and underlining all set to Retain. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(41) BC460. Lesson: Structuring Forms. Figure 22: Paragraph Formats: Tabs. Tab attributes control the tab positions in a paragraph. You can define several tab positions. To align a paragraph, you can use the following tab positions: LEFT, RIGHT, CENTER, SIGN, or DECIMAL. In addition to the tabs of a paragraph format, standard tabs are available. To define the position of numbers in a paragraph, select SIGN or DECIMAL. SIGN allows you to define numbers, which are right-aligned at the tab position. This allows you to inset a minus sign or blank space at the end of the number. DECIMAL allows you to align decimal points with any tab position.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 33.
(42) Unit 2: Form Elements. BC460. Figure 23: Paragraph Formats: Outlines. You can use the outline attributes provided by SAPscript to divide text into units, such as chapters, subchapters and sections. To number paragraphs automatically, select one of the following numbering types: • • • •. Arabic numerals, such as 1, 2, 3... Roman numerals, such as I, II, III... Letters, such as a, b, c... Fixed characters, such as *, *, *.... You can also number text units by creating consecutive numbering levels, as shown: 1. First level 1.1. Second level, linked to first level 1.2. Second level, linked to first level 2. First level [...]. 34. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(43) BC460. Lesson: Structuring Forms. Character Formats. Figure 24: Character Formats. You can define the following character format attributes:. 2001/Q3. • • • •. Font Font size Bold or Italics Underlining. • •. Standard attributes Font attributes. © 2004 SAP AG. All rights reserved.. 35.
(44) Unit 2: Form Elements. BC460. Figure 25: Character Formats: Standard Attributes. Standard character format attributes include: • • • • •. Protected: The character string cannot be broken up and the entire string is printed on one line. Hidden: The character string is not printed. Superscript: The character string is printed half a line space above the line. Subscript: The character string is printed half a line space below the line. Barcode: The character string is encrypted and printed as a bar code.. Figure 26: Character Formats: Font Attributes. You can define font attributes by specifying the font, font size, or font style. To override a previously defined form header or paragraph format, choose On or Off.. 36. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(45) BC460. Lesson: Structuring Forms. If you want the font attributes you have selected for a specific paragraph to be valid for the remainder of the form, choose Retain or leave the values for Font family and Font size blank.. Page Layout. Figure 27: Graphical Form Painter: Page Layout. Page layouts can be edited in both the administrative window and the graphic design window. In the design window, you can set the size and position of display areas using drag and drop. The most important attributes of the current page and its windows are displayed in the administrative window.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 37.
(46) Unit 2: Form Elements. BC460. Figure 28: Page Layout: Pages. Forms can have multiple pages defined for them. 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. If no Next page value is specified, form printing ends with the current page. Use the Layout function from the initial Form Painter screen to call the graphical Form Painter. From the Page layout screen, you can define the pages you need. You can select standard functions, such as Create page, Copy page, and Delete page, using the Edit → Page... menu or by clicking the appropriate button on the screen. Additional attributes can be entered for all pages found in the list box.. 38. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(47) BC460. Lesson: Structuring Forms. Figure 29: Page Layout: Windows and Page Windows. The Window list displays a list of all the windows found on the current page. For each window, important attributes, such as position of the window on the page, window size, window type, and default paragraph, are displayed. A number of standard window editing functions are also available on this screen, including Create window, Copy window and Delete window. In addition, the Design/Text button allows you to switch between design mode and text mode in the design window. In design mode, you can use your mouse to work with windows; text mode displays the individual window text.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 39.
(48) Unit 2: Form Elements. BC460. Figure 30: Page Layout: Options. The Options button allows you to zoom in to a specific section of your page. In addition, you can choose to align the window automatically to the grid. You can also choose the unit of measure for the design window grid.. 40. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(49) BC460. Lesson: Structuring Forms. Structuring Text. Figure 31: Elements to Structure Text. Various paragraph and character formats provide additional ways to structure the text that you create.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 41.
(50) Unit 2: Form Elements. BC460. Lesson Summary You should now be able to: • Understand form formats • Identify page layouts. 42. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(51) BC460. Lesson: Editing Forms. Lesson: Editing Forms Lesson Overview This lesson discusses the Form Painter.. Lesson Objectives After completing this lesson, you will be able to: •. Use Form Painter. Business Example You are working with a garment export house that exports a large variety of readymade garments to various distributors across the world. The export house uses SAPscripts to create and print invoices generated by the Sales and Distribution department. To meet customer requirements, you need to change the format of the forms created for the invoices raised by the Sales and Distribution department.. Form Painter. Figure 32: Editing Forms. 2001/Q3. © 2004 SAP AG. All rights reserved.. 43.
(52) Unit 2: Form Elements. BC460. To edit forms, select Tools → Form printout → SAPscript → Form. Press F4 in the Form Name field to display a list of all existing forms. You can edit the following sub-objects of a form directly: • • • • •. Header Page layout Paragraph formats Character formats Documentation. Figure 33: Editing Forms: The Form Painter. From Release 4.0, a new Form Painter with graphical interface is available for more intuitive and faster form creation. You can continue to use the alphanumeric Form Painter to create forms because all the form creation functions are 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 are consolidated into one component called Layout. Note: The graphical Form Painter is available from Release 4.0 for personal computers running either Windows NT 4.0 or Windows 95. Otherwise you are working with the alphanumeric Form Painter.. 44. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(53) BC460. Lesson: Editing Forms. Figure 34: Form Painter: Maintenance Screen Structure. The Form Painter maintenance screen contains the following: • • •. Element types, such as pages List of elements, such as a list of windows for this page List of attributes, such as a list of attributes for each window; position, size, and window type. Header Data. Figure 35: Header Data: Organization. 2001/Q3. © 2004 SAP AG. All rights reserved.. 45.
(54) Unit 2: Form Elements. BC460. You must enter the following items in the header of each form: • • • • • •. •. A short text describing the form. A default paragraph format. The format’s attributes can be edited using the Paragraph formats function. A default value for tabs. A first page. The page attributes are defined using the Layout function in the graphical Form Painter and the Pages function in the alphanumeric Form Painter. Page size, page format, and orientation. Line spacing and character spacing. Form attributes, such as tab stops or line spacing, can be defined using more than one type of unit. If you use the units, CH (character) or LN (line), measurements are automatically converted to lines per inch (LPI) or characters per inch (CPI). Font attributes, such as font, font size, bold, italics, or underlining.. When creating a new form, you should always assign a description of what your form is to be used for.. Figure 36: Header Data: Administrative Data. Administrative information, such as a form’s name, client, language and the date when the form was last changed, is displayed under Administrative Data.. 46. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(55) BC460. Lesson: Editing Forms. A form can have the following status: • • •. New: Represents a form that has just been created and is not yet ready to be printed. Active: Represents a form that is ready to be printed. To set the status of a form to active, select Form → Activate. Revised: Represents a form that is revised and saved. Whenever you print the form, SAP R/3 Enterprise continues to use the Active version of the form.. To undo any unwanted changes made to a form, select Utilities → Reset.. Figure 37: Header Data: Basic Settings. Standard settings, such as first page, page format, default paragraph, tab stops, font family, and font size, can be made under Basic Settings. Both the first page setting and the default paragraph setting are mandatory and must be defined by the user. Header data settings take effect only if no other settings have been made for that component. For example, consider a situation where you want to use a default paragraph in a particular window. If no default paragraph has been specified in the window’s attributes, the system automatically uses the default paragraph set in the header data.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 47.
(56) Unit 2: Form Elements. BC460. Lesson Summary You should now be able to: • Use Form Painter. 48. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(57) BC460. Unit Summary. Unit Summary You should now be able to: • Understand pages and windows • Structure pages using windows • Understand form formats • Identify page layouts • Use Form Painter. 2001/Q3. © 2004 SAP AG. All rights reserved.. 49.
(58) Unit Summary. 50. BC460. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(59) BC460. Test Your Knowledge. Test Your Knowledge 1.. Main windows cannot have different heights and cannot be positioned differently on pages where they appear. Determine whether this statement is true or false.. □ □ 2.. True False. Which sub-objects allow you to structure pages in SAPscript? Choose the correct answer(s).. □ □ □ □ 3.. A B C D. Page layout Paragraph formats Character formats Windows. You can organize text within windows using text elements and . Fill in the blanks to complete the sentence.. 4.. Which sub-objects allow you to structure forms in SAPscript? Choose the correct answer(s).. □ □ □ □ 5.. A B C D. Font Page layout Paragraph formats Character formats. Page layouts can be edited in the administrative window and the window. Fill in the blanks to complete the sentence.. 6.. The functions used to create a form are available in the . Fill in the blanks to complete the sentence.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 51.
(60) Test Your Knowledge. BC460. Answers 1.. Main windows cannot have different heights and cannot be positioned differently on pages where they appear. Answer: False Main windows can have different heights and can be positioned differently on pages where they appear.. 2.. Which sub-objects allow you to structure pages in SAPscript? Answer: A, B, C Page layout, paragraph formats, and character formats allow you to structure forms in SAPscript.. 3.. You can organize text within windows using text elements and paragraphs. Answer: paragraphs. 4.. Which sub-objects allow you to structure forms in SAPscript? Answer: B, C, D Page layout, paragraph formats, and character formats allow you to structure forms in SAPscripts.. 5.. Page layouts can be edited in the administrative window and the graphic design window. Answer: graphic design. 6.. The functions used to create a form are available in the alphanumeric Form Painter. Answer: alphanumeric Form Painter. 52. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(61) Unit 3 The PC Editor and the Line Editor Unit Overview This unit discusses the various editors used to enter text in SAPscript, PC Editor and Line Editor. Next, the unit discusses the difference between the two editors. The unit also describes named text elements and highlights the advantages of these elements.. Unit Objectives After completing this unit, you will be able to: • • •. Learn about the SAPscript editors Identify the operation of the SAPscript editors Learn about form elements. Unit Contents Lesson: SAPscript Editors .......................................................... 54 Exercise 1: SAPscript Editors.................................................. 67 Lesson: Form Elements............................................................. 76. 2001/Q3. © 2004 SAP AG. All rights reserved.. 53.
(62) Unit 3: The PC Editor and the Line Editor. BC460. Lesson: SAPscript Editors Lesson Overview This lesson introduces you to the various SAPscript editors used to write to a SAPscript, such as PC Editor and Line Editor. It also describes how SAPscript editors work.. Lesson Objectives After completing this lesson, you will be able to: • •. Learn about the SAPscript editors Identify the operation of the SAPscript editors. Business Example You are working with a garment export house that exports a large variety of readymade garments to various distributors across the world. The export house uses SAPscripts to create invoices generated by the Sales and Distribution department. To create an invoice, you need to enter text in SAPscript. To do this, you need to use the two editors provided by SAPscript, PC Editor and Line Editor.. 54. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(63) BC460. Lesson: SAPscript Editors. PC Editor. Figure 38: PC Editor and Line Editor. Two editors are available in SAPscript to enter text, the PC editor and the line editor. To use the PC editor, your operating system must meet several requirements. Your computer must be running Windows NT 4.0 or Windows95. The PC editor also requires various DLL and OCX files, which are automatically installed by the SAP GUI. Users do not need to install any of these files. A dialog box prompts to install the most current versions of these DLL and OCX files. From the Standard Text: Request screen, you can choose which editor you want to work with. Select Go to → Change editor from within one editor to change to the other.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 55.
(64) Unit 3: The PC Editor and the Line Editor. BC460. Figure 39: PC and Line Editor Operations. Use the PC editor and the line editor to enter long text such as materials text, standard text, or text in forms. The major advantage of the PC editor is that all its functions can be used by clicking the buttons. Paragraph and character format assignments can be made using buttons and any changes made are immediately displayed on the screen. SAPscript navigation commands are also automatically tested using an integrated syntax check. In the line editor, paragraph formats are assigned using the tag column. Character formats can be found in the menu. You need to use the menu to display the attributes of individual formats. You can select text by double-clicking the text or by clicking a special button. Special text structures are also identified in the tag column. From Release 4.0A, an integrated syntax check is also available in the line editor.. 56. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(65) BC460. Lesson: SAPscript Editors. Figure 40: The PC Editor. The PC editor is similar to other common text editors and functions according to the What You See Is What You Get (WYSIWYG) principle. PC editor operations are called using buttons and menu functions. The paragraph format and character format buttons allow you to assign paragraph and character formats to the text, according to what is selected.. Figure 41: Entering Text in the PC Editor. 2001/Q3. © 2004 SAP AG. All rights reserved.. 57.
(66) Unit 3: The PC Editor and the Line Editor. BC460. The PC editor provides automatic word wraparound. To create a new paragraph, position the cursor and press ENTER. If no paragraph format has been used up to this point, the new paragraph is formatted according to the default paragraph settings. Otherwise, the new paragraph takes the format of the one immediately preceding it. To insert a line break within a paragraph, use SHIFT+ENTER. Within a paragraph, your text automatically wraps when it reaches the right edge of your window.. Figure 42: Assigning Paragraph and Character Formats. You can use the PC editor to format paragraphs. The paragraph and character formats available are visible on the screen in the PC editor. Select the text you want to format. Select the paragraph or character format you want to apply to the text either by clicking the corresponding button on the screen or by selecting Format → Paragraph and Format → Character. To reset the format, select Edit → Selected area → Last character format → Edit → Selected area → Last paragraph format.. 58. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(67) BC460. Lesson: SAPscript Editors. Line Editor. Figure 43: Outputting Text Using the PC Editor. To display text, select Text → Print from the PC editor or Standard text → Print from the Standard Text: Request dialog box. From the PC editor menu, you can choose between Printing and Print preview. In the subsequent dialog box, you can specify various print parameters, such as the output device, the number of copies or pages, and several parameters for print control, such as print immediately. To display the output on the screen, select Print preview. To start printing to the selected output device, select Print on this screen.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 59.
(68) Unit 3: The PC Editor and the Line Editor. BC460. Figure 44: The Line Editor. The title bar in the line editor displays the name of the current editing action and the text being edited. The menu bar provides various application functions, such as Save or Print. The tag column contains the format ID or tag that determines how the text will be formatted for output. Enter the desired paragraph formats here. The status bar provides status information about various editing functions, such as: • • • •. 60. The form currently being edited The line segment (screen line or total number of lines) The text currently selected The paragraph and character formats used recently. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(69) BC460. Lesson: SAPscript Editors. Figure 45: Entering Text in the Line Editor. To create a new paragraph, position the cursor and press ENTER. An asterisk (*) in the tag column indicates the default paragraph format. The new paragraph has the same format as the preceding one. To insert a line break within a paragraph, use F6. A slash (/) in the tag column indicates this line break. The editor provides automatic word wraparound when you: • • • •. Choose a function key. Choose a menu function. Press ENTER. Choose Format.. To merge two paragraphs: 1. Use blank spaces to overwrite the key in the tag column. 2. Choose Format. To delete blank lines or merge separate lines: 1. Use blank spaces to overwrite the format key ’/‘. 2. Choose Format.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 61.
(70) Unit 3: The PC Editor and the Line Editor. BC460. Figure 46: Inserting Text in the Line Editor. To insert text, position the cursor and choose Insert. The title bar shows that the Insert mode is active. The Insert mode displays blank lines. Enter the text to be inserted. The paragraph format remains the same when text is inserted, although you can change this format. To exit the Insert mode, choose End insert. The system returns to the original mode and inserts the new text at the cursor position.. 62. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(71) BC460. Lesson: SAPscript Editors. Figure 47: Selecting Text in the Line Editor. You can select text in the line editor either by double-clicking the text or by clicking the Select button. When using the Select button, place your cursor at the beginning of the text you want to select and then click the button. Then, place your cursor at the end of the text you want to select and click the Select button. This selects the area you want to edit. The system automatically starts the select mode after you have set the first select marker with your cursor. Selected text is highlighted in a different color. The area you have selected is also displayed in the status bar at the bottom of the page. You can also select lines by double-clicking the line’s entry in the tag column. Additional clicks in the tag column increase the size of the area you have selected.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 63.
(72) Unit 3: The PC Editor and the Line Editor. BC460. Figure 48: Selecting, Cutting, and Copying Text. The select function allows you to delete or copy entire text passages. When you select the text and choose Cut or Copy, the text is copied to the clipboard: • • •. Cut deletes the marked text. Copy does not delete the marked text. When you cut or copy text, the previous contents of the clipboard are deleted.. To insert the contents of the clipboard, position the cursor and choose Paste. To copy text to a different editor, use the clipboard. There are three user clipboards that you can use to save text. Select Go to → User Clipboard to select a different clipboard.. 64. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(73) BC460. Lesson: SAPscript Editors. Using SAPscript Editors. Figure 49: Paragraph and Character Formatting. You can organize text using the paragraph and character formats that are available in the current form. To apply paragraph and character formats, select Format → Paragraph or Format → Character. The dialog box displays the format key, its description, and its attributes. In this dialog box, you can display the attributes of the different formats. Enter the paragraph keys in the tag column. You can change or delete format keys that have already been entered. To display a list of possible paragraph formats, pressF4. To format a character string, enter <NN>...</>. NN refers to a one- or two-character key. When marking a character sequence, the system formats the word at the cursor position. When you mark an entire section, ensure there is no blank space between the last word to be marked and the cursor. To reapply the format last used within the marking mode, choose Last character format or Last paragraph format.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 65.
(74) Unit 3: The PC Editor and the Line Editor. BC460. Figure 50: Special Characters. To suppress special character recognition, use <(>...<)>. To move text to the next tab position, set a double comma (,,) at the beginning of the text you want to move. You can define tab positions in paragraphs. If you do not define tabs, the default positions of the underlying layout set are used. To add a comment line, which is ignored when the text is formatted, enter /* in the tag column. To protect an extended line from the previously defined line format, enter =. This function also suppresses the implicit blank space in the Editor at the end of the previous line. Symbols consist of spaces reserved for variable data, which is inserted during spooling for printing. To format symbols, enter &N...N&. See the section on Symbols and Control Commands. To use a SAPscript control command, enter /: in the tag column. Control commands do not affect editor formatting; the commands are not interpreted until the composer processes the document. The unit on Symbols and Control Commands contains further information about this topic.. 66. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(75) BC460. Lesson: SAPscript Editors. Exercise 1: SAPscript Editors Exercise Objectives After completing this exercise, you will be able to: • Make changes to SAP standard forms • Understand layout using the graphical Form Painter and the alphanumeric Form Painter • Make text changes • Print preview using the print program. Business Example In most cases, standard forms are altered to reflect the needs of individual customers.. Task 1: Object. Name / Description. Name of the print program to be used. SAPBC460D_01. Name of the form to be used. SAPBC460D_FM_03. Name of the form to be created. Z_BC460_EX3_##. Development class. $TMP. Note: ## is your group number Make a copy of the Form SAPBC460D_FM_03 and review the output on your monitor. 1.. Create a new form with the name Z_BC460_EX3_xx. Use the Form → Copy to copy the form SAPBC460D_FM_03.. 2.. Save and activate the form. Choose Save. In the window Object Catalog Entry select Local Private Object. Choose Activate.. 3.. Run the print program SAPBC460D_01 for your form name. Choose Screen Display. Continued on next page. 2001/Q3. © 2004 SAP AG. All rights reserved.. 67.
(76) Unit 3: The PC Editor and the Line Editor. BC460. In the next dialog window choose Print Preview.. Task 2: Perform multiple modifications to your form. 1.. Change the text of the letter (in the MAIN window) as desired. It is very important that you use both the line editor and the PC Editor tools. Make a change in one and observe the change in the other. To toggle between the two editors choose Goto → Change editor. Use the following functions in the editors: - Insert - Select - Copy - Cut - Paste Note: The PC Editor allows you to work in a way that is very similar to other text editors.. 2.. Change the address in your form.. 3.. Suppress the page number on the first page.. 4.. Move the DATE window to the same line as the ADDRESS window. Note: The graphical Form Painter allows you to easily move a window to a different location on a page.. 68. 5.. Create a paragraph format to write justified text in a bold format. Add text using this new paragraph type.. 6.. Use bold font style for the flight number mentioned in the letter. Apply this character format while in the PC Editor. Then, observe the results in the line editor.. 7.. Add a new column called “Discount”. Define new tabs for the appropriate paragraph formats. Enter the discounts in this column.. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(77) BC460. Lesson: SAPscript Editors. Solution 1: SAPscript Editors Task 1: Object. Name / Description. Name of the print program to be used. SAPBC460D_01. Name of the form to be used. SAPBC460D_FM_03. Name of the form to be created. Z_BC460_EX3_##. Development class. $TMP. Note: ## is your group number Make a copy of the Form SAPBC460D_FM_03 and review the output on your monitor. 1.. Create a new form with the name Z_BC460_EX3_xx. Use the Form → Copy to copy the form SAPBC460D_FM_03. a). Copy form SAPBC460D_FM_03 and check the output on the screen. Create a new form named Z_BC460_EX3_xx. Choose Copy to copy form SAPBC460D_FM_03. Choose Tools → SAPscript → Form. Enter the name of the new form: Z_BC460_EX3_xx. Choose Create. Enter a Description. To copy the form choose Form → Copy.. 2.. Save and activate the form. Choose Save. In the window Object Catalog Entry select Local Private Object.. Continued on next page. 2001/Q3. © 2004 SAP AG. All rights reserved.. 69.
(78) Unit 3: The PC Editor and the Line Editor. BC460. Choose Activate. a). Save and activate the form. Choose Save. In the dialog window Create object catalog entry choose Local object. To activate your form choose Form → Activate.. 3.. Run the print program SAPBC460D_01 for your form name. Choose Screen Display. In the next dialog window choose Print Preview. a). For your form name, execute the print program SAPBC460D_01. Choose System → Services → Reporting. Enter the program name and choose Execute. Enter the form name and choose Screen display. In the subsequent dialog window choose Print preview.. Task 2: Perform multiple modifications to your form. 1.. Change the text of the letter (in the MAIN window) as desired. It is very important that you use both the line editor and the PC Editor tools. Make a change in one and observe the change in the other. To toggle between the two editors choose Goto → Change editor. Use the following functions in the editors: - Insert - Select - Copy - Cut. Continued on next page. 70. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(79) BC460. Lesson: SAPscript Editors. - Paste Note: The PC Editor allows you to work in a way that is very similar to other text editors. a). Make the changes to your form. Test the form as described in 1-3. Change the text (in the MAIN window). Use the PC Editor and the Line Editor. Make a change in one editor and look at the change in the other. To toggle between the two editors select Goto → Editor. Make sure to use the graphical Form Painter. In the form maintenance transaction, choose the graphical Form Painter (Tools → SAPscript → Form, and then Settings → Form Painter). Return to the form in change mode. Choose Layout. In the dialog window, select the MAIN window using the mouse. Choose Text. Use the following functions in the editors: - Insert - Select - Copy - Cut - Paste Note: You can work with the PC Editor as with any other word processing editor. To activate the form choose Form → Activate and to test it choose Form → Check.. Continued on next page. 2001/Q3. © 2004 SAP AG. All rights reserved.. 71.
(80) Unit 3: The PC Editor and the Line Editor. 2.. BC460. Change the address in your form. a). Change the address in your form. Switch to the ADDRESS window. Choose Text. Make changes. To activate the form, choose Form → Activate and to test it chooseForm → Check.. 3.. Suppress the page number on the first page. a). Suppress the page number on the first page. Return to the graphical Form Painter. Make sure to be on the FIRST page. Switch to the window PAGENO. Choose Form → Change page layout and then choose Delete.. 4.. Move the DATE window to the same line as the ADDRESS window. Note: The graphical Form Painter allows you to easily move a window to a different location on a page. a). Move the DATE window to the same line as the ADDRESS window. Note: The graphical Form Painter allows you to move a window easily to a different location on a page. Return to the graphical Form Painter. Make sure to be on the FIRST page. Select the DATE window using the mouse. Press the left mouse button and move the DATE window to the same level as the ADDRESS window. Note: For the DATE window, you can assign the same upper left coordinates as defined for the ADDRESS window. To activate the form choose Form → Activate and to test it choose Form → Check.. Continued on next page. 72. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(81) BC460. Lesson: SAPscript Editors. 5.. Create a paragraph format to write justified text in a bold format. Add text using this new paragraph type. a). Create a paragraph format that allows you to write text justified and bold. Enter text that uses the new paragraph format. To switch to the paragraph view select Goto → Paragraph formats. To create a new paragraph choose Edit → Create element. Enter a two-character key and a description. Set the alignment to JUSTIFIED. Select Font to activate bold printing and to select a font family. To return to the layout view select Goto → Layout. Edit the text elements of the MAIN window as before. Insert a new paragraph. Position the cursor on the paragraph and use the mouse to select the newly created paragraph format. Choose Goto → Editor to switch to the Line Editor. Have a look at the paragraph tag. To activate the form choose Form → Activate and to test it choose Form → Check.. 6.. Use bold font style for the flight number mentioned in the letter. Apply this character format while in the PC Editor. Then, observe the results in the line editor. a). In the PC Editor use bold for the flight number specified in the letter. Then look at the result in the Line Editor. Edit the text elements of the MAIN window as before. Double-click the flight number in each line to mark it. Choose character format Bold. Go to the Line Editor to see how the character format appears there.. Continued on next page. 2001/Q3. © 2004 SAP AG. All rights reserved.. 73.
(82) Unit 3: The PC Editor and the Line Editor. 7.. BC460. Add a new column called “Discount”. Define new tabs for the appropriate paragraph formats. Enter the discounts in this column. a). Add a new column named “Discount”. Define new tabs for the relevant paragraph formats. Enter the discounts in this column. Edit the text elements of the MAIN window as before. In the header line after the price insert a tab and enter “Discount”. Go to the Line Editor. The tab there appears as a double comma (,,). Go back to the PC Editor. Insert a tab and enter discounts for several item lines. Choose Back. Select Goto → Paragraph formats to go to the paragraph maintenance. Choose paragraph IH. To modify the tabs choose Tabs and enter your own alignment and position for the discount column. Do the same for paragraph IL. To activate the form choose Form → Activate and to test it choose Form → Check.. 74. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(83) BC460. Lesson: SAPscript Editors. Lesson Summary You should now be able to: • Learn about the SAPscript editors • Identify the operation of the SAPscript editors. 2001/Q3. © 2004 SAP AG. All rights reserved.. 75.
(84) Unit 3: The PC Editor and the Line Editor. BC460. Lesson: Form Elements Lesson Overview This lesson introduces you to various form elements, such as windows and text elements.. Lesson Objectives After completing this lesson, you will be able to: •. Learn about form elements. Business Example You are working with a garment export house that exports a large variety of readymade garments to various distributors across the world. The export house uses SAPscripts to create and print invoices generated by the Sales and Distribution department. The forms created for the invoices raised by the Sales and Distribution department of your export house are divided into various output areas called Windows. As a sales executive of this export house, you need to structure the text in these Windows using form elements.. Windows. Figure 51: Windows. By default, the main window of a form should always display body text.. 76. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(85) BC460. Lesson: Form Elements. This body text contains the opening form of address, wraparound text, column headers, and data for the individual detail positions.. Figure 52: Structuring Pages Using Forms. The various output areas that appear on form pages are called page windows. Page window texts can be structured using text elements.. Figure 53: Text Elements. 2001/Q3. © 2004 SAP AG. All rights reserved.. 77.
(86) Unit 3: The PC Editor and the Line Editor. BC460. The text in the example above has been divided into three text elements: one for the form of address and subsequent text, one for the table header, and one for the individual data item. The sequence in which these elements are displayed is controlled by the print program. In addition, text within the main window, such as the table header, can be displayed multiple times in different areas within the window on different pages. For more information about these functions, refer to the print Program chapter. You can also use the print program to determine whether or not you want certain text to be displayed at all.. Figure 54: Text Elements in the Line Editor. You need to use the format ID /E in the format column of the line editor to denote the beginning of a text element. The name used to identify the text element is highlighted in red in the line editor. The end of a text element is reached when a new text element begins with /E in the format column. 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.. 78. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(87) BC460. Lesson: Form Elements. Figure 55: Text Element Types. SAPscript differentiates between default text elements and text elements with names. You can identify 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. But no /E text element is defined in the tag column. In contrast to named text elements, default text elements are printed automatically, which means that no print control functions are available.. Figure 56: Maintaining Text Elements in the Form Painter. You can use the Form Painter to maintain all text elements in any window.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 79.
(88) Unit 3: The PC Editor and the Line Editor. BC460. Use either the Form: Change Page Layout (graphical Form Painter) dialog box or the Form: Change Windows (alphanumeric Form Painter) dialog box to maintain these elements. Select Edit → Text elements or click the corresponding push button to go to the editor for that text element.. 80. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(89) BC460. Lesson: Form Elements. Lesson Summary You should now be able to: • Learn about form elements. 2001/Q3. © 2004 SAP AG. All rights reserved.. 81.
(90) Unit Summary. BC460. Unit Summary You should now be able to: • Learn about the SAPscript editors • Identify the operation of the SAPscript editors • Learn about form elements. 82. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(91) BC460. Test Your Knowledge. Test Your Knowledge 1.. What is a PC editor?. 2.. In the Line editor, tag column.. are assigned using the. Fill in the blanks to complete the sentence.. 3.. Use the PC editor and the Line editor to enter text, such as . Fill in the blanks to complete the sentence.. 4.. 2001/Q3. What is a named text element?. © 2004 SAP AG. All rights reserved.. 83.
(92) Test Your Knowledge. BC460. Answers 1.. What is a PC editor? Answer: The PC editor is a tool used to enter text in SAPscript. The PC editor is similar to other common text editors and functions according to the What You See Is What You Get (WYSIWYG) principle. The operations of the PC editor are performed using buttons and menu functions. The paragraph format and character format buttons allow you to assign paragraph and character formats to the text, according to what is selected.. 2.. In the Line editor, paragraph formats are assigned using the tag column. Answer: paragraph formats. 3.. Use the PC editor and the Line editor to enter text, such as materials text and standard text. Answer: materials text and standard text. 4.. What is a named text element? Answer: A named text element is a type of text element that is identified by its name. You can have many named text elements in a window. In addition, the output sequence of the named text element is controlled by the print program.. 84. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(93) Unit 4 Symbols and Control Commands Unit Overview This unit starts with the introduction of various symbols and then discusses the control commands. Finally, the unit highlights the various uses of the control commands.. Unit Objectives After completing this unit, you will be able to: • • •. Use symbols Identify formatting options Use control commands. Unit Contents Lesson: Symbols..................................................................... 86 Lesson: Control Commands........................................................ 96 Exercise 2: Using Control Commands....................................... 105. 2001/Q3. © 2004 SAP AG. All rights reserved.. 85.
(94) Unit 4: Symbols and Control Commands. BC460. Lesson: Symbols Lesson Overview This lesson introduces you to the various types of symbols. It also describes the various formatting options available with symbols.. Lesson Objectives After completing this lesson, you will be able to: • •. Use symbols Identify formatting options. Business Example You are working with a garment export house that exports a large variety of readymade garments to various distributors across the world. The export house uses SAPscripts to create and print invoices generated by the Sales and Distribution department. The information about the invoices created by the Sales and Distribution department is stored in tables. As a sales executive of this export house, you need to use symbols with these tables. Symbols enable you to display the most current values from SAP tables in the form of text modules. You can use these text modules for further analysis.. 86. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(95) BC460. Lesson: Symbols. Introduction to Symbols. Figure 57: Using Symbols. Symbols are placeholders for values that are inserted during print formatting. The use of symbols allows you to output the most current values from SAP tables in the form of text modules. Symbols are identified by names surrounded by ampersand characters at the beginning and end of the symbol. Symbol names are not case-sensitive. Symbol names may not contain a blank space. Symbols must always completely fit on one text line; symbols cannot wrap to the next line of text.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 87.
(96) Unit 4: Symbols and Control Commands. BC460. Types of Symbols. Figure 58: Types of Symbols. SAPscript uses four types of symbols: • • • •. System Standard Program Text. These symbol types differ in the way in which values are assigned to them. You can select symbols by selecting Include → Symbols.. 88. © 2004 SAP AG. All rights reserved.. 2001/Q3.
(97) BC460. Lesson: Symbols. Figure 59: System Symbols. SAPscript provides standard system symbols that are automatically replaced with data from SAP R/3 Enterprise when a document is printed. You can use system symbols in any document. To choose a system symbol, select Include → Symbols → System. From Release 4.5 A, the table TTXSY, which contains system symbols, is also available to users. • • • • •. Table TTDTG Symbols are user-defined. Symbols are language-dependent. Name: max. 22 characters. Value: max. 60 characters.. Standard symbols are application-defined and stored in table TTDTG. You can display or change standard symbols by selectingSystem → Services → Tablemaintenance → Extended table maint. , or by selectingTools → SAPscript → Administration → Settings. You can use standard symbols in any document. Standard symbols are language-specific.. 2001/Q3. © 2004 SAP AG. All rights reserved.. 89.
Related documents