<?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: WRITE_FORM issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760435#M1304723</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply but I didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing I am doing is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab into wa&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;    element = 'NEW_LINE'&lt;/P&gt;&lt;P&gt;    window = 'MAIN' &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;So on the first page all lines are printed, but on the second page of the same document the lines are not there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to do it with the addition type = 'TOP', this didn't work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone has got another idea on how to fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guido Koopmann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jun 2009 08:18:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-17T08:18:04Z</dc:date>
    <item>
      <title>WRITE_FORM issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760433#M1304721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guru's,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having trouble with a sapscript in combination with the printprogram.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my main window I need to print some variabele amount of lines. I created an element NEW_LINE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within my ABAP I am doing a loop and within that loop I have a call to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE_FORM with the paramters: type = 'TOP' element = 'NEW_LINE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This goes well for the first page. But for the next page of the same form the data disappeared and we're stil processing the same form. How can achieve that the NEW_LINE is printed on every page?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guido Koopmann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 07:08:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760433#M1304721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T07:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: WRITE_FORM issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760434#M1304722</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;Small correction in your driver program will do, give the window = 'MAIN' in the function module write_form and remove the type = 'TOP'. or change it to type = 'BODY'&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'WRITE_FORM'
    EXPORTING
*      type    = 'TOP'  " Remove this
      element = 'TEST2'
      window  = 'MAIN'. " Add this
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(or)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your new-line text element is having a static text then try to take a variable window and mention the data in it and position it accordingly where you want that data to be printed. so the data will come in every page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards&lt;/P&gt;&lt;P&gt;Sarves&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 08:06:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760434#M1304722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T08:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: WRITE_FORM issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760435#M1304723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply but I didn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing I am doing is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab into wa&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;    element = 'NEW_LINE'&lt;/P&gt;&lt;P&gt;    window = 'MAIN' &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;So on the first page all lines are printed, but on the second page of the same document the lines are not there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to do it with the addition type = 'TOP', this didn't work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone has got another idea on how to fix this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guido Koopmann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 08:18:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760435#M1304723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T08:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: WRITE_FORM issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760436#M1304724</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;Open the script in debugging mode for the document which are not correct then only you can analyze the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 08:28:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760436#M1304724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T08:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: WRITE_FORM issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760437#M1304725</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;Can you tell what are you trying to print in the text element &lt;STRONG&gt;new_line&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards&lt;/P&gt;&lt;P&gt;Sarves&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 08:31:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760437#M1304725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T08:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: WRITE_FORM issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760438#M1304726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Koopmann,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a similar problem once long time back,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did like this...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
jtab[] = itab[]."Added this line
Loop at itab into wa

CALL FUNCTION 'WRITE_FORM'
element = 'NEW_LINE'
window = 'MAIN' 

delete itab from wa. "Added this line
Endloop
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 08:34:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760438#M1304726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T08:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: WRITE_FORM issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760439#M1304727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dileep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you tell me a bit more, becasue I am not getting what you did.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guido Koopmann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 08:41:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760439#M1304727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T08:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: WRITE_FORM issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760440#M1304728</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;I believe something is wrong in your script, I run this sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF ITAB OCCURS 0,
        N1(3) TYPE N,
      END   OF ITAB.


DO 15 TIMES.
  MOVE SY-INDEX TO ITAB.
  APPEND ITAB.
ENDDO.

CALL FUNCTION 'OPEN_FORM'
  EXPORTING
    FORM                        = 'ZSCRIPT_MAX'
  EXCEPTIONS
    CANCELED                    = 1
    DEVICE                      = 2
    FORM                        = 3
    OPTIONS                     = 4
    UNCLOSED                    = 5
    MAIL_OPTIONS                = 6
    ARCHIVE_ERROR               = 7
    INVALID_FAX_NUMBER          = 8
    MORE_PARAMS_NEEDED_IN_BATCH = 9
    SPOOL_ERROR                 = 10
    CODEPAGE                    = 11
    OTHERS                      = 12.
IF SY-SUBRC &amp;lt;&amp;gt; 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

LOOP AT ITAB.
  CALL FUNCTION 'WRITE_FORM'
    EXPORTING
      ELEMENT = 'NEW_LINE'.

ENDLOOP.

CALL FUNCTION 'CLOSE_FORM'
  EXCEPTIONS
    UNOPENED                 = 1
    BAD_PAGEFORMAT_FOR_PRINT = 2
    SEND_ERROR               = 3
    SPOOL_ERROR              = 4
    CODEPAGE                 = 5
    OTHERS                   = 6.
IF SY-SUBRC &amp;lt;&amp;gt; 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my script there 2 pages: the FIRST and the NEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works fine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 08:59:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760440#M1304728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T08:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: WRITE_FORM issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760441#M1304729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Koopmann,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont know exactly the siyuation But I will let you know what happened to me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was a Label Printing,,,&lt;/P&gt;&lt;P&gt;Need to print 10 Labels (lets say 5 material labels for page)&lt;/P&gt;&lt;P&gt;When I written the code and printed,,,&lt;/P&gt;&lt;P&gt;Only the 5 labels were successfull,,,&lt;/P&gt;&lt;P&gt;the second page was not printed...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If printed sometimes it used to repeat the same first page values in second page,,, &lt;/P&gt;&lt;P&gt;Then I got a Idea, If I delete there will be no chance of repeating anymore,, So i did that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hoped that type answer could be a little helpfull for you. So just shared here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Dileep .C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 09:30:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/write-form-issue/m-p/5760441#M1304729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T09:30:08Z</dc:date>
    </item>
  </channel>
</rss>

