Learning Center
Plans & pricing Sign in
Sign Out



									SAP R/3 Document : SAPScript

There are three components in SAPScript
1. Standard Text
2. Layout Set
3. ABAP/4 program

Ü SAPScript is the Word processing tool of SAP

Ü It has high level of integration with all SAP modules


Ü A Standard Text is a like our normal documents. In Standard Text, you can
  create standard documents like letters, articles etc

Ü Plain documents are classified as Standard Text ( ST ).

Ü You should first create a Style. Goto Tools à Word Processing à Style

Ü Every style contains Character Strings, Character formatting and paragraph

Ü To create a Standard Text goto Tools à Word Processing à Standard Text

Ü Give a Standard Text name, Specify Text Id as ST and Language as E.

Ü Click on Create / Change

Ü Every Standard text is assigned to a style

Ü To assign a style goto Format à Style

Ü You can base your documents on these character strings, paragraphs etc.

Ü Character strings have to be created, if you want a sets of strings / words /
  paragraphs / documents with different fonts, font sizes, formats ( Bold,
  Italic, Underline, Normal etc.) with these properties.

Ü You can create each character strings differently

Ü You can specify default properties for each type of paragraph like you can
  define right margin, left margins, line spacing, alignment etc.

Ü These properties can be different for every paragraph in a Standard text

                                                                   By : Subba Rao
SAP R/3 Document : SAPScript

Ü You can also specify how much space should be left before and after the

Ü You can also specify the TAB positions

Ü To move to the next tab position specify ,, (two commas)

Ü In the pull down box against each line you can specify the paragraph type
  on which the text in the line is going to be based

Ü You can also display your standard text in hierarchical format by selecting
  the OUTLINE option while creating the paragraph

Ü Every paragraph and character string that you create should be saved and

Ü To display the ACII character, enclose the ASCII value of that character in
  <... > e.g. <65> would display A

Ü If you want the text in your standard text to appear as per the attributes
  specified in the character strings the specify <character string name> text
  matter </>
  Eg. if the S1 is a character string with Bold attribute and you want HELLO
  to appear in bold then you should say <S1>HELLO</>.
  This resembles HTML way of writing the code

Ü Every Character String has to be terminated by a </>

Ü You can display texts displayed in different character string formats but
  every  character   string   should    be    terminated   by    </>.   E.g.

Ü If you specify a line to be of Raw Line ( ‘(‘ ) type then the character strings in
  that line will not have any effect and they will be treated as normal

Ü If you want a block of text to displayed as a single unit i.e. you don’t a part
  of the block in one page and some part in another page, then you should
  enclose that block of text in between PROTECT.... ENDPROTECT

Ü You can have Text symbols, System symbols and Program symbols in your
  standard text.

Ü Symbols are enclosed in &...&

Ü For. If you want to display current date in your Std. Text then you write
  &date&. Here &date& is a system symbol. Current time ( &time&, &user&
  etc. Are some examples of system symbol).

                                                                       By : Subba Rao
SAP R/3 Document : SAPScript

   You can define Text Symbols by using the system command DEFINE and
   specifying command line in the column tag area. You can define a Text
   Symbol as follows :
   DEFINE &MYSYMBOL& = “CSSL” : - defines the text symbol
   &MYSYMBOL&                       : - displays CSSL at runtime.

Ü PROGRAM Symbols are used for communication between different modules
  of SAP
  Using Program symbols you can fetch the data from the database. You will
  mainly use Program symbols in Std. Text when the std. Text has to sent to a
  Layout set with data extracted from a database.
  You would write Program symbol as follows :
  e.g. &TABNA-NAME1& where TABNA is a table name and NAME1 is a field.
  Specify command line in the column tag area

Ü But to display the data in the layout set you have to write a ABAP/4

Ü You can refer to online help documentation on SAPScript for more
  information on different types of symbols and control commands that can be
  use in SAPScript.

Ü You can assign Layout sets to a Standard Text


A SAPScript FORM consists of the following elements

       •   Windows and Pages
       •   Paragraph formats
       •   Character formats
       •   Creating FORMS in the R/3 system

Ü Every Layout Set will contain a Header, Paragraphs, Character Strings

Ü Character Strings are similar to the one that we create in Styles for
  Standard Text

Ü For every Layout Set you have to define Pages, Windows and Page Windows

Ü HEADER contains the General information about the Layout set. As part of
  the header
     Ü You need to assign / define the default paragraph ( this has to
        existing) and the first page ( i.e. the first page in the Layout set) of the
        Layout set

                                                                       By : Subba Rao
SAP R/3 Document : SAPScript

       Ü In the initial settings of a layout set as part of the header information,
         you can specify page format ( A4, etc. ), Page orientation, Printer, line
         spacing, fonts, character spacing etc.

Ü To create different elements in the layout set, click on the buttons on the
  application toolbar


•   A FORM / LAYOUTSET can have one or more pages
•   You can determine the page sequence of a document, by simply entering
    which page follows the one you are currently on
•   You must always enter a starting page in a form’s header data
•   A specific page format is defined for each form
•   SAPScript allows for automatic page numbering

       Ü To create Pages for the layout set click on PAGES button on the

       Ü To create a new page goto EDIT à Create Element

       Ü Give a name to the page and a description

       Ü In the standard attribute area of the page, you can specify the name
         of the next page in sequence it there is one or else you can enter the
         same page name in the area

       Ü You can specify page counter for page numbering in the page counter
         area. By default the numbering type is Arabic

       Ü You can create any number of pages


       Ü Click on Paragraphs button on the applications toolbar

       Ü To create new paragraphs go to EDIT à Create Element

       Ü Give a name and description to the paragraph.

       Ü You can specify different attributes to like font type, font size,
         character style ( i.e. bold / italics / underline ), Tab settings, Bar
         codes, margins, alignments etc.


       Ü This again is like the ones that you creates for Std. Text

                                                                      By : Subba Rao
SAP R/3 Document : SAPScript

       Ü To create a new character string, click on the Character String button

       Ü To create a new Character String go to EDIT à Create Element

       Ü Give a character string name and a description

       Ü In the character strings attribute, you can specify the font types, font
         sizes, barcodes, superscript, subscript, hidden, protected etc.


The various output areas found on a form are called Windows

You can organize texts within your windows using the text elements and

Windows can appear on numerous pages within a single form

       Ü Click on Windows button

       Ü To create a new window go to EDIT à Create Element

       Ü Give a name and description for the window

       Ü Specify the window type

               Ü There are 3 types of windows

                   Ü MAIN
                   Ü CONSTANT
                   Ü VARIABLE

               Ü Every layout set can have only one MAIN window. MAIN
                 window is created by default

               Ü MAIN window can flow across pages

               Ü CONSTANT windows are use only once per page

       Ü You need to specify default of that windows


               Ü For every window you may want some text to appear in it.

                                                                     By : Subba Rao
SAP R/3 Document : SAPScript

               Ü Click on the Text Elements button

               Ü In the text elements you can enter the text in the editor that
                 has to be displayed in the window

               Ü This editor is like the one that you get for Std. Text


               Ü Using the PAGE WINDOWS, you can specify the positions and
                 size of the windows on the pages

               Ü A PAGE WINDOW can have different size and position on
                 different pages

               Ü Texts that appear in page windows are defined for an entire
                 form using that form’s corresponding window

               Ü Click on PAGE WINDOW button

               Ü Select the page on which you would want to place the windows
                 by double clicking on the page name

               Ü In the standard attributes, you have to specify the left margin,
                 Upper margin, Window height and Window width. This will
                 determine the position and size of the window on the page

               Ü The text for each window can be written in Text Element of the


Ü You should have the company logo or any other graphical element that you
  want to include in the FORM / LAYOUT SET in a valid graphic file format
  like .bmp or .jpg

Ü This .bmp / .jpg file has to first converted into a .TIFF file format using any
  software that would do the conversion like a software called PHOTOWORK

Ü To include this graphic in the FORM / LAYOUT SET, define a new window
  and incorporate the text element (i.e. the TIFF file) in the new window

Ü After converting to the TIFF format, access the file on the front end

Ü Upload the file as text module using the ABAP/4 report RSTXLDMC

                                                                          By : Subba Rao
SAP R/3 Document : SAPScript

Ü Execute this program from the ABAP/4 editor

Ü Use RSTXLDMC to save the TIFF file on your front end.

Ü Enter the location of the .TIFF file name on your system

Ü Specify BMON or BCOL as the type of raster image

Ü The system generates a suggested name for the text : ZHEX-MACRO-*. The
  asterix (*) denotes the file type. For example ZHEX-MACRO-LOGO.

Ü Use the ID ‘ST’ and the logon language

Ü This completes the process of converting the .TIFF file into a text element

Ü To incorporate the logo specific text element into the FORM / LAYOUT SET,
  enter INLCUDE ZHEX-MACRO-LOGO OBJECT TEXT ID ST in the first line.

SAPScript à ABAP/4 Interface

Ü You can interface a ABAP/4 program with SAPScript

Ü This is done when you need to get data from the tables into SAPScript

Ü Using this interface you an create Mail Merge documents in SAP


       Ü TABLES statement : here you will declare the table names from which
         the data has to brought in

       Ü DATA statement : here you declare the variables or internal tables
         that you may use

       Ü SELECT statement : After declaring the tables and internal tables you
         use the SELECT statement to select the required data from the tables

       Ü OPEN_FORM function : After selecting the data, you open the layout
         set in which you want to display the data. In the OPEN_FORM
         function we mention the Layout set name to open.

       Ü WRITE_FORM function : Then you display the data in the layout set
         using the WRITE_FORM function. Here you specify the ELEMENT
         NAME and the window in which you display the data.

       Ü CLOSE_FORM function : After displaying / printing the data you
         close the form i.e. the layout set, using the CLOSE_FORM function.

                                                                    By : Subba Rao
SAP R/3 Document : SAPScript

           Since you have opened a form you close that form using the
           CLOSE_FORM function.

Summary :

Û A SAPScript Layout set consists of different elements like Pages, Windows,
  Page Windows, Character Strings, Paragraphs etc.

Û You will have to create a layout set in the following order.

Û Every layout set may consist of at least one Page. It may also contain
  number of pages. So you first define a default page.

Û Every Page should have a default paragraph assigned to it. So after you
  create a page assign a paragraph to the page.

Û The contents of every page have to specify a position on the page. For that
  you have create to Windows. Which Windows should appear in what pages
  and at which position is user specific.

Û Every Window is some certain size. So you specify the sizes of the windows
  in the Page Window of each Window. This will also determine the position of
  the windows.

Û The contents to be displayed in the Windows are written in Text Elements.

Û What styles the paragraphs / texts in the page widow should take can be
  defined using the Character Strings.

                                                                    By : Subba Rao

To top