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
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.
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.
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.
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.
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 →
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.
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: • The form currently being edited
• The line segment (screen line or total number of lines) • The text currently selected
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.
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.
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.
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
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
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.
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.
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.
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.
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.
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
- 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
2. 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.
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.
7. 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