<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: sapscript in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/2873982#M674418</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Transaction Codes Used&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SE71  : Form Painter&lt;/P&gt;&lt;P&gt;SE72  : Style Maintenance&lt;/P&gt;&lt;P&gt;SE73  : Font Maintenance&lt;/P&gt;&lt;P&gt;SE78  : Sapscript Graphics Management&lt;/P&gt;&lt;P&gt;RSTXLDMC : Import graphics as text .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SYMBOLS&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Symbols are place holder for values in the forms and are filled during&lt;/P&gt;&lt;P&gt;print formatting e.g. &amp;amp;DATE&amp;amp; ,&amp;amp;KNA1-NAME&amp;amp; . They are case insensitive&lt;/P&gt;&lt;P&gt;and are surrounded by &amp;amp;.&lt;/P&gt;&lt;P&gt;There are 3 types of symbols&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;1) System Symbols&lt;/P&gt;&lt;P&gt;        System symbols are system maintained and their value is provided&lt;/P&gt;&lt;P&gt;        by the system. These are as follow:&lt;/P&gt;&lt;P&gt;  DATE            &lt;/P&gt;&lt;P&gt;  TIME             &lt;/P&gt;&lt;P&gt;  HOURS &lt;/P&gt;&lt;P&gt;  MINUTES &lt;/P&gt;&lt;P&gt;  SECONDS &lt;/P&gt;&lt;P&gt;  PAGE&lt;/P&gt;&lt;P&gt;  NEXTPAGE&lt;/P&gt;&lt;P&gt;  DAY&lt;/P&gt;&lt;P&gt;  MONTH &lt;/P&gt;&lt;P&gt;  YEAR &lt;/P&gt;&lt;P&gt;  NAME_OF_DAY &lt;/P&gt;&lt;P&gt;  SPACE &lt;/P&gt;&lt;P&gt;  DEVICE&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;2)Standard Symbols&lt;/P&gt;&lt;P&gt;         Standard sumbols are user maintained by using transaction SM30 .These symbols are stored in table TTDG e.g &amp;amp;MFG&amp;amp; which&lt;/P&gt;&lt;P&gt;stands for ' Your's Faithfully ' .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;3)Program Symbols&lt;/P&gt;&lt;P&gt;         Program  symbols are placeholder for database fields and global program symbols in the print program e.g &amp;amp;KNA1-NAME1&amp;amp; here the table&lt;/P&gt;&lt;P&gt;KNA1 has alreadty been declared in the print program using TABLES statement.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROL COMMANDS&lt;/P&gt;&lt;P&gt;     Control Commands are used to change text output , these are used with&lt;/P&gt;&lt;P&gt;the format key /: in the format column&lt;/P&gt;&lt;P&gt;e.g. INCLUDE MYTEXT OBJECT TEXT ID ST&lt;/P&gt;&lt;P&gt;      These are:&lt;/P&gt;&lt;P&gt;INCLUDE&lt;/P&gt;&lt;P&gt;DEFINE&lt;/P&gt;&lt;P&gt;ADDRESS  ... ENDADDRESS&lt;/P&gt;&lt;P&gt;PROTECT   ... ENDPROTECT &lt;/P&gt;&lt;P&gt;NEW-PAGE&lt;/P&gt;&lt;P&gt;IF ... ENDIF&lt;/P&gt;&lt;P&gt;CASE .... ENDCASE&lt;/P&gt;&lt;P&gt;PERFORM ... USING&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;INCLUDE name OBJECT name ID name PARAGRAPH name LANGUAGE   name&lt;/P&gt;&lt;P&gt; Include command is used to include standard text in a form.the text &lt;/P&gt;&lt;P&gt; should be already defined by using transaction SO10.&lt;/P&gt;&lt;P&gt; Here name is the name of text&lt;/P&gt;&lt;P&gt; ID is used to classify text e.g. SDVD (SD related text) , ST (Standard text)&lt;/P&gt;&lt;P&gt; OBJECT is used to specify type of object it an be TEXT , DOKU&lt;/P&gt;&lt;P&gt; LANGUAGE is used to specify language like EN ,if ommited than logon&lt;/P&gt;&lt;P&gt;  language is used&lt;/P&gt;&lt;P&gt; PARAGRAPH is used to specify the paragraph like C&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; e.g. /:INCLUDE mytext OBJECT TEXT ID ST LANGUAGE EN&lt;/P&gt;&lt;P&gt;         Here the standard text created in SO10 with name mytext is&lt;/P&gt;&lt;P&gt;         included in the form in language EN (English)&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DEFINE&lt;/P&gt;&lt;P&gt;          Define is used to define a symbol in the form i.e defining a variable and&lt;/P&gt;&lt;P&gt;          giving it a value . e.g. /:DEFINE &amp;amp;NAME&amp;amp; = 'Niraj Visnoi'&lt;/P&gt;&lt;P&gt;                                         /:DEFINE &amp;amp;SPECIAL&amp;amp; = ' 14 TH APRIL'&lt;/P&gt;&lt;P&gt;ADDRESS ... ENDADDRESS&lt;/P&gt;&lt;P&gt;          ADDRESS and ENDADDRESS is used to specify the address which will &lt;/P&gt;&lt;P&gt;           be formatted according to the target country i.e the recipient country.&lt;/P&gt;&lt;P&gt;           e.g. /:ADDRESS sales PARAGRAPH C&lt;/P&gt;&lt;P&gt;                  /:NAME &amp;amp;KNA1-NAME1&amp;amp;   &lt;/P&gt;&lt;P&gt;                  /:STREET &amp;amp;KNA1-STRAS&amp;amp;&lt;/P&gt;&lt;P&gt;                  /:POSTCODE &amp;amp;KNA1-PSTLZ&amp;amp;&lt;/P&gt;&lt;P&gt;                  /:CITY &amp;amp;KNA1-ORT01&amp;amp;&lt;/P&gt;&lt;P&gt;                  /:COUNTRY &amp;amp;KNA1-LAND1&amp;amp; &lt;/P&gt;&lt;P&gt;                  /:FROMCOUNTRY 'DE'&lt;/P&gt;&lt;P&gt;                  /:ENDADDRESS&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROTECT .... ENDPROTECT&lt;/P&gt;&lt;P&gt;      The text which we want to be printed without any  break i.e printed completely in a page is&lt;/P&gt;&lt;P&gt;inserted between PROTECT  and  ENDPROTECT . If sapscript finds that the text cannot be printed on that page completely a implicit page break occurs and the text is printed on the next page&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;NEW-PAGE&lt;/P&gt;&lt;P&gt;     NEW-PAGE is used to insert a page break ,it can be conditional if used between IF..ENDIF&lt;/P&gt;&lt;P&gt;     e.g. /:IF &amp;amp;KNA1-NAME1&amp;amp; = 'NIRAJ'&lt;/P&gt;&lt;P&gt;            /:NEW-PAGE&lt;/P&gt;&lt;P&gt;            /:ENDIF&lt;/P&gt;&lt;P&gt;IF ... ENDIF&lt;/P&gt;&lt;P&gt;     IF ... ENDIF is used in the same way as in ABAP , a condition is tested and if it is true&lt;/P&gt;&lt;P&gt;     all the statements between IF and ELSE are executed otherwise statements between ELSE  &lt;/P&gt;&lt;P&gt;    and ENDIF are executed, ELSE is optioonal.&lt;/P&gt;&lt;P&gt;     /:IF condition&lt;/P&gt;&lt;P&gt;     ..&lt;/P&gt;&lt;P&gt;      ..&lt;/P&gt;&lt;P&gt;     /:ENDIF&lt;/P&gt;&lt;P&gt;      or&lt;/P&gt;&lt;P&gt;     /:IF condition&lt;/P&gt;&lt;P&gt;     ..&lt;/P&gt;&lt;P&gt;     ELSE&lt;/P&gt;&lt;P&gt;       ..&lt;/P&gt;&lt;P&gt;     /:ENDIF&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CASE ... ENDCASE&lt;/P&gt;&lt;P&gt;      It si similar to multiple IF.. ENDIF's but is much cleaner.&lt;/P&gt;&lt;P&gt;      /:CASE condition&lt;/P&gt;&lt;P&gt;      /:WHEN value1&lt;/P&gt;&lt;P&gt;      ...&lt;/P&gt;&lt;P&gt;      /:WHEN value2&lt;/P&gt;&lt;P&gt;      ...&lt;/P&gt;&lt;P&gt;      ...&lt;/P&gt;&lt;P&gt;      /:ENDCASE&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;TIME/DATE/COUNTRY Formats&lt;/P&gt;&lt;P&gt;      These commands are used for specifying the format of date and&lt;/P&gt;&lt;P&gt;       time and setting the default country.&lt;/P&gt;&lt;P&gt;     /:SET DATE MASK = 'MM.DD.YYYY'&lt;/P&gt;&lt;P&gt;     /:SET TIME MASK = 'HH:MM'&lt;/P&gt;&lt;P&gt;     /:SET COUNTRY 'DN'&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;PERFORM ... IN PROGRAM .... USING.. CHANGING ..  &lt;/P&gt;&lt;P&gt;ENDPERFORM&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      To call ABAP subroutines from within  a form we use the  &lt;/P&gt;&lt;P&gt;     PERFORM... IN PROGRAM ... statement , the advantage of    &lt;/P&gt;&lt;P&gt;     using it  is that the print program is not required to cahnge and we &lt;/P&gt;&lt;P&gt;     can get the new data from the subroutine which is placed in a Z  &lt;/P&gt;&lt;P&gt;     report . To pass and get the values from th subroutine the  &lt;/P&gt;&lt;P&gt;     parameters are passed which are of  type structure ITCSY.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;     e.g. /:PERFORM get_date IN PROGRAM zreport&lt;/P&gt;&lt;P&gt;            /:USING &amp;amp;SALESORDER&amp;amp;&lt;/P&gt;&lt;P&gt;            /:CHANGING &amp;amp;S_DATE&amp;amp;&lt;/P&gt;&lt;P&gt;            /:ENDPERFORM   &lt;/P&gt;&lt;P&gt;            The date &amp;amp;S_DATE&amp;amp; ....&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           The  ABAP Code would be&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           REPORT zreport.&lt;/P&gt;&lt;P&gt;           TABLES ztab.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           FORM get_date TABLES in_tab STRUCTURE ITCSY out_tab&lt;/P&gt;&lt;P&gt;           STRUCTURE ITCSY .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           READ TABLE in_tab INDEX 1.&lt;/P&gt;&lt;P&gt;           SELECT some_date FROM ztab WHERE salesorder = in_tab-value.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;           READ TABLE out-tab INDEX 1.&lt;/P&gt;&lt;P&gt;           MOVE ztab-somedate TO out_tab-value&lt;/P&gt;&lt;P&gt;           MODIFY out_tab INDEX 1.&lt;/P&gt;&lt;P&gt;           ENDIF.&lt;/P&gt;&lt;P&gt;           ENDFORM.&lt;/P&gt;&lt;P&gt;           &lt;/P&gt;&lt;P&gt;            In the above code USING is used to pass the value to the&lt;/P&gt;&lt;P&gt;          subroutine while changing is used to recieve the value from th&lt;/P&gt;&lt;P&gt;          subroutine ,for further paramters we can use either USING or&lt;/P&gt;&lt;P&gt;           CHANGING .&lt;/P&gt;&lt;P&gt;           In the subroutine the type of paramter is always an internal table of&lt;/P&gt;&lt;P&gt;           type ITCSY  irrespective of the value passed.The VALUE field &lt;/P&gt;&lt;P&gt;           of the internal table is used to fill and recieve the values   . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The print program is used to print the actual form ,the functions the print program has to do include retrieving of data from database tables , selecting a FORM and printing of TEXT ELEMENTS in a desired sequence.&lt;/P&gt;&lt;P&gt;            The function modules used in aprint prgram are :&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;OPEN_FORM&lt;/P&gt;&lt;P&gt;START_FORM&lt;/P&gt;&lt;P&gt;WRITE_FORM&lt;/P&gt;&lt;P&gt;CONTROL_FORM&lt;/P&gt;&lt;P&gt;END_FORM&lt;/P&gt;&lt;P&gt;CLOSE_FROM&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;To start printing a form we must use OPEN_FORM and in the end we should use CLOSE_FORM to complete the spool request.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Function modules in detail.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;OPEN_FORM function module&lt;/P&gt;&lt;P&gt;This function module should be called first before any printing can take place , here we specify the name of the form and the print language.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'OPEN_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;   DIALOG         = 'X'&lt;/P&gt;&lt;P&gt;   DEVICE         = 'PRINTER'&lt;/P&gt;&lt;P&gt;   FORM            = form name&lt;/P&gt;&lt;P&gt;   LANGUAGE   = SY-LANGU&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; OPTIONS      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;   CANCELLED  = 1&lt;/P&gt;&lt;P&gt;   DEVICE          = 2&lt;/P&gt;&lt;P&gt;   FORM            = 3&lt;/P&gt;&lt;P&gt;   OTHERS        = 11&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;In the above function module the parameter&lt;/P&gt;&lt;P&gt;FORM      = Name of form&lt;/P&gt;&lt;P&gt;DEVICE    = PRINTER (print using spool),TELEFAX (fax output)&lt;/P&gt;&lt;P&gt;                   SCREEN (output to screen)&lt;/P&gt;&lt;P&gt;OPTIONS = It is a structure of type ITCPO and it controls the various&lt;/P&gt;&lt;P&gt;                   attributes like number of copies , print preview etc.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;START_FROM function module&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;This function module is called if we want to use different forms with similar characterstics in a single spool request,it must be closed by END_FORM function module.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'START_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;  FORM            =&lt;/P&gt;&lt;P&gt;  LANGUAGE    =&lt;/P&gt;&lt;P&gt;  STARTPAGE  =&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;  FORM            = 1&lt;/P&gt;&lt;P&gt;  OTHERS        = 7&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WRITE_FORM Function module&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;This function module is used to write text in a window in the form using&lt;/P&gt;&lt;P&gt;text elements (/:E element). We can specify whether the text is to be appended , replaced or added and in which portion of the window it will be printed i.e TOP, BOTTOM ,BODY. In this function module actual printing takes place.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;   ELEMENT    =&lt;/P&gt;&lt;P&gt;   FUNCTION  =&lt;/P&gt;&lt;P&gt;   TYPE          =&lt;/P&gt;&lt;P&gt;   WINDOW    =&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;   ELEMENT   =  1&lt;/P&gt;&lt;P&gt;    OTHERS    =  9&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Here in this function module the ELEMENT specifies which textelement is&lt;/P&gt;&lt;P&gt;printed . WINDOW specifies which window of the form to be print in.&lt;/P&gt;&lt;P&gt;TYPE specifies the output area of the window TOP,BOTTOM,BODY.&lt;/P&gt;&lt;P&gt;FUNCTION specifies whether the text is to be appended , replaced or added.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CLOSE_FORM function module&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;This function module should be called in the end and it has no exporting&lt;/P&gt;&lt;P&gt;parameter.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FROM'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RESULT     =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;    UNOPENED = 1&lt;/P&gt;&lt;P&gt;    OTHERS     =  5&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;   Here the result parameteer returns the status information and print/fax parameters after the form has been printed.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CONTROL_FORM function module&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; This function module is used to insert SAPScript control commands like NEW-PAGE etc from whithin the ABAP program.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONTROL_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;  COMMAND    =&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;  UNOPENED   = 1&lt;/P&gt;&lt;P&gt;  OTHERS        = 3&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;NOTE: The print program and the form are stored in the table TNAPR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use graphics in the SAPScript FORMS they must be imported to R/3 system for this we use transaction SE78  or report RSTXLDMC and give the graphics a name . The image type is generally .TIF(tagged image format) or .BMP (windows bitmap file) .&lt;/P&gt;&lt;P&gt;    The RSTXLDMC report is used to import images which are in Tagged Image Format (.TIF) into R/3 and saved as standard text (OBJECT TEXT and ID ST) in the system. Since these images (.TIF) are stored as standard text they can be included in the sapscript using the standard INCLUDE statement. The image to be used if is not in .TIF format than it should be converted to this format e.g. by using IMAGING program in WINDOWS.&lt;/P&gt;&lt;P&gt;    Once converted to .TIF they can be used in RSTXLDMC report. The image is stored by the name of ZHEX-MARCO-name . The other parameters in this report e.g. are used to indicate the type of IMAGE&lt;/P&gt;&lt;P&gt;BCOL for color or BMON for mono color images.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;e.g. /:INCLUDE ZHEX-MARCO-name OBJECT TEXT ID ST&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;          After the graphics has been imported we can use the INCLUDE statement to include the graphics or use the menu Edit-&amp;gt;Graphics-&amp;gt;Create.&lt;/P&gt;&lt;P&gt;  e.g. /:BITMAP logo OBJECT GRAPHICS ID BMAP  .&lt;/P&gt;&lt;P&gt;The above include statement is inserted automatically if we use the menu command.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;BOXES and LINES&lt;/P&gt;&lt;P&gt;    To use boxes in the form or to create a table in the form we use BOX statement. a table can be constructed by using a combination of BOXes.&lt;/P&gt;&lt;P&gt;  /:BOX XPOS val unit YPOS val unit WIDTH val HEIGHT val INTENSITY val  FRAME val unit .&lt;/P&gt;&lt;P&gt; The Unit used in the sapscript cane be:&lt;/P&gt;&lt;P&gt;TW   twip&lt;/P&gt;&lt;P&gt;MM  milimeter&lt;/P&gt;&lt;P&gt;CM   centimeter&lt;/P&gt;&lt;P&gt;LN    line&lt;/P&gt;&lt;P&gt;CH    character&lt;/P&gt;&lt;P&gt;IN     inch&lt;/P&gt;&lt;P&gt;PT    point&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The parameters like WIDTH , XPOS etc should be followed by a proper unit.&lt;/P&gt;&lt;P&gt;The INTENSITY is in the percentage of the grey scale.&lt;/P&gt;&lt;P&gt;The FRAME parameter is the thickness of the frame the default value is 0.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:BOX XPOS '5'  CM YPOS '2' CM WIDTH '14' CM HEIGHT '20' CM FRAME 20 TW INTENSITY 10.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:BOX INTENSITY 10&lt;/P&gt;&lt;P&gt;will fill the current window background with a shading of grey scale 10%..&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;To draw a horizontal line we set the HEIGHT parameter to the value of 0.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:BOX XPOS '5' CM HEIGHT 0 TW FRAME 10 TW.&lt;/P&gt;&lt;P&gt;This will draw a horizontal line across the top edge of the window.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;To draw a horizontal line  we should set the value of WIDTH parameter to 0.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:BOX XPOS '5' CM YPOS WIDTH '0' TW FRAME 10 TW.&lt;/P&gt;&lt;P&gt;This will draw a vertical line across the complete height of the left edge of the current window.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;POSITION and SIZE&lt;/P&gt;&lt;P&gt;  We can use POSITION and SIZE to set default position and size of the window and also for relative positioning. With POSITION we can use the paramters XORIGIN , YORIGIN ,WINDOW. With SIZE we can use WIDTH and HEIGHT and WINDOW and PAGE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:POSITION XORIGIN '5' CM YORIGIN '5'CM&lt;/P&gt;&lt;P&gt;/:SIZE HEIGHT '5' CM WIDTH '14' CM&lt;/P&gt;&lt;P&gt;/:BOX FRAME 10 TW INTENSITY 10&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;POSITION WINDOW&lt;/P&gt;&lt;P&gt; We can use POSITION WINDOW to set the position relative to current window i.e to the left,top of the current window ,then we can use POSITION with XORIGIN and YORIGIN to specify the current position relative to the start of the window, we can use '+' and '-' with the values.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:POSITION WINDOW&lt;/P&gt;&lt;P&gt;/:POSITION XORIGIN '&lt;EM&gt;5' CM YORIGIN '&lt;/EM&gt;5' CM&lt;/P&gt;&lt;P&gt; In the above example the position now becomes 5 CM left from the origin of the window and 5 CM from the top of the window.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; WINDOW sets the value of the WIDTH and HEIGHT to current window and&lt;/P&gt;&lt;P&gt;PAGE sets the value of the  WIDTH and HEIGHT to current page.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:SIZE WINDOW&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:SIZE PAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In subroutine pool type report give this coding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZPSAPSCRIPT.
TABLES : EKKO,                        
         EKPO,                        
         KNA1,                        
         USR01,                       
         MARA,                        
         MAKT.

DATA : BEGIN OF ZOPTION.
        INCLUDE STRUCTURE ITCPO.
DATA : END OF ZOPTION.

PARAMETERS: P_EBELN LIKE EKKO-EBELN,
            P_EBELP LIKE EKPO-EBELP.

CLEAR EKPO.
SELECT SINGLE * FROM EKPO
       WHERE EBELN = P_EBELN AND
             EBELP = P_EBELP.

CLEAR KNA1.
SELECT SINGLE NAME1 FROM KNA1
              INTO KNA1-NAME1
              WHERE KUNNR = EKPO-KUNNR.

CLEAR MAKT.
SELECT SINGLE MAKTX FROM MAKT
              INTO MAKT-MAKTX
              WHERE MATNR = EKPO-MATNR AND
                    SPRAS = SY-LANGU.

CLEAR USR01.
SELECT SINGLE * FROM USR01 WHERE BNAME = SY-UNAME.

ZOPTION-TDDEST    = USR01-SPLD.        "Output device (printer)
ZOPTION-TDIMMED   = 'X'.               "Print immediately
ZOPTION-TDDELETE  = 'X'.               "Delete after printing
ZOPTION-TDPROGRAM = 'ZPQRPRNT'.        "Program Name

CALL FUNCTION 'OPEN_FORM'
     EXPORTING
         APPLICATION        = 'TX'
*         ARCHIVE_INDEX      = ' '
*         ARCHIVE_PARAMS     = ' '
         DEVICE             = 'PRINTER'
         DIALOG             = ' '
         FORM               = 'Z_TESTSCRIPT'
         LANGUAGE           = SY-LANGU
         OPTIONS            = ZOPTION
     IMPORTING
          LANGUAGE           = SY-LANGU
       EXCEPTIONS
         OTHERS     = 1.

CALL FUNCTION 'WRITE_FORM'
     EXPORTING
         ELEMENT       = 'HEADER'
*         FUNCTION      = 'SET'
*         TYPE          = 'BODY'
         WINDOW        = 'HEADER'
     EXCEPTIONS
          ELEMENT       = 1.

CALL FUNCTION 'WRITE_FORM'
     EXPORTING
         ELEMENT       = 'MAIN'
*         FUNCTION      = 'SET'
*         TYPE          = 'BODY'
         WINDOW        = 'MAIN'
     EXCEPTIONS
          ELEMENT       = 1.

CALL FUNCTION 'WRITE_FORM'
     EXPORTING
         ELEMENT       = 'FOOTER'
*         FUNCTION      = 'SET'
*         TYPE          = 'BODY'
         WINDOW        = 'FOOTER'
     EXCEPTIONS
          ELEMENT       = 1.

CALL FUNCTION 'CLOSE_FORM'
     EXCEPTIONS
          UNOPENED = 1
          OTHERS   = 2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it solves your issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Sep 2007 10:01:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-27T10:01:26Z</dc:date>
    <item>
      <title>sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/2873980#M674416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sir &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please give me some check script coding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ritu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 09:53:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/2873980#M674416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T09:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/2873981#M674417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ritu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check these linkes,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Link for SAP Scripts (step by step procedure)&lt;/P&gt;&lt;P&gt;&lt;A href="http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create_A_SAPSCRIPT_Form/How_to_Create_SAPSCRIPT.html" target="test_blank"&gt;http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create_A_SAPSCRIPT_Form/How_to_Create_SAPSCRIPT.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAPScripts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf" target="test_blank"&gt;http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf" target="test_blank"&gt;http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf" target="test_blank"&gt;http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf" target="test_blank"&gt;http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf" target="test_blank"&gt;http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm" target="test_blank"&gt;http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP SCRIPT FIELDS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;scripts easy material&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/sap_script_made_easy.html" target="test_blank"&gt;http://www.allsaplinks.com/sap_script_made_easy.html&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/ssintro.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/ssintro.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/sscript.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/sscript.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/sscript.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/sscript.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/lsetssap.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/lsetssap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/sscrtpex1.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/sscrtpex1.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/sapscripts.htm" target="test_blank"&gt;http://www.sap-img.com/sapscripts.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.thespot4sap.com/Articles/SAPscript_Introduction.asp" target="test_blank"&gt;http://www.thespot4sap.com/Articles/SAPscript_Introduction.asp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapbrain.com/TUTORIALS/TECHNICAL/SAPSCRIPTS_tutorial.html" target="test_blank"&gt;http://www.sapbrain.com/TUTORIALS/TECHNICAL/SAPSCRIPTS_tutorial.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRRDI/BCSRVSCRRDI.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRRDI/BCSRVSCRRDI.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCREDIT/BCSRVSCREDIT.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCREDIT/BCSRVSCREDIT.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sappoint.com/abap/sscrtpex1.pdf" target="test_blank"&gt;http://www.sappoint.com/abap/sscrtpex1.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/sapscripts.htm" target="test_blank"&gt;http://www.sap-img.com/sapscripts.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf" target="test_blank"&gt;http://www.esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other Links&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.virtuosollc.com/PDF/Get_Reporter.pdf" target="test_blank"&gt;http://www.virtuosollc.com/PDF/Get_Reporter.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.virtuosollc.com/PDF/Get_Reporter.pdf" target="test_blank"&gt;http://www.virtuosollc.com/PDF/Get_Reporter.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/da/6ada3889432f48e10000000a114084/frameset.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/frameset.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/5b/d22cee43c611d182b30000e829fbfe/frameset.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.thespot4sap.com/Articles/Code_CostCentreReport.asp" target="test_blank"&gt;http://www.thespot4sap.com/Articles/Code_CostCentreReport.asp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/dialog_programming.html" target="test_blank"&gt;http://www.allsaplinks.com/dialog_programming.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/files/using_table_in_screen.pdf" target="test_blank"&gt;http://www.allsaplinks.com/files/using_table_in_screen.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/ZSAPcHAT" target="test_blank"&gt;http://www.geocities.com/ZSAPcHAT&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pritha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 09:59:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/2873981#M674417</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T09:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/2873982#M674418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Transaction Codes Used&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SE71  : Form Painter&lt;/P&gt;&lt;P&gt;SE72  : Style Maintenance&lt;/P&gt;&lt;P&gt;SE73  : Font Maintenance&lt;/P&gt;&lt;P&gt;SE78  : Sapscript Graphics Management&lt;/P&gt;&lt;P&gt;RSTXLDMC : Import graphics as text .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SYMBOLS&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Symbols are place holder for values in the forms and are filled during&lt;/P&gt;&lt;P&gt;print formatting e.g. &amp;amp;DATE&amp;amp; ,&amp;amp;KNA1-NAME&amp;amp; . They are case insensitive&lt;/P&gt;&lt;P&gt;and are surrounded by &amp;amp;.&lt;/P&gt;&lt;P&gt;There are 3 types of symbols&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;1) System Symbols&lt;/P&gt;&lt;P&gt;        System symbols are system maintained and their value is provided&lt;/P&gt;&lt;P&gt;        by the system. These are as follow:&lt;/P&gt;&lt;P&gt;  DATE            &lt;/P&gt;&lt;P&gt;  TIME             &lt;/P&gt;&lt;P&gt;  HOURS &lt;/P&gt;&lt;P&gt;  MINUTES &lt;/P&gt;&lt;P&gt;  SECONDS &lt;/P&gt;&lt;P&gt;  PAGE&lt;/P&gt;&lt;P&gt;  NEXTPAGE&lt;/P&gt;&lt;P&gt;  DAY&lt;/P&gt;&lt;P&gt;  MONTH &lt;/P&gt;&lt;P&gt;  YEAR &lt;/P&gt;&lt;P&gt;  NAME_OF_DAY &lt;/P&gt;&lt;P&gt;  SPACE &lt;/P&gt;&lt;P&gt;  DEVICE&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;2)Standard Symbols&lt;/P&gt;&lt;P&gt;         Standard sumbols are user maintained by using transaction SM30 .These symbols are stored in table TTDG e.g &amp;amp;MFG&amp;amp; which&lt;/P&gt;&lt;P&gt;stands for ' Your's Faithfully ' .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;3)Program Symbols&lt;/P&gt;&lt;P&gt;         Program  symbols are placeholder for database fields and global program symbols in the print program e.g &amp;amp;KNA1-NAME1&amp;amp; here the table&lt;/P&gt;&lt;P&gt;KNA1 has alreadty been declared in the print program using TABLES statement.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROL COMMANDS&lt;/P&gt;&lt;P&gt;     Control Commands are used to change text output , these are used with&lt;/P&gt;&lt;P&gt;the format key /: in the format column&lt;/P&gt;&lt;P&gt;e.g. INCLUDE MYTEXT OBJECT TEXT ID ST&lt;/P&gt;&lt;P&gt;      These are:&lt;/P&gt;&lt;P&gt;INCLUDE&lt;/P&gt;&lt;P&gt;DEFINE&lt;/P&gt;&lt;P&gt;ADDRESS  ... ENDADDRESS&lt;/P&gt;&lt;P&gt;PROTECT   ... ENDPROTECT &lt;/P&gt;&lt;P&gt;NEW-PAGE&lt;/P&gt;&lt;P&gt;IF ... ENDIF&lt;/P&gt;&lt;P&gt;CASE .... ENDCASE&lt;/P&gt;&lt;P&gt;PERFORM ... USING&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;INCLUDE name OBJECT name ID name PARAGRAPH name LANGUAGE   name&lt;/P&gt;&lt;P&gt; Include command is used to include standard text in a form.the text &lt;/P&gt;&lt;P&gt; should be already defined by using transaction SO10.&lt;/P&gt;&lt;P&gt; Here name is the name of text&lt;/P&gt;&lt;P&gt; ID is used to classify text e.g. SDVD (SD related text) , ST (Standard text)&lt;/P&gt;&lt;P&gt; OBJECT is used to specify type of object it an be TEXT , DOKU&lt;/P&gt;&lt;P&gt; LANGUAGE is used to specify language like EN ,if ommited than logon&lt;/P&gt;&lt;P&gt;  language is used&lt;/P&gt;&lt;P&gt; PARAGRAPH is used to specify the paragraph like C&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; e.g. /:INCLUDE mytext OBJECT TEXT ID ST LANGUAGE EN&lt;/P&gt;&lt;P&gt;         Here the standard text created in SO10 with name mytext is&lt;/P&gt;&lt;P&gt;         included in the form in language EN (English)&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DEFINE&lt;/P&gt;&lt;P&gt;          Define is used to define a symbol in the form i.e defining a variable and&lt;/P&gt;&lt;P&gt;          giving it a value . e.g. /:DEFINE &amp;amp;NAME&amp;amp; = 'Niraj Visnoi'&lt;/P&gt;&lt;P&gt;                                         /:DEFINE &amp;amp;SPECIAL&amp;amp; = ' 14 TH APRIL'&lt;/P&gt;&lt;P&gt;ADDRESS ... ENDADDRESS&lt;/P&gt;&lt;P&gt;          ADDRESS and ENDADDRESS is used to specify the address which will &lt;/P&gt;&lt;P&gt;           be formatted according to the target country i.e the recipient country.&lt;/P&gt;&lt;P&gt;           e.g. /:ADDRESS sales PARAGRAPH C&lt;/P&gt;&lt;P&gt;                  /:NAME &amp;amp;KNA1-NAME1&amp;amp;   &lt;/P&gt;&lt;P&gt;                  /:STREET &amp;amp;KNA1-STRAS&amp;amp;&lt;/P&gt;&lt;P&gt;                  /:POSTCODE &amp;amp;KNA1-PSTLZ&amp;amp;&lt;/P&gt;&lt;P&gt;                  /:CITY &amp;amp;KNA1-ORT01&amp;amp;&lt;/P&gt;&lt;P&gt;                  /:COUNTRY &amp;amp;KNA1-LAND1&amp;amp; &lt;/P&gt;&lt;P&gt;                  /:FROMCOUNTRY 'DE'&lt;/P&gt;&lt;P&gt;                  /:ENDADDRESS&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROTECT .... ENDPROTECT&lt;/P&gt;&lt;P&gt;      The text which we want to be printed without any  break i.e printed completely in a page is&lt;/P&gt;&lt;P&gt;inserted between PROTECT  and  ENDPROTECT . If sapscript finds that the text cannot be printed on that page completely a implicit page break occurs and the text is printed on the next page&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;NEW-PAGE&lt;/P&gt;&lt;P&gt;     NEW-PAGE is used to insert a page break ,it can be conditional if used between IF..ENDIF&lt;/P&gt;&lt;P&gt;     e.g. /:IF &amp;amp;KNA1-NAME1&amp;amp; = 'NIRAJ'&lt;/P&gt;&lt;P&gt;            /:NEW-PAGE&lt;/P&gt;&lt;P&gt;            /:ENDIF&lt;/P&gt;&lt;P&gt;IF ... ENDIF&lt;/P&gt;&lt;P&gt;     IF ... ENDIF is used in the same way as in ABAP , a condition is tested and if it is true&lt;/P&gt;&lt;P&gt;     all the statements between IF and ELSE are executed otherwise statements between ELSE  &lt;/P&gt;&lt;P&gt;    and ENDIF are executed, ELSE is optioonal.&lt;/P&gt;&lt;P&gt;     /:IF condition&lt;/P&gt;&lt;P&gt;     ..&lt;/P&gt;&lt;P&gt;      ..&lt;/P&gt;&lt;P&gt;     /:ENDIF&lt;/P&gt;&lt;P&gt;      or&lt;/P&gt;&lt;P&gt;     /:IF condition&lt;/P&gt;&lt;P&gt;     ..&lt;/P&gt;&lt;P&gt;     ELSE&lt;/P&gt;&lt;P&gt;       ..&lt;/P&gt;&lt;P&gt;     /:ENDIF&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CASE ... ENDCASE&lt;/P&gt;&lt;P&gt;      It si similar to multiple IF.. ENDIF's but is much cleaner.&lt;/P&gt;&lt;P&gt;      /:CASE condition&lt;/P&gt;&lt;P&gt;      /:WHEN value1&lt;/P&gt;&lt;P&gt;      ...&lt;/P&gt;&lt;P&gt;      /:WHEN value2&lt;/P&gt;&lt;P&gt;      ...&lt;/P&gt;&lt;P&gt;      ...&lt;/P&gt;&lt;P&gt;      /:ENDCASE&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;TIME/DATE/COUNTRY Formats&lt;/P&gt;&lt;P&gt;      These commands are used for specifying the format of date and&lt;/P&gt;&lt;P&gt;       time and setting the default country.&lt;/P&gt;&lt;P&gt;     /:SET DATE MASK = 'MM.DD.YYYY'&lt;/P&gt;&lt;P&gt;     /:SET TIME MASK = 'HH:MM'&lt;/P&gt;&lt;P&gt;     /:SET COUNTRY 'DN'&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;PERFORM ... IN PROGRAM .... USING.. CHANGING ..  &lt;/P&gt;&lt;P&gt;ENDPERFORM&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      To call ABAP subroutines from within  a form we use the  &lt;/P&gt;&lt;P&gt;     PERFORM... IN PROGRAM ... statement , the advantage of    &lt;/P&gt;&lt;P&gt;     using it  is that the print program is not required to cahnge and we &lt;/P&gt;&lt;P&gt;     can get the new data from the subroutine which is placed in a Z  &lt;/P&gt;&lt;P&gt;     report . To pass and get the values from th subroutine the  &lt;/P&gt;&lt;P&gt;     parameters are passed which are of  type structure ITCSY.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;     e.g. /:PERFORM get_date IN PROGRAM zreport&lt;/P&gt;&lt;P&gt;            /:USING &amp;amp;SALESORDER&amp;amp;&lt;/P&gt;&lt;P&gt;            /:CHANGING &amp;amp;S_DATE&amp;amp;&lt;/P&gt;&lt;P&gt;            /:ENDPERFORM   &lt;/P&gt;&lt;P&gt;            The date &amp;amp;S_DATE&amp;amp; ....&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           The  ABAP Code would be&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           REPORT zreport.&lt;/P&gt;&lt;P&gt;           TABLES ztab.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           FORM get_date TABLES in_tab STRUCTURE ITCSY out_tab&lt;/P&gt;&lt;P&gt;           STRUCTURE ITCSY .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           READ TABLE in_tab INDEX 1.&lt;/P&gt;&lt;P&gt;           SELECT some_date FROM ztab WHERE salesorder = in_tab-value.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;           IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;           READ TABLE out-tab INDEX 1.&lt;/P&gt;&lt;P&gt;           MOVE ztab-somedate TO out_tab-value&lt;/P&gt;&lt;P&gt;           MODIFY out_tab INDEX 1.&lt;/P&gt;&lt;P&gt;           ENDIF.&lt;/P&gt;&lt;P&gt;           ENDFORM.&lt;/P&gt;&lt;P&gt;           &lt;/P&gt;&lt;P&gt;            In the above code USING is used to pass the value to the&lt;/P&gt;&lt;P&gt;          subroutine while changing is used to recieve the value from th&lt;/P&gt;&lt;P&gt;          subroutine ,for further paramters we can use either USING or&lt;/P&gt;&lt;P&gt;           CHANGING .&lt;/P&gt;&lt;P&gt;           In the subroutine the type of paramter is always an internal table of&lt;/P&gt;&lt;P&gt;           type ITCSY  irrespective of the value passed.The VALUE field &lt;/P&gt;&lt;P&gt;           of the internal table is used to fill and recieve the values   . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The print program is used to print the actual form ,the functions the print program has to do include retrieving of data from database tables , selecting a FORM and printing of TEXT ELEMENTS in a desired sequence.&lt;/P&gt;&lt;P&gt;            The function modules used in aprint prgram are :&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;OPEN_FORM&lt;/P&gt;&lt;P&gt;START_FORM&lt;/P&gt;&lt;P&gt;WRITE_FORM&lt;/P&gt;&lt;P&gt;CONTROL_FORM&lt;/P&gt;&lt;P&gt;END_FORM&lt;/P&gt;&lt;P&gt;CLOSE_FROM&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;To start printing a form we must use OPEN_FORM and in the end we should use CLOSE_FORM to complete the spool request.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Function modules in detail.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;OPEN_FORM function module&lt;/P&gt;&lt;P&gt;This function module should be called first before any printing can take place , here we specify the name of the form and the print language.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'OPEN_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;   DIALOG         = 'X'&lt;/P&gt;&lt;P&gt;   DEVICE         = 'PRINTER'&lt;/P&gt;&lt;P&gt;   FORM            = form name&lt;/P&gt;&lt;P&gt;   LANGUAGE   = SY-LANGU&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; OPTIONS      =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;   CANCELLED  = 1&lt;/P&gt;&lt;P&gt;   DEVICE          = 2&lt;/P&gt;&lt;P&gt;   FORM            = 3&lt;/P&gt;&lt;P&gt;   OTHERS        = 11&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;In the above function module the parameter&lt;/P&gt;&lt;P&gt;FORM      = Name of form&lt;/P&gt;&lt;P&gt;DEVICE    = PRINTER (print using spool),TELEFAX (fax output)&lt;/P&gt;&lt;P&gt;                   SCREEN (output to screen)&lt;/P&gt;&lt;P&gt;OPTIONS = It is a structure of type ITCPO and it controls the various&lt;/P&gt;&lt;P&gt;                   attributes like number of copies , print preview etc.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;START_FROM function module&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;This function module is called if we want to use different forms with similar characterstics in a single spool request,it must be closed by END_FORM function module.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'START_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;  FORM            =&lt;/P&gt;&lt;P&gt;  LANGUAGE    =&lt;/P&gt;&lt;P&gt;  STARTPAGE  =&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;  FORM            = 1&lt;/P&gt;&lt;P&gt;  OTHERS        = 7&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WRITE_FORM Function module&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;This function module is used to write text in a window in the form using&lt;/P&gt;&lt;P&gt;text elements (/:E element). We can specify whether the text is to be appended , replaced or added and in which portion of the window it will be printed i.e TOP, BOTTOM ,BODY. In this function module actual printing takes place.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;   ELEMENT    =&lt;/P&gt;&lt;P&gt;   FUNCTION  =&lt;/P&gt;&lt;P&gt;   TYPE          =&lt;/P&gt;&lt;P&gt;   WINDOW    =&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;   ELEMENT   =  1&lt;/P&gt;&lt;P&gt;    OTHERS    =  9&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Here in this function module the ELEMENT specifies which textelement is&lt;/P&gt;&lt;P&gt;printed . WINDOW specifies which window of the form to be print in.&lt;/P&gt;&lt;P&gt;TYPE specifies the output area of the window TOP,BOTTOM,BODY.&lt;/P&gt;&lt;P&gt;FUNCTION specifies whether the text is to be appended , replaced or added.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CLOSE_FORM function module&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;This function module should be called in the end and it has no exporting&lt;/P&gt;&lt;P&gt;parameter.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FROM'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RESULT     =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;    UNOPENED = 1&lt;/P&gt;&lt;P&gt;    OTHERS     =  5&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;   Here the result parameteer returns the status information and print/fax parameters after the form has been printed.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CONTROL_FORM function module&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; This function module is used to insert SAPScript control commands like NEW-PAGE etc from whithin the ABAP program.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONTROL_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;  COMMAND    =&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;  UNOPENED   = 1&lt;/P&gt;&lt;P&gt;  OTHERS        = 3&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;NOTE: The print program and the form are stored in the table TNAPR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use graphics in the SAPScript FORMS they must be imported to R/3 system for this we use transaction SE78  or report RSTXLDMC and give the graphics a name . The image type is generally .TIF(tagged image format) or .BMP (windows bitmap file) .&lt;/P&gt;&lt;P&gt;    The RSTXLDMC report is used to import images which are in Tagged Image Format (.TIF) into R/3 and saved as standard text (OBJECT TEXT and ID ST) in the system. Since these images (.TIF) are stored as standard text they can be included in the sapscript using the standard INCLUDE statement. The image to be used if is not in .TIF format than it should be converted to this format e.g. by using IMAGING program in WINDOWS.&lt;/P&gt;&lt;P&gt;    Once converted to .TIF they can be used in RSTXLDMC report. The image is stored by the name of ZHEX-MARCO-name . The other parameters in this report e.g. are used to indicate the type of IMAGE&lt;/P&gt;&lt;P&gt;BCOL for color or BMON for mono color images.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;e.g. /:INCLUDE ZHEX-MARCO-name OBJECT TEXT ID ST&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;          After the graphics has been imported we can use the INCLUDE statement to include the graphics or use the menu Edit-&amp;gt;Graphics-&amp;gt;Create.&lt;/P&gt;&lt;P&gt;  e.g. /:BITMAP logo OBJECT GRAPHICS ID BMAP  .&lt;/P&gt;&lt;P&gt;The above include statement is inserted automatically if we use the menu command.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;BOXES and LINES&lt;/P&gt;&lt;P&gt;    To use boxes in the form or to create a table in the form we use BOX statement. a table can be constructed by using a combination of BOXes.&lt;/P&gt;&lt;P&gt;  /:BOX XPOS val unit YPOS val unit WIDTH val HEIGHT val INTENSITY val  FRAME val unit .&lt;/P&gt;&lt;P&gt; The Unit used in the sapscript cane be:&lt;/P&gt;&lt;P&gt;TW   twip&lt;/P&gt;&lt;P&gt;MM  milimeter&lt;/P&gt;&lt;P&gt;CM   centimeter&lt;/P&gt;&lt;P&gt;LN    line&lt;/P&gt;&lt;P&gt;CH    character&lt;/P&gt;&lt;P&gt;IN     inch&lt;/P&gt;&lt;P&gt;PT    point&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The parameters like WIDTH , XPOS etc should be followed by a proper unit.&lt;/P&gt;&lt;P&gt;The INTENSITY is in the percentage of the grey scale.&lt;/P&gt;&lt;P&gt;The FRAME parameter is the thickness of the frame the default value is 0.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:BOX XPOS '5'  CM YPOS '2' CM WIDTH '14' CM HEIGHT '20' CM FRAME 20 TW INTENSITY 10.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:BOX INTENSITY 10&lt;/P&gt;&lt;P&gt;will fill the current window background with a shading of grey scale 10%..&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;To draw a horizontal line we set the HEIGHT parameter to the value of 0.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:BOX XPOS '5' CM HEIGHT 0 TW FRAME 10 TW.&lt;/P&gt;&lt;P&gt;This will draw a horizontal line across the top edge of the window.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;To draw a horizontal line  we should set the value of WIDTH parameter to 0.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:BOX XPOS '5' CM YPOS WIDTH '0' TW FRAME 10 TW.&lt;/P&gt;&lt;P&gt;This will draw a vertical line across the complete height of the left edge of the current window.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;POSITION and SIZE&lt;/P&gt;&lt;P&gt;  We can use POSITION and SIZE to set default position and size of the window and also for relative positioning. With POSITION we can use the paramters XORIGIN , YORIGIN ,WINDOW. With SIZE we can use WIDTH and HEIGHT and WINDOW and PAGE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:POSITION XORIGIN '5' CM YORIGIN '5'CM&lt;/P&gt;&lt;P&gt;/:SIZE HEIGHT '5' CM WIDTH '14' CM&lt;/P&gt;&lt;P&gt;/:BOX FRAME 10 TW INTENSITY 10&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;POSITION WINDOW&lt;/P&gt;&lt;P&gt; We can use POSITION WINDOW to set the position relative to current window i.e to the left,top of the current window ,then we can use POSITION with XORIGIN and YORIGIN to specify the current position relative to the start of the window, we can use '+' and '-' with the values.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:POSITION WINDOW&lt;/P&gt;&lt;P&gt;/:POSITION XORIGIN '&lt;EM&gt;5' CM YORIGIN '&lt;/EM&gt;5' CM&lt;/P&gt;&lt;P&gt; In the above example the position now becomes 5 CM left from the origin of the window and 5 CM from the top of the window.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; WINDOW sets the value of the WIDTH and HEIGHT to current window and&lt;/P&gt;&lt;P&gt;PAGE sets the value of the  WIDTH and HEIGHT to current page.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:SIZE WINDOW&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;/:SIZE PAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In subroutine pool type report give this coding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZPSAPSCRIPT.
TABLES : EKKO,                        
         EKPO,                        
         KNA1,                        
         USR01,                       
         MARA,                        
         MAKT.

DATA : BEGIN OF ZOPTION.
        INCLUDE STRUCTURE ITCPO.
DATA : END OF ZOPTION.

PARAMETERS: P_EBELN LIKE EKKO-EBELN,
            P_EBELP LIKE EKPO-EBELP.

CLEAR EKPO.
SELECT SINGLE * FROM EKPO
       WHERE EBELN = P_EBELN AND
             EBELP = P_EBELP.

CLEAR KNA1.
SELECT SINGLE NAME1 FROM KNA1
              INTO KNA1-NAME1
              WHERE KUNNR = EKPO-KUNNR.

CLEAR MAKT.
SELECT SINGLE MAKTX FROM MAKT
              INTO MAKT-MAKTX
              WHERE MATNR = EKPO-MATNR AND
                    SPRAS = SY-LANGU.

CLEAR USR01.
SELECT SINGLE * FROM USR01 WHERE BNAME = SY-UNAME.

ZOPTION-TDDEST    = USR01-SPLD.        "Output device (printer)
ZOPTION-TDIMMED   = 'X'.               "Print immediately
ZOPTION-TDDELETE  = 'X'.               "Delete after printing
ZOPTION-TDPROGRAM = 'ZPQRPRNT'.        "Program Name

CALL FUNCTION 'OPEN_FORM'
     EXPORTING
         APPLICATION        = 'TX'
*         ARCHIVE_INDEX      = ' '
*         ARCHIVE_PARAMS     = ' '
         DEVICE             = 'PRINTER'
         DIALOG             = ' '
         FORM               = 'Z_TESTSCRIPT'
         LANGUAGE           = SY-LANGU
         OPTIONS            = ZOPTION
     IMPORTING
          LANGUAGE           = SY-LANGU
       EXCEPTIONS
         OTHERS     = 1.

CALL FUNCTION 'WRITE_FORM'
     EXPORTING
         ELEMENT       = 'HEADER'
*         FUNCTION      = 'SET'
*         TYPE          = 'BODY'
         WINDOW        = 'HEADER'
     EXCEPTIONS
          ELEMENT       = 1.

CALL FUNCTION 'WRITE_FORM'
     EXPORTING
         ELEMENT       = 'MAIN'
*         FUNCTION      = 'SET'
*         TYPE          = 'BODY'
         WINDOW        = 'MAIN'
     EXCEPTIONS
          ELEMENT       = 1.

CALL FUNCTION 'WRITE_FORM'
     EXPORTING
         ELEMENT       = 'FOOTER'
*         FUNCTION      = 'SET'
*         TYPE          = 'BODY'
         WINDOW        = 'FOOTER'
     EXCEPTIONS
          ELEMENT       = 1.

CALL FUNCTION 'CLOSE_FORM'
     EXCEPTIONS
          UNOPENED = 1
          OTHERS   = 2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it solves your issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 10:01:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/2873982#M674418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T10:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: sapscript</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/2873983#M674419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some useful programs for SAPSCRIPT development/search ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXFCAT  -  Program to find out SAP Scirpt names (Search Program) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXCDM1 -  SAPscript: Sample Program for Form Printing &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXCNVR -   Converting SAPscript standard text to RAW format (ASCII) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXCPDF   -  Routines for Converting OTF Format to PDF Format &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXDBUG   - Activate/Deactivate Form Debugger &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXFCAT    - Find Forms &lt;/P&gt;&lt;P&gt;RSTXFCPY    - Copy Forms Between Clients &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXFCOM  - Comparison of Two Forms &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXFCON   - SAPscript: Conversion of Page Format for Forms &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXFINF     - Comprehensive Information about a Specific Form &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXHTML   - Conversion of SAPscript Texts (ITF) to HTML &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXICON    - List of SAP icons and their names and SAP numbers &amp;lt;xxxxx&amp;gt; &lt;/P&gt;&lt;P&gt;RSTXSYMB   - List of SAP symbols and their names as well as &amp;lt;xxxxx&amp;gt; SAP number &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXR3TR     - Transport Program For SAPscript Transport Objects &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXSCAT    - Find Styles &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXSF01     - TrueType font installation for SAPscript/SmartForms &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSTXTCAT    - Find Standard Texts &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap-img.com/sapscripts.htm" target="test_blank"&gt;http://sap-img.com/sapscripts.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2007 11:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapscript/m-p/2873983#M674419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-27T11:20:03Z</dc:date>
    </item>
  </channel>
</rss>

