【正文】
能夠滿足PROTECT/ENDPROTECT中指定的文本。語法:/: NEWPAGE [page_name]示例:/: NEWPAGE當(dāng)前頁結(jié)束,接下來的文本將顯示在form中指定的page上/: NEWPAGE S1和上面一個例子一樣,除了S1被指定為next page外 限制分頁:PROTECT在打印文檔的時候,有時候不想將一段段落打印在不同的頁上,這時候就需要設(shè)置限制分頁命令??梢岳肗EWPAGE命令強制分頁(只要你想)。39。 CM YORIGIN 1 CM Shifts the origin for the coordinates cm to the left and 1 cm up3) SIZE 命令語法:/: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]作用:設(shè)置在BOX命令中的WIDTH、HEIGHT值,當(dāng)window第一次啟動時,SIZE值與window相同。 參數(shù):① XORIGIN、YORIGIN坐標(biāo)系統(tǒng)原點② WINDOW設(shè)置左邊和上邊距匹配當(dāng)前window③ PAGE設(shè)置左邊和上邊距匹配當(dāng)前輸出page(XORIGIN = 0 cm, YORIGIN = 0 cm) 示例:/: POSITION WINDOW Sets the origin for the coordinate system to the upper left corner of the window./: POSITION XORIGIN 2 CM YORIGIN 39。39。 CM FRAME 10 TW特別注意:如果度量值有小數(shù)位,必須用” 39。 CM FRAME 10 TW /: BOX XPOS 39。 CM FRAME 10 TW /: BOX XPOS 39。 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15 /: BOX WIDTH 39。 CM (centimeter) TW (twip)下面分別加以說明。VBDPAMATNRamp。 Form.3242. In the Form field, enter Z_9H_RVORDER01, and in the Language field, enter EN.3. In the Subobjects section, select Page layout. 4. Choose Change.The synchronized screens of the Form Painter appear.5. In the Design window5, create a new window by choosing Create window form the form layout manipulation menu.The new window is automatically named Window1.66. Activate Window1 and choose Rename window from the form layout manipulation menu.877. Rename Window1 as LOGO.8. Choose Execute.99. Define the position of the window LOGO using the graphical Form Painter.With graphics or macros the system considers only the window position but not the size. The Left margin must be specified in CH (characters) and the Upper margin must be specified in LN (line). 1010. Activate the LOGO window and choose Edit window text from the form layout manipulation window. The PC Editor for the LOGO window appears.1111. In the PC Editor choose the Insert mand button.The Insert Additional Information screen appears.14131212. Select Command.13. Enter INCLUDE ZHEXMACROLOGO OBJECT TEXT ID ST in the mand line.14. Choose Continue.15The new mand line (gray highlighted) appears in the PC Editor.15. Choose Back.The window text is automatically saved by the system. 16. Confirm the information.1717. Activate the changed form.Your pany logo appears on the first page of form Z_9H_RVORDER01 using the standard text ZHEXMACROLOGO and the window LOGO for the print output. If the pany logo should be displayed on the subsequent pages, you must copy the window LOGO to page NEXT. You have to repeat the following procedure for all defined pages:1. In the administrative screen, choose the window LOGO.2. Copy the window.3. Choose page NEXT.4. Insert the window.The position and size of the window LOGO defined for page FIRST apply to the other pages.5. Activate the form.注:關(guān)于如何在PCL5打印機中打印公司logo,請參見相關(guān)資料,這里從略。 Word processing 174。下面介紹在form中包含公司logo的步驟:StepbyStep GuideTask 1 Convert your pany logo into a SAPscript standard text. 1. Create your pany logo with a graphic program and save it in the Baseline TIFF format.In this guide, the filename is .2. From the SAP main menu, choose Tools 174。在main window BODY域中,APPEND和SET具有相同的效果,DELETE對其沒有影響,在TOP和BOTTOM域中,與上面描述的相同。l Main window 中的Text Elements僅僅出現(xiàn)一次,它不會出現(xiàn)在包含main window的form的subsequent page中。下圖說明了發(fā)票中的列頭Text Elements。名字后面接下來就是這個Text Elements的文本行。下圖顯示了定義在main window中的HEADING和FLIGHTIST兩個Text Elements。當(dāng)定義windows和pages的時候,可以不必指定位置和輸出的文本間隔。 注意:1)在所有pages中的main window的寬度必須相同。 Pages window(頁面窗口)Pages window就是定義在頁面中的窗口,這里的頁面和窗口都是已經(jīng)預(yù)先定義好的,定義pages window的主要任務(wù)就是將窗口和頁面關(guān)聯(lián)起來,一個頁面中可以有多個窗口。如果沒有指定的話,輸出就在當(dāng)前頁的末尾終止。l CONST window(常量窗口),在系統(tǒng)內(nèi)部處理中,并不區(qū)分CONST Window和VAR Window,所以,如果創(chuàng)建一個新的window,總是使用VAR類型的。 比如下面的圖示以及代碼:l VAR Window(可變窗口)可變窗口的內(nèi)容在每一個page中都要處理一次。TOP Area和BOTTOM Area的大小依賴于各自的文本內(nèi)容,BODY Area的大小相應(yīng)的發(fā)生變化。注意:如果page中沒有main window,系統(tǒng)會隱含處理page中的其他window以及subsequent page,在這種情況下,SAPscript會在處理完(最多)三個subsequent pages后終止處理。下面是可以使用的窗口類型:l Main Window每一個Form必須有一個MAIN類型的窗口,這樣的窗口叫做Main Window。 WindowsWindows在Form維護中定義。具體請參見sap online help Character Formats and AttributesCharacter formats and Attributes可以用來格式段落中的一段文字。段落格式設(shè)置畫面如下:下面分別對前面的屬性組加以說明:1) 標(biāo)準屬性在標(biāo)準屬性組中,可以設(shè)置在段落格式中需要用到的通用屬性,包括:描述信息(Description)左邊右邊距(Left margin, Right margin)第一行的縮進(indent 1st line)前后空格(Space before, Space after)對齊方式(Alignment)行間距(Line spacing)是否空行(No blank lines)是否頁面保護(Page protection)同一頁上是否有下一個段落(Next paragraph same page)2) Font 屬性可以為段落格式指定字體屬性,用來控制文本中的字體。 包含業(yè)務(wù)數(shù)據(jù)的窗口不同于其他窗口。Header Data還包括form的名字、描述、類以及狀態(tài)。 The language in which a form or style is created is its original language. You can translate a form or style into other languages using SAP’s translation tools. 如果在打印一個文檔的時候,文檔中定義的Forms和Styles在當(dāng)前客戶端不可用,則SAPscript就在client000中檢查所定義的Forms和Styles,如果找到,就利用client000中的來進行打印。該打印程序使用一個Form,并提示用戶輸入相關(guān)文本信息。 Standard text),可以為一個文檔選擇一Form。在SAP應(yīng)用中,通常利用Forms來定制諸如發(fā)票、支票之類的特殊文檔的layout。可以用下圖來表示: Forms: 組件和技術(shù) 概念 Forms如果需要修改SAP Forms,可以象下面這樣設(shè)置開發(fā)環(huán)境:l 確信客戶端沒有標(biāo)準的SAP Formsl 拷貝你需要的標(biāo)準SAP Forms到你的開發(fā)環(huán)境中l(wèi) 重新命名,最好以Y或者Z開頭l 為了使更改生效,需要修改相關(guān)的SAP 打印程序使用經(jīng)過你修改后的Forms,可以使用SAP IMG來進行。3)中央輸出模塊設(shè)計器。如果用戶決定維護與應(yīng)用程序相關(guān)的文本,應(yīng)用程序事務(wù)會自動調(diào)用這個文本編輯器,2)styles和forms,用來打印layout。5)用來存儲文本、styles、forms的數(shù)據(jù)庫表格。如果沒有指定,就使用系統(tǒng)默認的Form。 Word processing 174。l 通過SAP應(yīng)用中的打印程序生成文檔??梢杂肧AP翻譯工具來翻譯這些Forms和StylesClient 000缺省:SAPscript給在client000中的Forms和Styles賦予一種特殊狀態(tài)。Language rules: SAPscript uses the following rules to manage versions of forms and styles in different languages:在Header Data的Basic settings標(biāo)簽中可以對這些數(shù)據(jù)進行維護。在這個例子中,start page由地址欄窗口、包含參考消息的信息窗口、包含公司相關(guān)數(shù)據(jù)的窗口以及包含真正業(yè)務(wù)數(shù)據(jù)的窗口(業(yè)務(wù)數(shù)據(jù)也顯示在subsequent page中)和包含頁碼的窗口組成。通過應(yīng)用不同的段落屬性組來簡化文本處理,這些屬性組包括:l 標(biāo)準屬性l 字體l Tabsl Outline對一個段落標(biāo)志命名有下面的約定束成:l 段落名由一到兩個字符組成;l 第一個字符必須是字母,第二個字符可以是字母、數(shù)字或者空格;特殊字符無效;l 段落格式在Description域中必須進行標(biāo)識??梢允褂孟旅娴亩攘繂挝粊矶xtabs的位置:CH (字符)CM (厘米)MM(毫米)PT(點陣)TW(1/20 點)4) Outline用來指定文檔中的層次和目錄結(jié)構(gòu)。Font屬性與段落中的Font屬性一樣使用。在定義一個Form Window的