<?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: Problem in code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/1574854#M259548</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is witht the GF_COUNT Only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check that in debug mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful reward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Sep 2006 12:06:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-13T12:06:30Z</dc:date>
    <item>
      <title>Problem in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/1574853#M259547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;See the following pice of code.&lt;/P&gt;&lt;P&gt;The heading for main window is not displaying in all pages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt; Mian window is like this:&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;Empno   Empname      Sal&lt;/P&gt;&lt;P&gt;1           a1       5000&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;So heading Empno,Empname and Sal are not printing in all pages of main window .Can any body tell me What may be the problem in the following code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: BSEG,&lt;/P&gt;&lt;P&gt;BKPF,&lt;/P&gt;&lt;P&gt;BKORM,&lt;/P&gt;&lt;P&gt;SKAT.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; SELECT-OPTIONS&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: RBUKRS FOR BKORM-BUKRS,&lt;/P&gt;&lt;P&gt;RBELNR FOR BKORM-BELNR,&lt;/P&gt;&lt;P&gt;RGJAHR FOR BKORM-GJAHR.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA : T_BSEG LIKE BSEG OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : T_BKPF LIKE BKPF OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA : G_COUNT TYPE I.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;PERFORM GET_DATA.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Open print job&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'OPEN_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;DEVICE = 'PRINTER'&lt;/P&gt;&lt;P&gt;FORM = 'ZZ_FIGL_JOURNAL'&lt;/P&gt;&lt;P&gt;DIALOG = 'X'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;CANCELED = 1&lt;/P&gt;&lt;P&gt;DEVICE = 2&lt;/P&gt;&lt;P&gt;FORM = 3&lt;/P&gt;&lt;P&gt;OPTIONS = 4&lt;/P&gt;&lt;P&gt;UNCLOSED = 5&lt;/P&gt;&lt;P&gt;OTHERS = 6.&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;Display Main heading details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT T_BSEG.&lt;/P&gt;&lt;P&gt;G_COUNT = G_COUNT + 1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF G_COUNT = 1.&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'    *** This is for Line Item header details&lt;/P&gt;&lt;P&gt;WINDOW = 'MAIN'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;OTHERS = 1.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;ELEMENT = 'LINE ITEM DATA'    *** This is for Line Item  details&lt;/P&gt;&lt;P&gt;WINDOW = 'MAIN'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;OTHERS = 1.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;ELEMENT = 'LINE ITEM DATA'&lt;/P&gt;&lt;P&gt;WINDOW = 'MAIN'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;OTHERS = 1.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display Totals&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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 = 'TOT_PRICE'&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;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;others = 1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;/LI&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;WINDOW = 'WINDOW4'&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;OTHERS = 1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;close print job&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FORM'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;OTHERS = 1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; FORM GET_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GET_DATA.&lt;/P&gt;&lt;P&gt;SELECT SINGLE * FROM BKPF INTO T_BKPF WHERE BUKRS IN RBUKRS&lt;/P&gt;&lt;P&gt;AND BELNR IN RBELNR&lt;/P&gt;&lt;P&gt;AND GJAHR IN RGJAHR.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;SELECT * FROM BSEG INTO TABLE T_BSEG WHERE BUKRS IN RBUKRS&lt;/P&gt;&lt;P&gt;AND BELNR IN RBELNR&lt;/P&gt;&lt;P&gt;AND GJAHR IN RGJAHR.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2006 11:59:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/1574853#M259547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-13T11:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/1574854#M259548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is witht the GF_COUNT Only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check that in debug mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful reward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2006 12:06:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/1574854#M259548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-13T12:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/1574855#M259549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it an option to define a constant (new) WINDOW for this header? I do not know how your document looks, but in some cases if the item lines are the last matters to be printed and the pages are all the same, you can also print the header of the table in a separate window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetz,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2006 12:09:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/1574855#M259549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-13T12:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/1574856#M259550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi ,&lt;/P&gt;&lt;P&gt;  Try passing additional import parameter TYPE = HEADER in the FM WRITE_FORM. &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' *** This is for Line Item header &lt;/P&gt;&lt;P&gt;TYPE   = 'HEADER' &lt;/P&gt;&lt;P&gt;WINDOW = 'MAIN'&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;OTHERS = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srikanth M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2006 12:11:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/1574856#M259550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-13T12:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/1574857#M259551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two ways to resolve it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.If you do not have any other windows etc to print on the first page as compared to the subsequent ones you can use the below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Setting a Header Text in the Main Window:  TOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the TOP .. ENDTOP control command to specify lines of text, which are always to be output at the top of the main window.  These text lines are also known as header texts.  An example of the use of header texts in the case of a very long table covering several pages of output would be to ensure that the table heading information were repeated at the start of each new page of output.&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;/: TOP&lt;/P&gt;&lt;P&gt;	:  &lt;/P&gt;&lt;P&gt;	: &lt;/P&gt;&lt;P&gt;/: ENDTOP&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;Solution 2.&lt;/P&gt;&lt;P&gt;2. U can approximately count the number of records it is going to print on the page and basically reset your G_Count to zero on reaching the same in the print program...lets say you wish to print 40 records in a page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If g_count &amp;gt;= 40.&lt;/P&gt;&lt;P&gt;   g_count = 0.&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;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2006 12:23:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-code/m-p/1574857#M259551</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-13T12:23:50Z</dc:date>
    </item>
  </channel>
</rss>

