<?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: more and more about scripts...... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384073#M529619</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;If I am giving like this in sap script text editor&lt;/P&gt;&lt;P&gt;if &amp;amp;page&amp;amp; = 5&lt;/P&gt;&lt;P&gt;&amp;lt;c1?&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;I am getting the barcode in the last page which is 5th.&lt;/P&gt;&lt;P&gt;If I am giving like this in sap script text editor&lt;/P&gt;&lt;P&gt;if &amp;amp;page&amp;amp; = &amp;amp;sapscript-formpages&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;lt;c1&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;I am not getting the barcode in the lastpage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where I am going wrong.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;K.Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jun 2007 08:30:47 GMT</pubDate>
    <dc:creator>kiran_k8</dc:creator>
    <dc:date>2007-06-06T08:30:47Z</dc:date>
    <item>
      <title>more and more about scripts......</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384069#M529615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.How to validate the no.of records that has to be printed per page I mean to say I just want to print only 10 records in the first page,if the records exceeds then it has to go to next page.?&lt;/P&gt;&lt;P&gt;2.I have a barcode which has to be displayed only at the last page,how?&lt;/P&gt;&lt;P&gt;3.I am using &amp;amp;sy-pagno&amp;amp; but it is not incrementing,it is showing page number as 0 on all the pages.How to correct this.&lt;/P&gt;&lt;P&gt;4.Can we give colors to the text in scripts?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;K.Kiran.&lt;/P&gt;&lt;P&gt;Note:- I will be posting many questions related to scripts under the same thread,so please do  consider.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:19:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384069#M529615</guid>
      <dc:creator>kiran_k8</dc:creator>
      <dc:date>2007-06-06T06:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: more and more about scripts......</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384070#M529616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;1.How to validate the no.of records that has to be printed per page I mean to say I just want to print only 10 records in the first page,if the records exceeds then it has to go to next page.?&lt;/P&gt;&lt;P&gt;Generally we see the print previews of the Document and see how many recoprds/items are printing correctly and we ADJUST THE SIZE OF THE WINDOW, as we can't not handle the no of records in internal table in script.&lt;/P&gt;&lt;P&gt;so based on the window size we restrict limit the print.and we use &lt;/P&gt;&lt;P&gt;PROTECT..ENDPROTECT to see that all the records related to a item is printed in that page itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.I have a barcode which has to be displayed only at the last page,how?&lt;/P&gt;&lt;P&gt;see the attached doc below(lastly)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.I am using &amp;amp;sy-pagno&amp;amp; but it is not incrementing,it is showing page number as 0 on all the pages.How to correct this.&lt;/P&gt;&lt;P&gt;Use the variable &amp;amp;PAGE&amp;amp; to print the page&lt;/P&gt;&lt;P&gt;&amp;amp;SAPSCRIPT-FORMPAGES&amp;amp; will give the total no of pages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.Can we give colors to the text in scripts?&lt;/P&gt;&lt;P&gt;NO colors, only you can change the FONT size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Barcode:&lt;/P&gt;&lt;P&gt;To Create a Bar code prefix:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Go to T-code - SPAD -&amp;gt; Full Administration -&amp;gt; Click on Device Type -&amp;gt; Double click the device for which you wish to create the print control -&amp;gt; Click on Print Control tab -&amp;gt;Click on change mode -&amp;gt; Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -&amp;gt; save you changes , it will ask for request -&amp;gt; create request and save&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The place where you are using the field value use like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;C1&amp;gt; &amp;amp;itab-field&amp;amp; &amp;lt;/C1&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will get the field value in the form of barcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which barcode printer are you using ? Can you download this file and see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.servopack.de/Files/HB/ZPLcommands.pdf" target="test_blank"&gt;http://www.servopack.de/Files/HB/ZPLcommands.pdf&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will give an idea about barcode commands.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm" target="test_blank"&gt;http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Detailed information about SAP Barcodes &lt;/P&gt;&lt;P&gt;A barcode solution consists of the following: &lt;/P&gt;&lt;P&gt;- a barcode printer &lt;/P&gt;&lt;P&gt;- a barcode reader &lt;/P&gt;&lt;P&gt;- a mobile data collection application/program &lt;/P&gt;&lt;P&gt;A barcode label is a special symbology to represent human readable information such as a material number or batch number &lt;/P&gt;&lt;P&gt;in machine readable format. &lt;/P&gt;&lt;P&gt;There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols. &lt;/P&gt;&lt;P&gt;You can print barcodes from SAP by modifying an existing output form. &lt;/P&gt;&lt;P&gt;Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool. &lt;/P&gt;&lt;P&gt;Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:25:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384070#M529616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T06:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: more and more about scripts......</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384071#M529617</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;Additional info to 1.&lt;/P&gt;&lt;P&gt;You can do a limitation to x records per page. Therefore you have to create a element in mainwindow containing the sapscript statement&lt;/P&gt;&lt;P&gt;/:  NEW-PAGE&lt;/P&gt;&lt;P&gt;In the loop over your records you call the newly created element if you reached the 10th record. Don't forget to initialize the counter afterwards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Timo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:48:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384071#M529617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T06:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: more and more about scripts......</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384072#M529618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a ton.&lt;/P&gt;&lt;P&gt;1.Page No and no.of records per page issue got solved.&lt;/P&gt;&lt;P&gt;2.I want to give index to the records like 1,2,3.... on every page,I used sy-tabix but didn't get the desired result.How to achieve this?&lt;/P&gt;&lt;P&gt;3.Bar code I am using aufnr which is sap defined.The PDF you had given is very handy.I have to go through in detail.I am getting the barcode in all the pages but I want it to be confined to only last page.How to do that.&lt;/P&gt;&lt;P&gt;4.If possible kindly let me know how to create a label in a script and its usage.&lt;/P&gt;&lt;P&gt;Once again thanks a ton.&lt;/P&gt;&lt;P&gt;K.Kiran.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Kiran K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 07:01:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384072#M529618</guid>
      <dc:creator>kiran_k8</dc:creator>
      <dc:date>2007-06-06T07:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: more and more about scripts......</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384073#M529619</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;If I am giving like this in sap script text editor&lt;/P&gt;&lt;P&gt;if &amp;amp;page&amp;amp; = 5&lt;/P&gt;&lt;P&gt;&amp;lt;c1?&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;I am getting the barcode in the last page which is 5th.&lt;/P&gt;&lt;P&gt;If I am giving like this in sap script text editor&lt;/P&gt;&lt;P&gt;if &amp;amp;page&amp;amp; = &amp;amp;sapscript-formpages&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;lt;c1&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;I am not getting the barcode in the lastpage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where I am going wrong.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;K.Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 08:30:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384073#M529619</guid>
      <dc:creator>kiran_k8</dc:creator>
      <dc:date>2007-06-06T08:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: more and more about scripts......</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384074#M529620</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;You want to print an index to every item and start at 1 again if a page break occurs? Then you should count up a variable in your loop an refresh it, if you force a page break.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately you can't use the variable &amp;amp;sapscript-formpages&amp;amp;. This variable is determined at the very end of the processing. So at the moment your last page is printed it is not available.&lt;/P&gt;&lt;P&gt;You have to count the remaining items in your loop.&lt;/P&gt;&lt;P&gt;If it is less or equal the number of entries on one page, you must switch to another page similar to the 4 pages before but where the barcode is defined.&lt;/P&gt;&lt;P&gt;So use NEW_PAGE BARC if your page with barcode defined is called BARC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Timo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2007 13:40:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384074#M529620</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-07T13:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: more and more about scripts......</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384075#M529621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem Solved.&lt;/P&gt;&lt;P&gt;Thanks a ton.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;K.Kiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jul 2007 05:38:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/more-and-more-about-scripts/m-p/2384075#M529621</guid>
      <dc:creator>kiran_k8</dc:creator>
      <dc:date>2007-07-24T05:38:18Z</dc:date>
    </item>
  </channel>
</rss>

