<?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: sap scripts in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479683#M836480</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;SAPSCRIPTS:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------" /&gt;&lt;P&gt;This is a tool used to redirect SAP data to output devices. SE71 is the Tcode &lt;/P&gt;&lt;P&gt;to create SAPScript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Components of a SAPScript tool are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. BASIC SETTINGS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paragraph format, character format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ADMINISTRATIVE SETTINGS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name of the form, short description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Layout is used to create a form in SAPScript. Layout is a collection of pages.&lt;/P&gt;&lt;P&gt; Page is a collection of Windows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types of Windows:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------" /&gt;&lt;P&gt;1. Main Window - This is a common window for all pages. This is a default window.&lt;/P&gt;&lt;P&gt;2. Constant Window - This window is used to create footer space, header space for a particular page.&lt;/P&gt;&lt;P&gt;3. Variable Window - This is a subwindow.&lt;/P&gt;&lt;P&gt;4. Graphical Window - This is an optional window, which is used to create logos or some other graphics for the page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAVIGATIONS FOR CREATING A SAPSCRIPT:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;SE71 -&amp;gt; Specify Form name starting with Z or Y (ZSHABFORM) -&amp;gt; Click on Create -&amp;gt; Opens an interface -&amp;gt; Enter short description -&amp;gt; Click on 'Paragraph Format' from Appn. toolbar -&amp;gt; Specify Paragraph Name (P1)-&amp;gt; Press Enter -&amp;gt; Enter short description -&amp;gt; Click on 'Definitions' pushbutton from application toolbar -&amp;gt; Specify Default Paragraph (P1) created -&amp;gt; Click on Layout pushbutton from appn. toolbar -&amp;gt; Opens a layout with a default window 'MAIN' -&amp;gt; Right click on Main Window -&amp;gt; Select 'Edit Text' -&amp;gt; Opens a Line Editor -&amp;gt; Specify a statement -&amp;gt; Come back -&amp;gt; Save -&amp;gt; Activate the form -&amp;gt; A SAPscript is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To invoke the form created, we have to create a print program. Create an Executable Program&lt;/P&gt;&lt;P&gt; and specify the following:&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;   FORM                              = 'ZSHABFORM'&lt;/P&gt;&lt;P&gt;   LANGUAGE                          = SY-LANGU.&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                        = 'ELEMENT'&lt;/P&gt;&lt;P&gt;   WINDOW                         = 'MAIN'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FORM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Save -&amp;gt; Activate -&amp;gt; Execute -&amp;gt; Opens an interface -&amp;gt; Specify output device as LP01 -&amp;gt; Click on Print Preview (F8) pushbutton -&amp;gt; Executes the form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM 'OPEN_FORM' is used to call the sapscript form. Here, we have to specify the name of the form as an argument.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'WRITE_FORM' is used to specify the name of the text elements and window types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'CLOSE_FORM' is used to save and close the form attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function modules OPEN_FORM and CLOSE_FORM are mandatory ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PASSING ARGUMENTS TO THE FORM:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Line editor, specify an argument enclosed by an ampersand symbol (&amp;amp;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg. &amp;amp;KARTHIK&amp;amp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate the form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To pass a value from the print program to the form, declare the variable as follows in Print PRogram:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA KARTHIK(10) VALUE 'CHENNAI'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....OPEN_FORM&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;....CLOSE_FORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate -&amp;gt; Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PASSING TABLE VALUES AS AN ARGUMENT TO SAPSCRIPT:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the line editor, specify the table field arguments enclosed by '&amp;amp;' symbol as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/E  ELEMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &amp;amp;KNA1-KUNNR&amp;amp; ,, &amp;amp;KNA1-NAME1&amp;amp; ,, &amp;amp;KNA1-LAND1&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Print Program, specify following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES KNA1.&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;   FORM                              = 'ZSHABFORM1'&lt;/P&gt;&lt;P&gt;   LANGUAGE                          = SY-LANGU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM KNA1.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   ELEMENT                        = 'ELEMENT'&lt;/P&gt;&lt;P&gt;   WINDOW                         = 'MAIN'.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FORM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate -&amp;gt; Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PASSING INTERNAL TABLE AS AN ARGUMENT TO THE FORM:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In line editor, specify following arguments:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/E ELEMENT&lt;/P&gt;&lt;P&gt;    &amp;amp;ITAB-KUNNR&amp;amp;        &amp;amp;ITAB-NAME1&amp;amp;        &amp;amp;ITAB-LAND1&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Print Program, specify following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA ITAB LIKE KNA1 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM KNA1 INTO TABLE ITAB.&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;   FORM                              = 'ZSHABFORM1'&lt;/P&gt;&lt;P&gt;   LANGUAGE                          = SY-LANGU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   ELEMENT                        = 'ELEMENT'&lt;/P&gt;&lt;P&gt;   WINDOW                         = 'MAIN'.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FORM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Save -&amp;gt; Activate -&amp;gt; Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADDING IMAGES TO THE FORM:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a .bmp file and save it in a directory &lt;/P&gt;&lt;P&gt;-&amp;gt; Goto SE78 Tcode -&amp;gt; Double click BMAP Bitmap images &lt;/P&gt;&lt;P&gt;-&amp;gt; Click on Import icon from appn. toolbar -&amp;gt; Opens an interface &lt;/P&gt;&lt;P&gt;-&amp;gt; Specify the path of .bmp file from the OS &lt;/P&gt;&lt;P&gt;-&amp;gt; Specify the name for the image -&amp;gt; Select Color bitmap image radiobutton &lt;/P&gt;&lt;P&gt;-&amp;gt; Click on Continue -&amp;gt; Image is imported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To add the imported image into the form, right click on the form layout &lt;/P&gt;&lt;P&gt;-&amp;gt; Select Create Graphic -&amp;gt; Opens an interface &lt;/P&gt;&lt;P&gt;-&amp;gt; Select image from the form directory &lt;/P&gt;&lt;P&gt;-&amp;gt; Select Color bitmap image radiobutton &lt;/P&gt;&lt;P&gt;-&amp;gt; Specify resolution as 100 -&amp;gt; Continue &lt;/P&gt;&lt;P&gt;-&amp;gt; An image is added to the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simply call the form from the print program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To upload .TIFF files into the SAPscript directory, make use of a predefined executable program called as RSTXLDMC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SE38 Tcode, specify the above name, click on execute pushbutton from application toolbar -&amp;gt; Opens an interface -&amp;gt; Specify the file path -&amp;gt; Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Text Elements in the line editor are used to avoid data duplication.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Mar 2008 09:47:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-12T09:47:48Z</dc:date>
    <item>
      <title>sap scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479678#M836475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone help to knw how to do sap scripts..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;step by step&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 09:15:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479678#M836475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-12T09:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: sap scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479679#M836476</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;see links here u an find good example also.&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.sap-img.com/sapscripts/a-sample-sap-scripts-reports.htm" target="test_blank"&gt;http://www.sap-img.com/sapscripts/a-sample-sap-scripts-reports.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 09:17:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479679#M836476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-12T09:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: sap scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479680#M836477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Good ...Check out the following links - important&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP Scripts&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=1811669&amp;amp;messageID=2969311" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=1811669&amp;amp;messageID=2969311&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=1811669&amp;amp;messageID=2902391" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=1811669&amp;amp;messageID=2902391&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=1811669&amp;amp;messageID=3205653" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=1811669&amp;amp;messageID=3205653&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=1811669&amp;amp;messageID=3111402" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=1811669&amp;amp;messageID=3111402&lt;/A&gt;&lt;/P&gt;&lt;P&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://sappoint.com/abap/" target="test_blank"&gt;http://sappoint.com/abap/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm" target="test_blank"&gt;http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_crm40/helpdata/en/16/c832857cc111d686e0000086568e5f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_crm40/helpdata/en/16/c832857cc111d686e0000086568e5f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-basis-abap.com/sapabap01.htm" target="test_blank"&gt;http://www.sap-basis-abap.com/sapabap01.htm&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://searchsap.techtarget.com/tip/1,289483,sid21_gci943419,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/tip/1,289483,sid21_gci943419,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.ittoolbox.com/topics/t.asp?t=303&amp;amp;p=452&amp;amp;h2=452&amp;amp;h1=303" target="test_blank"&gt;http://sap.ittoolbox.com/topics/t.asp?t=303&amp;amp;p=452&amp;amp;h2=452&amp;amp;h1=303&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/phpBB2/viewtopic.php?t=14007&amp;amp;sid=09eec5147a0dbeee1b5edd21af8ebc6a" target="test_blank"&gt;http://www.sapgenie.com/phpBB2/viewtopic.php?t=14007&amp;amp;sid=09eec5147a0dbeee1b5edd21af8ebc6a&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;drawing lins, boxes and shadings&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_46c/helpdata/en/d1/802ec5454211d189710000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_46c/helpdata/en/d1/802ec5454211d189710000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2748630"&gt;&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.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;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 09:17:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479680#M836477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-12T09:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: sap scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479681#M836478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;go through these links.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/sapscripts/create-scripts-of-your-own-using-standard-scripts.htm" target="test_blank"&gt;http://www.sap-img.com/sapscripts/create-scripts-of-your-own-using-standard-scripts.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/sapscripts/a-sample-sap-scripts-reports.htm" target="test_blank"&gt;http://www.sap-img.com/sapscripts/a-sample-sap-scripts-reports.htm&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.sap-img.com/ts003.htm" target="test_blank"&gt;http://www.sap-img.com/ts003.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/sapscripts/faq-for-sap-scripts.htm" target="test_blank"&gt;http://www.sap-img.com/sapscripts/faq-for-sap-scripts.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 09:21:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479681#M836478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-12T09:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: sap scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479682#M836479</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;Language&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Language in which the data coming on to the layout set will be printed. Generally, this will be the language that has been set up as default in the SAP system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Header&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Section to define the various attributes of the layout set on a global level. Changing these attributes will affect all the components of the layout set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The various components of the header are explained below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Administration Information &lt;/P&gt;&lt;P&gt;This shows the information about the layout set &amp;#150; details of the designer, details of changes occurring to the design, development class of the layout set and the language details for the layout set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard Attributes &lt;/P&gt;&lt;P&gt;Description - Brief description or title of the layout set &lt;/P&gt;&lt;P&gt;Default paragraph - The base paragraph that is globally applicable to the document. This can be overridden at lower level of the layout set by using other paragraphs &lt;/P&gt;&lt;P&gt;Tab Stop - The base tab-stop that is globally applicable to the document. These can be overridden at lower level of the layout set by using other tab stops &lt;/P&gt;&lt;P&gt;First Page - The start page of the layout set &lt;/P&gt;&lt;P&gt;Page Format &lt;/P&gt;&lt;P&gt;Orientation - The direction of printing the data on a page &amp;#150; P for portrait (vertical) and L for landscape (horizontal) &lt;/P&gt;&lt;P&gt;Lines per inch &lt;/P&gt;&lt;P&gt;Characters/inch &lt;/P&gt;&lt;P&gt;Font Attributes &lt;/P&gt;&lt;P&gt;Here the various attributes and the base font applicable to the document can be defined. This font setting can be overridden at a lower level using the character strings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paragraphs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Used to define the start and end positions for the different texts and objects that need to be printed on the output document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Character Strings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Used to define the fonts and the formatting and printing styles for each and every character that needs to be printed on the output document. The start of the character string is indicated by &amp;lt;string name&amp;gt;, while the end of the character string is indicated by &amp;lt;/&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pages&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The designer needs to organise the template as a series of pages. When an actual output document is printed, it will refer to each page for putting the data coming from the ABAP program. The order of pages is also taken from the template i.e the layout set defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Windows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Various parts of the output document can be conveniently organised on the pages using windows. Thus the data stream coming from the ABAP program can be logically grouped into various parts and can be placed on different locations on a page&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 2 main types of windows that can be used in a layout set:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAIN - A layout set can have only one MAIN window which is created by default. This window can flow over multiple pages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANT - A layout set can have any number of constant windows. A constant window can be used once per page&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Text Elements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any text that needs to be written on the output document should be placed within a text element. This includes constant text as well as variable data like internal table data coming from the ABAP program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is advisable to group logically related data within one text element.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fields of various tables defined in the ABAP program will be included under these text elements. These fields are carriers of data. Every field should be included in a pair of &amp;amp; characters. (e.g. &amp;amp;aufk-aufnr&amp;amp;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Page Windows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The graphical element (like company logo) should be in valid graphic file format like .bmp or .jpg&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Use appropriate software to convert the above file into a .TIFF file&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Use report RSTXLDMC to upload this file as a text module in SAP&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Execute the above program from the ABAP /4 editor&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Enter the location of the .TIFF file on the PC&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Specify BMON or BCOL as the raster image type&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;The SAP system suggests a name for the file ( like ZHEX-MARCO-* ). The * indicates the type of file. For e.g. if the file contains a logo then the name can be ZHEX-MACRO-LOGO&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;The ID should be &amp;#145;ST&amp;#146; and give the logon language&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Running the program will convert this .TIFF file into a text element&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Incorporate this converted logo in the appropriate window under the appropriate text element by giving &lt;/P&gt;&lt;P&gt;INCLUDE ZHEX-MACRO-LOGO OBJECT TEXT ID ST in the first line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The graphical element (like company logo) should be in valid graphic file format like .bmp or .jpg&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Use appropriate software to convert the above file into a .TIFF file&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Use report RSTXLDMC to upload this file as a text module in SAP&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Execute the above program from the ABAP /4 editor&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Enter the location of the .TIFF file on the PC&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Specify BMON or BCOL as the raster image type&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;The SAP system suggests a name for the file ( like ZHEX-MARCO-* ). The * indicates the type of file. For e.g. if the file contains a logo then the name can be ZHEX-MACRO-LOGO&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;The ID should be &amp;#145;ST&amp;#146; and give the logon language&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Running the program will convert this .TIFF file into a text element&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Incorporate this converted logo in the appropriate window under the appropriate text element by giving &lt;/P&gt;&lt;P&gt;INCLUDE ZHEX-MACRO-LOGO OBJECT TEXT ID ST in the first line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope this helps, Do reward.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 09:25:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479682#M836479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-12T09:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: sap scripts</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479683#M836480</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;SAPSCRIPTS:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------" /&gt;&lt;P&gt;This is a tool used to redirect SAP data to output devices. SE71 is the Tcode &lt;/P&gt;&lt;P&gt;to create SAPScript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Components of a SAPScript tool are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. BASIC SETTINGS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paragraph format, character format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ADMINISTRATIVE SETTINGS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name of the form, short description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Layout is used to create a form in SAPScript. Layout is a collection of pages.&lt;/P&gt;&lt;P&gt; Page is a collection of Windows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Types of Windows:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------" /&gt;&lt;P&gt;1. Main Window - This is a common window for all pages. This is a default window.&lt;/P&gt;&lt;P&gt;2. Constant Window - This window is used to create footer space, header space for a particular page.&lt;/P&gt;&lt;P&gt;3. Variable Window - This is a subwindow.&lt;/P&gt;&lt;P&gt;4. Graphical Window - This is an optional window, which is used to create logos or some other graphics for the page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAVIGATIONS FOR CREATING A SAPSCRIPT:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;SE71 -&amp;gt; Specify Form name starting with Z or Y (ZSHABFORM) -&amp;gt; Click on Create -&amp;gt; Opens an interface -&amp;gt; Enter short description -&amp;gt; Click on 'Paragraph Format' from Appn. toolbar -&amp;gt; Specify Paragraph Name (P1)-&amp;gt; Press Enter -&amp;gt; Enter short description -&amp;gt; Click on 'Definitions' pushbutton from application toolbar -&amp;gt; Specify Default Paragraph (P1) created -&amp;gt; Click on Layout pushbutton from appn. toolbar -&amp;gt; Opens a layout with a default window 'MAIN' -&amp;gt; Right click on Main Window -&amp;gt; Select 'Edit Text' -&amp;gt; Opens a Line Editor -&amp;gt; Specify a statement -&amp;gt; Come back -&amp;gt; Save -&amp;gt; Activate the form -&amp;gt; A SAPscript is created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To invoke the form created, we have to create a print program. Create an Executable Program&lt;/P&gt;&lt;P&gt; and specify the following:&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;   FORM                              = 'ZSHABFORM'&lt;/P&gt;&lt;P&gt;   LANGUAGE                          = SY-LANGU.&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                        = 'ELEMENT'&lt;/P&gt;&lt;P&gt;   WINDOW                         = 'MAIN'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FORM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Save -&amp;gt; Activate -&amp;gt; Execute -&amp;gt; Opens an interface -&amp;gt; Specify output device as LP01 -&amp;gt; Click on Print Preview (F8) pushbutton -&amp;gt; Executes the form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FM 'OPEN_FORM' is used to call the sapscript form. Here, we have to specify the name of the form as an argument.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'WRITE_FORM' is used to specify the name of the text elements and window types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'CLOSE_FORM' is used to save and close the form attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function modules OPEN_FORM and CLOSE_FORM are mandatory ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PASSING ARGUMENTS TO THE FORM:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Line editor, specify an argument enclosed by an ampersand symbol (&amp;amp;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg. &amp;amp;KARTHIK&amp;amp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate the form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To pass a value from the print program to the form, declare the variable as follows in Print PRogram:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA KARTHIK(10) VALUE 'CHENNAI'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....OPEN_FORM&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;....CLOSE_FORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate -&amp;gt; Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PASSING TABLE VALUES AS AN ARGUMENT TO SAPSCRIPT:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the line editor, specify the table field arguments enclosed by '&amp;amp;' symbol as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/E  ELEMENT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &amp;amp;KNA1-KUNNR&amp;amp; ,, &amp;amp;KNA1-NAME1&amp;amp; ,, &amp;amp;KNA1-LAND1&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Print Program, specify following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES KNA1.&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;   FORM                              = 'ZSHABFORM1'&lt;/P&gt;&lt;P&gt;   LANGUAGE                          = SY-LANGU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM KNA1.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   ELEMENT                        = 'ELEMENT'&lt;/P&gt;&lt;P&gt;   WINDOW                         = 'MAIN'.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FORM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate -&amp;gt; Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PASSING INTERNAL TABLE AS AN ARGUMENT TO THE FORM:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In line editor, specify following arguments:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/E ELEMENT&lt;/P&gt;&lt;P&gt;    &amp;amp;ITAB-KUNNR&amp;amp;        &amp;amp;ITAB-NAME1&amp;amp;        &amp;amp;ITAB-LAND1&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save -&amp;gt; Activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Print Program, specify following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA ITAB LIKE KNA1 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM KNA1 INTO TABLE ITAB.&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;   FORM                              = 'ZSHABFORM1'&lt;/P&gt;&lt;P&gt;   LANGUAGE                          = SY-LANGU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;   ELEMENT                        = 'ELEMENT'&lt;/P&gt;&lt;P&gt;   WINDOW                         = 'MAIN'.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FORM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; Save -&amp;gt; Activate -&amp;gt; Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADDING IMAGES TO THE FORM:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a .bmp file and save it in a directory &lt;/P&gt;&lt;P&gt;-&amp;gt; Goto SE78 Tcode -&amp;gt; Double click BMAP Bitmap images &lt;/P&gt;&lt;P&gt;-&amp;gt; Click on Import icon from appn. toolbar -&amp;gt; Opens an interface &lt;/P&gt;&lt;P&gt;-&amp;gt; Specify the path of .bmp file from the OS &lt;/P&gt;&lt;P&gt;-&amp;gt; Specify the name for the image -&amp;gt; Select Color bitmap image radiobutton &lt;/P&gt;&lt;P&gt;-&amp;gt; Click on Continue -&amp;gt; Image is imported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To add the imported image into the form, right click on the form layout &lt;/P&gt;&lt;P&gt;-&amp;gt; Select Create Graphic -&amp;gt; Opens an interface &lt;/P&gt;&lt;P&gt;-&amp;gt; Select image from the form directory &lt;/P&gt;&lt;P&gt;-&amp;gt; Select Color bitmap image radiobutton &lt;/P&gt;&lt;P&gt;-&amp;gt; Specify resolution as 100 -&amp;gt; Continue &lt;/P&gt;&lt;P&gt;-&amp;gt; An image is added to the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simply call the form from the print program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To upload .TIFF files into the SAPscript directory, make use of a predefined executable program called as RSTXLDMC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SE38 Tcode, specify the above name, click on execute pushbutton from application toolbar -&amp;gt; Opens an interface -&amp;gt; Specify the file path -&amp;gt; Execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Text Elements in the line editor are used to avoid data duplication.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 09:47:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-scripts/m-p/3479683#M836480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-12T09:47:48Z</dc:date>
    </item>
  </channel>
</rss>

