<?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: Justify in SAP Script in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/justify-in-sap-script/m-p/1460552#M217419</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jun 2006 06:29:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-16T06:29:45Z</dc:date>
    <item>
      <title>Justify in SAP Script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/justify-in-sap-script/m-p/1460551#M217418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAPers,&lt;/P&gt;&lt;P&gt;   Is there any command for justifying the text in SAP script(&amp;lt;b&amp;gt;not&amp;lt;/b&amp;gt; left or right justify).&amp;lt;b&amp;gt;Similar to justify option available in word.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 06:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/justify-in-sap-script/m-p/1460551#M217418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-16T06:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Justify in SAP Script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/justify-in-sap-script/m-p/1460552#M217419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 06:29:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/justify-in-sap-script/m-p/1460552#M217419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-16T06:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Justify in SAP Script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/justify-in-sap-script/m-p/1460553#M217420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No there is not any such option available in Sapscript&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mukesh Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 06:31:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/justify-in-sap-script/m-p/1460553#M217420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-16T06:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Justify in SAP Script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/justify-in-sap-script/m-p/1460554#M217421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no justify command in SAP Scripts. Think this  document may help you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SapScript&lt;/P&gt;&lt;P&gt;Transaction codes:&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	SapScript font maintenance&lt;/P&gt;&lt;P&gt;SO10	Create standard text module&lt;/P&gt;&lt;P&gt;Contents&lt;/P&gt;&lt;P&gt;Symbols and Control commands&lt;/P&gt;&lt;P&gt;Frames, Lines and Shading&lt;/P&gt;&lt;P&gt;Calling ABAP subroutines&lt;/P&gt;&lt;P&gt;The Print Program&lt;/P&gt;&lt;P&gt;Styles&lt;/P&gt;&lt;P&gt;Modifications&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Symbols and Control commands&lt;/P&gt;&lt;P&gt;Symbols are placeholders for values that are inserted during print formatting.&lt;/P&gt;&lt;P&gt;Symbols are identified by name surrounded by "&amp;amp;" and are not case sensitive&lt;/P&gt;&lt;P&gt;·	Types of symbols &lt;/P&gt;&lt;P&gt;·	Formatting &lt;/P&gt;&lt;P&gt;·	Control commands &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Types of symbols&lt;/P&gt;&lt;P&gt;System symbols&lt;/P&gt;&lt;P&gt;DATE	Date&lt;/P&gt;&lt;P&gt;DAY	Day&lt;/P&gt;&lt;P&gt;NAME_OF_DAY	Name of day&lt;/P&gt;&lt;P&gt;MONTH	Month&lt;/P&gt;&lt;P&gt;YEAR	Year&lt;/P&gt;&lt;P&gt;TIME	Time&lt;/P&gt;&lt;P&gt;HOURS	Hours&lt;/P&gt;&lt;P&gt;MINUTES	Minutes&lt;/P&gt;&lt;P&gt;SECONDS	Seconds&lt;/P&gt;&lt;P&gt;PAGE	Page number&lt;/P&gt;&lt;P&gt;NEXTPAGE	Number of next pagre&lt;/P&gt;&lt;P&gt;DEVICE	Output device&lt;/P&gt;&lt;P&gt;SPACE	Blank space&lt;/P&gt;&lt;P&gt;ULINE	Underline&lt;/P&gt;&lt;P&gt;VLINE	Vertical line&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Standard symbols&lt;/P&gt;&lt;P&gt;Standard symbols are user defined and are maintained in table TTDG. You use transaction SM30 to change or display standard symbols.&lt;/P&gt;&lt;P&gt;An examples of standard symbols is &amp;amp;MFG&amp;amp; fot "Yours faithfully"&lt;/P&gt;&lt;P&gt;Standard text&lt;/P&gt;&lt;P&gt;Standard texts is predifined texts that can be used in more than one form. Standard texts are can be created, changed and displayed using transaction SO10.&lt;/P&gt;&lt;P&gt;The text ID is used to classify texts.&lt;/P&gt;&lt;P&gt;To include a standard text in a form, use the INCLUDE command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVD&lt;/P&gt;&lt;P&gt;When formatting the standard text the PARAGRAPH parameter is used. To center the text use:&lt;/P&gt;&lt;P&gt;/: INCLUDE  &lt;/P&gt;&lt;P&gt;Parameters:&lt;/P&gt;&lt;P&gt;OBJECT	E.g. TEXT, DOKU (Document), DSYS (Hypertext).&lt;/P&gt;&lt;P&gt;ID	Text ID -Text ID is a way to group texts - Se transaction SO10&lt;/P&gt;&lt;P&gt;LANGUAGE	If the parameter is not specefied, the logon language will be used&lt;/P&gt;&lt;P&gt;PARAGRAPH	The text to be included is formatted using the style allocated. The PARAGRAPH parameter can be used to redefine the standard paragraph for this style for the current call. All *-paragraphs in the included text will then be formatted using the paragraph specified here.&lt;/P&gt;&lt;P&gt;·	Object &lt;/P&gt;&lt;P&gt;·	ID &lt;/P&gt;&lt;P&gt;·	Language &lt;/P&gt;&lt;P&gt;·	Paragraph &lt;/P&gt;&lt;P&gt;Standard texts are maintained in transaction SO10.&lt;/P&gt;&lt;P&gt;Example 1:&lt;/P&gt;&lt;P&gt;You have created a standard text in SO10 Named MYTEXT and with Text Id ST&lt;/P&gt;&lt;P&gt;/: INCLUDE MYTEXT OBJECT text ID st&lt;/P&gt;&lt;P&gt;Example 2:&lt;/P&gt;&lt;P&gt;You can also use a dynamic name so that you can retreive a ext depeding of the name variable:&lt;/P&gt;&lt;P&gt;/: INCLUDE &amp;amp;SCUSTOM-NAME&amp;amp; text ID st.&lt;/P&gt;&lt;P&gt;Depending on the name in the variable &amp;amp;SCUSTOM-NAME&amp;amp; different texts will be shown. Note that a text with the name in the variable &amp;amp;SCUSTOM-NAME&amp;amp; name must be created in SO10.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DEFINE&lt;/P&gt;&lt;P&gt;/: DEFINE &amp;amp;SYMBOL&amp;amp; = 'String1 String2'&lt;/P&gt;&lt;P&gt;/: DEFINE &amp;amp;CUST&amp;amp; = '00000021'.&lt;/P&gt;&lt;P&gt;ADDRESS-ENDDRESS&lt;/P&gt;&lt;P&gt;The ADDRESS-ENDADDRESS command formats addresses according to the postal norms of the recipient's country, as defined in the&lt;/P&gt;&lt;P&gt;country parameter.&lt;/P&gt;&lt;P&gt;/: ADDRESS DELIVERY PARAGRAPH AD&lt;/P&gt;&lt;P&gt;/: NAME &amp;amp;KNA1-NAME&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;Time Date and decimal format&lt;/P&gt;&lt;P&gt;Examples:&lt;/P&gt;&lt;P&gt;/: SET TIME MASK = 'HH:MM'&lt;/P&gt;&lt;P&gt;/: SET DATE MASK = 'DD.MMMM.YYYY'&lt;/P&gt;&lt;P&gt;/: SET COUNTRY 'USA'&lt;/P&gt;&lt;P&gt;PROTECT-ENDPROTECT&lt;/P&gt;&lt;P&gt;Is used to avoid pagebreaks in a paragraph. The text lines to be protected are enclosed between the two commands. If there is not enough room on the page, the PROTECT command acts as a NEW-PAGE command and inserts a page break.&lt;/P&gt;&lt;P&gt;/: PROTECT &lt;/P&gt;&lt;P&gt;: &lt;/P&gt;&lt;P&gt;: &lt;/P&gt;&lt;P&gt;/: ENDPROTECT&lt;/P&gt;&lt;P&gt;5. Conditonal text ouput IF - ENDIF and CASE - ENDCASE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use IF/ENDIF and CASE/ENDCASE like in a normal ABAP program&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: IF &amp;amp;SPFLI-CITYTO&amp;amp; = "BERLIN"&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;..... put some text here&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;/: ENDIF&lt;/P&gt;&lt;P&gt;/: CASE &lt;/P&gt;&lt;P&gt;The intensity is the grey scale of the box as %. The frame parameters is the thickness of the frame. Default is 0.&lt;/P&gt;&lt;P&gt;Each of the paramteters ypos, xpos, width, height and frame muts be followed of the measurement unit:&lt;/P&gt;&lt;P&gt;·	TW (twip) &lt;/P&gt;&lt;P&gt;·	PT (point) &lt;/P&gt;&lt;P&gt;·	IN (inch) &lt;/P&gt;&lt;P&gt;·	MM (millimeter) &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;Examples:&lt;/P&gt;&lt;P&gt;/: BOX XPOS '11.21' MM YPOS '5.31' MM HEIGHT '10' MM WIDTH '20' MM INTENSITY 10 FRAME 0 TW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: BOX FRAME 10 TW &lt;/P&gt;&lt;P&gt;Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: BOX INTENSITY 10 &lt;/P&gt;&lt;P&gt;Fills the window background with shading having a gray scale of 10 %.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: BOX HEIGHT 0 TW FRAME 10 TW &lt;/P&gt;&lt;P&gt;Draws a horizontal line across the complete top edge of the window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: BOX WIDTH 0 TW FRAME 10 TW &lt;/P&gt;&lt;P&gt;Draws a vertical line along the complete height of the left hand edge of the window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15 &lt;/P&gt;&lt;P&gt;/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW &lt;/P&gt;&lt;P&gt;/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW &lt;/P&gt;&lt;P&gt;/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW &lt;/P&gt;&lt;P&gt;Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;POSITION and SIZE&lt;/P&gt;&lt;P&gt;You can use the POSITION and SIZE commands to set default parmeters for a box. This can be usefull if you have several boxes that share the same parameters.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;/: POSITION XORIGIN '11.21' YORIGIN '5.31' MM&lt;/P&gt;&lt;P&gt;/: SIZE HEIGHT '2' MM WIDTH '76' MM&lt;/P&gt;&lt;P&gt;/: BOX FRAME 10 TW INTENSITY 10&lt;/P&gt;&lt;P&gt;If you want to set the position realtively to the window use POSITION WINDOW to set the position to the top/left start of the window. Then use POSITION to set the current position relatively to the start of the Window. Note that &lt;/P&gt;&lt;P&gt;you uses "+" or "-" in the ORIGIN position to the set the position relatively.&lt;/P&gt;&lt;P&gt;/: POSITION WINDOW&lt;/P&gt;&lt;P&gt;/: POSITION XORIGIN '&lt;EM&gt;5' MM YORIGIN '&lt;/EM&gt;10' MM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the position is now 5 MM from the left and 10 MM from the top of the window. &lt;/P&gt;&lt;P&gt;NOTE: After using the position command you can move the current position realtively to the last used position &lt;/P&gt;&lt;P&gt;/: POSITION XORIGIN '&lt;EM&gt;10' MM YORIGIN '&lt;/EM&gt;20' MM&lt;/P&gt;&lt;P&gt;Now the position will be X = 15 and Y = 30&lt;/P&gt;&lt;P&gt;More examples:&lt;/P&gt;&lt;P&gt;/: POSITION WINDOW &lt;/P&gt;&lt;P&gt;Sets the origin for the coordinate system to the upper left corner of the window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: POSITION XORIGIN 2 CM YORIGIN '2.5 CM' &lt;/P&gt;&lt;P&gt;Sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm from the upper edge of the output page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM &lt;/P&gt;&lt;P&gt;Shifts the origin for the coordinates 1.5 cm to the left and 1 cm up.&lt;/P&gt;&lt;P&gt;Drawing a line&lt;/P&gt;&lt;P&gt;You can draw a line by setting the Height or Width of a box to 0 and add a frame. E.g. a horizontal line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: SIZE HEIGHT '0' MM WIDTH '200' MM&lt;/P&gt;&lt;P&gt;/: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Window and Page&lt;/P&gt;&lt;P&gt;WINDOW sets the values for the width and height to the values of the current window (default setting).&lt;/P&gt;&lt;P&gt;PAGE Sets the values for the width and height to the values of the current output page.&lt;/P&gt;&lt;P&gt;Examples:&lt;/P&gt;&lt;P&gt;/: SIZE WINDOW&lt;/P&gt;&lt;P&gt;Sets WIDTH and HEIGHT to the current window dimensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM&lt;/P&gt;&lt;P&gt;Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: POSITION WINDOW &lt;/P&gt;&lt;P&gt;/: POSITION XORIGIN -20 TW YORIGIN -20 TW &lt;/P&gt;&lt;P&gt;/: SIZE WIDTH +40 TW HEIGHT +40 TW &lt;/P&gt;&lt;P&gt;/: BOX FRAME 10 TW &lt;/P&gt;&lt;P&gt;A frame is added to the current window. The edges of the frame extend beyond the edges of the window itself, so as to avoid obscuring the leading and trailing text characters.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Calling ABAP subroutines&lt;/P&gt;&lt;P&gt;Back to SapScript menu&lt;/P&gt;&lt;P&gt;You can call an ABAP subroutine from SapScript using the PERFORM statment. You can use this to get data without havning to cnahge the print program. In the examole below NAME is retreived from table SCUSTOM.&lt;/P&gt;&lt;P&gt;SapScript&lt;/P&gt;&lt;P&gt;/:DEFINE &amp;amp;CUST&amp;amp; = '00000021'.&lt;/P&gt;&lt;P&gt;/:PERFORM GET_NAME IN PROGRAM Z_BC460_EX4_HF&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;CUST&amp;amp;&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;NAME&amp;amp;&lt;/P&gt;&lt;P&gt;/:ENDPERFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dear &amp;amp;NAME&amp;amp;&lt;/P&gt;&lt;P&gt;The ABAP routine&lt;/P&gt;&lt;P&gt;The ABAP routine could be defined as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTANT: The structure itcsy must be used for the parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT Z_HENRIKF_SCRIPT_FORM .&lt;/P&gt;&lt;P&gt;TABLES scustom.&lt;/P&gt;&lt;P&gt;FORM get_name tables in_tab structure itcsy out_tab structure itcsy.&lt;/P&gt;&lt;P&gt;  read table in_tab index 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select single * from scustom&lt;/P&gt;&lt;P&gt;    where id = in_tab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    read table out_tab index 1.&lt;/P&gt;&lt;P&gt;    move scustom-name to out_tab-value.&lt;/P&gt;&lt;P&gt;    modify out_tab index sy-tabix.&lt;/P&gt;&lt;P&gt; else.&lt;/P&gt;&lt;P&gt;   read table out_tab index 1.&lt;/P&gt;&lt;P&gt;   move 'No name' to out_tab-value.&lt;/P&gt;&lt;P&gt;   modify out_tab index sy-tabix.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;You could also fill the ouput parameter table this way&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;READ TABLE out_par WITH KEY 'NAME1'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;out_par-value = l_name1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MODIFY out_par INDEX sy-tabix.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that if you use more than one parameter you must use Using or Changing before every parameter !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/: PERFORM &lt;/P&gt;&lt;P&gt;/: USING &amp;amp;INVAR1&amp;amp;&lt;/P&gt;&lt;P&gt;/: USING &amp;amp;INVAR2&amp;amp;&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;OUTVAR1&amp;amp;&lt;/P&gt;&lt;P&gt;/: CHANGING &amp;amp;OUTVAR2&amp;amp;&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;/: ENDPERFORM&lt;/P&gt;&lt;P&gt;The Print Program&lt;/P&gt;&lt;P&gt;Back to SapScript menu&lt;/P&gt;&lt;P&gt;Structure of a print program&lt;/P&gt;&lt;P&gt;OPEN_FORM function&lt;/P&gt;&lt;P&gt;CLOSE_FORM function&lt;/P&gt;&lt;P&gt;WRITE_FORM&lt;/P&gt;&lt;P&gt;START_FORM function&lt;/P&gt;&lt;P&gt;END_FORM function&lt;/P&gt;&lt;P&gt;CONTROL_FORM function&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The print program is used to print forms. The program retieves the necesary data from datbase tables, defines the order of in which text elements are printed, chooses a form for printing and selects an output device and print options. &lt;/P&gt;&lt;P&gt;Function modules in a printprogram:&lt;/P&gt;&lt;P&gt;·	When you print a form you must used the staments OPEN_FORM and CLOSE_FORM. To combine forms into a single spool request use START_FORM and END_FORM. &lt;/P&gt;&lt;P&gt;·	To print textelements in a form use WRITE_FORM. The order in which the textelements are printed, is determined by the order of the WRITE_FORM statements. Note: for printing lines in the body, you can also use the WRITE_FORM_LINES function module. &lt;/P&gt;&lt;P&gt;·	To transfer control command to a form use CONTROL_FORM. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Structure of a print program&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Tables: xxx.&lt;/P&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;FROM xxx.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Open form printing - Must be called before working with any of the other form function modules.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Must be ended with function module CLOSE FORM &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'OPEN_FORM'.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To begin several indentical forms containing different data within a single spool request, begin each form using START_FORM, and end it using END_FORM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call funtion 'START_FORM'.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Write text elements to a window of the form&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'WRITE_FORM'.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Ends spool request started with START_FORM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call funtion 'END_FORM'.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Closes form printing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'CLOSE_FORM'...&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;OPEN_FORM function&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'OPEN_FORM'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  APPLICATION                       = 'TX'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_INDEX                     =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_PARAMS                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DEVICE                            = 'PRINTER'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DIALOG                            = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FORM                              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LANGUAGE                          = SY-LANGU&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OPTIONS                           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MAIL_SENDER                       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MAIL_RECIPIENT                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MAIL_APPL_OBJECT                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RAW_DATA_INTERFACE                = '*'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LANGUAGE                          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NEW_ARCHIVE_PARAMS                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RESULT                            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CANCELED                          = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DEVICE                            = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FORM                              = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OPTIONS                           = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNCLOSED                          = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MAIL_OPTIONS                      = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_ERROR                     = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INVALID_FAX_NUMBER                = 8&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MORE_PARAMS_NEEDED_IN_BATCH       = 9&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SPOOL_ERROR                       = 10&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                            = 11&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;Some important parameters:&lt;/P&gt;&lt;P&gt;FORM	Name of the form&lt;/P&gt;&lt;P&gt;DEVICE	·	PRINTER : Print output using spool ·	TELEFAX: Fax output ·	SCREEN: Output to screen &lt;/P&gt;&lt;P&gt;OPTIONS	Used to control attrubutes for printing or faxing (Number of copies, immediate output....The input for the parameter is structure ITCPO.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CLOSE_FORM function&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FORM'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RESULT                         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RDI_RESULT                     =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTFDATA                        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNOPENED                       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BAD_PAGEFORMAT_FOR_PRINT       = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SEND_ERROR                     = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SPOOL_ERROR                    = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                         = 5&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;Paramerters:&lt;/P&gt;&lt;P&gt;RESULT	Returns status information and print/fax parameters after the form has been printed. RESULT is of structure ITCPP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;WRITE_FORM function&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ELEMENT                        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FUNCTION                       = 'SET'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TYPE                           = 'BODY'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WINDOW                         = 'MAIN'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PENDING_LINES                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ELEMENT                        = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FUNCTION                       = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TYPE                           = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNOPENED                       = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNSTARTED                      = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WINDOW                         = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BAD_PAGEFORMAT_FOR_PRINT       = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SPOOL_ERROR                    = 8&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                         = 9&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;Some important parameters:&lt;/P&gt;&lt;P&gt;ELEMENT	Specifies which textelement is printed&lt;/P&gt;&lt;P&gt;WINDOW	Specifies which window is printed&lt;/P&gt;&lt;P&gt;TYPE	Specifies the output area of the main window. This can be:·	TOP - Used for headers ·	BODY ·	BOTTOM - Used for footers &lt;/P&gt;&lt;P&gt;FUNCTION	Specifies whether text is to be appended, replaced or added&lt;/P&gt;&lt;P&gt;Example of how to use the WRITE_FORM function module together with a script.&lt;/P&gt;&lt;P&gt;Form layout of the MAIN window&lt;/P&gt;&lt;P&gt;/E INTRODUCTION&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Dear Customer&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;...........................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/E ITEM_HEADER&lt;/P&gt;&lt;P&gt;IH Carrier, Departure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/E ITEM_LINE&lt;/P&gt;&lt;P&gt;IL &amp;amp;SBOOK-CARRID&amp;amp;, &amp;amp;SPFLI-DEPTIME&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/E CLOSING_REMARK&lt;/P&gt;&lt;P&gt;The print program&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Writing INTRODUCTION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          ELEMENT                  = 'INTRODUCTION'&lt;/P&gt;&lt;P&gt;          FUNCTION                 = 'SET'&lt;/P&gt;&lt;P&gt;          TYPE                     = 'BODY'&lt;/P&gt;&lt;P&gt;          WINDOW                   = 'MAIN'&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;         OTHERS                   = 8&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Writing ITEM_HEADER&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          ELEMENT                  = 'ITEM_HEADER'&lt;/P&gt;&lt;P&gt;          FUNCTION                 = 'SET'&lt;/P&gt;&lt;P&gt;          TYPE                     = 'BODY'&lt;/P&gt;&lt;P&gt;          WINDOW                   = 'MAIN'&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;         OTHERS                   = 8&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set ITEM_HEADER into TOP area of main window for subsequent pages&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          ELEMENT                  = 'ITEM_HEADER'&lt;/P&gt;&lt;P&gt;          FUNCTION                 = 'SET'&lt;/P&gt;&lt;P&gt;          TYPE                     = 'TOP'&lt;/P&gt;&lt;P&gt;          WINDOW                   = 'MAIN'&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;         OTHERS                   = 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Write ITEM_LINE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT .....&lt;/P&gt;&lt;P&gt;   CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;             ELEMENT               = 'ITEM_LINE'&lt;/P&gt;&lt;P&gt;             FUNCTION              = 'SET'&lt;/P&gt;&lt;P&gt;             TYPE                  = 'BODY'&lt;/P&gt;&lt;P&gt;             WINDOW                = 'MAIN'&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            OTHERS                 = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Delete ITEM_HEADER from TOP area of main window&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          ELEMENT                  = 'ITEM_HEADER'&lt;/P&gt;&lt;P&gt;          FUNCTION                 = 'DELETE'&lt;/P&gt;&lt;P&gt;          TYPE                     = 'TOP'&lt;/P&gt;&lt;P&gt;          WINDOW                   = 'MAIN'&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;         OTHERS                    = 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Print CLOSING_REMARK&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          ELEMENT                  = 'CLOSING_REMARK'&lt;/P&gt;&lt;P&gt;          FUNCTION                 = 'SET'&lt;/P&gt;&lt;P&gt;          TYPE                          = 'BODY'&lt;/P&gt;&lt;P&gt;          WINDOW                   = 'MAIN'&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;         OTHERS                    = 8&lt;/P&gt;&lt;P&gt;START_FORM function&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'START_FORM'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ARCHIVE_INDEX          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FORM                   = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LANGUAGE               = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STARTPAGE              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROGRAM                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MAIL_APPL_OBJECT       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LANGUAGE               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FORM                   = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FORMAT                 = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNENDED                = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNOPENED               = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNUSED                 = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SPOOL_ERROR            = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                 = 7&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;END_FORM function&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'END_FORM'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RESULT                         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNOPENED                       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BAD_PAGEFORMAT_FOR_PRINT       = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SPOOL_ERROR                    = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                         = 4&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CONTROL_FORM function&lt;/P&gt;&lt;P&gt;The CONTROL_FORM function module allows you to create SapScript control statements from within an APAB program.&lt;/P&gt;&lt;P&gt;Syntax:&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNOPENED        = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNSTARTED       = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS          = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Protecting the text element ITEM_LINE&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONTROL_FORM'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    COMMAND = 'PROTECT'.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    TEXELEMENT = 'ITEM_LINE'.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONTROL_FORM'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    COMMAND = 'ENDPROTECT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Styles&lt;/P&gt;&lt;P&gt;Styles are used to predefine paragraph and character formats for forms. SAP provides several standard styles e.g. for Address includes, on-line documentation and so on. You can define your own styles.&lt;/P&gt;&lt;P&gt;To find styles, create styles and maintainse styles, use transaction SE72.&lt;/P&gt;&lt;P&gt;You assign style to a text by using menu Format -&amp;gt; Style&lt;/P&gt;&lt;P&gt;You can make temporary style changes using the control command /: STYLE&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Modifications&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Considerations in connection with modifications&lt;/P&gt;&lt;P&gt;The standard SAP print program should only be changed when it is absolutely necessary. If additional data is needed, these can in many cases be retrieved using a a PERFORM statement in the form instead of changing the print program..&lt;/P&gt;&lt;P&gt;There can be the following reasons to change the print program:&lt;/P&gt;&lt;P&gt;·	Structureal changes &lt;/P&gt;&lt;P&gt;·	New text eloements are needed &lt;/P&gt;&lt;P&gt;·	Print program to be used to print additional forms &lt;/P&gt;&lt;P&gt;Determine/change which forms and printprograms that are used for printing&lt;/P&gt;&lt;P&gt;The forms and print programs for a given output type and application can be found in table TNAPR Processing programs for output&lt;/P&gt;&lt;P&gt;Use view V_TNAPR in (Transaction SE30) to change entries.&lt;/P&gt;&lt;P&gt;Graphics on SAPScript &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program RSTXLDMC can be used to upload graphics (file extension .tif on PC files) into individual standard text. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Helpful reports &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RSCLTCOP	Copy tables across clients &lt;/P&gt;&lt;P&gt;RSAVGL00	Table adjustment across clients &lt;/P&gt;&lt;P&gt;RSINCL00	Extended program list &lt;/P&gt;&lt;P&gt;RSBDCSUB	Release batch-input sessions automatically &lt;/P&gt;&lt;P&gt;RSTXSCRP	Transport SAPScript files across systems &lt;/P&gt;&lt;P&gt;RSORAREL	Get the Oracle Release &lt;/P&gt;&lt;P&gt;RGUGBR00	Substitution/Validation utility &lt;/P&gt;&lt;P&gt;RSPARAM	Display all instance parameters &lt;/P&gt;&lt;P&gt;RSUSR003	Check the passwords of users SAP* and DDIC in all clients &lt;/P&gt;&lt;P&gt;RSUSR006	List users last login&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 06:51:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/justify-in-sap-script/m-p/1460554#M217421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-16T06:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Justify in SAP Script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/justify-in-sap-script/m-p/1460555#M217422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sapient &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no its not possible &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kiran.M&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: kiran machavarapu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2006 06:54:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/justify-in-sap-script/m-p/1460555#M217422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-16T06:54:14Z</dc:date>
    </item>
  </channel>
</rss>

