<?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 Error in SAP-SCRIPT control command-newpage. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559052#M252949</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on scripts in that i have given conditional page break, though its working but lastly it is printing one more additional page, I want to avoid that page. pls go thro the code and guide me how to avoid that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT XVBPLK WHERE KZOBE = 'X'.&lt;/P&gt;&lt;P&gt;    PERFORM PACKING_TREE USING XVBPLK-VENUM.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'CONTROL_FORM'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;        COMMAND = 'NEW-PAGE'.       &lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FORM PACKING_TREE USING VALUE(SHENR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Daten des Versandelements shenr ausgeben, also Wurzel des Teilbaums&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  MOVE SPACE TO XVBPLK.&lt;/P&gt;&lt;P&gt;  XVBPLK-VENUM = SHENR.&lt;/P&gt;&lt;P&gt;  READ TABLE XVBPLK.&lt;/P&gt;&lt;P&gt;  VBPLK = XVBPLK.&lt;/P&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 ELEMENT = 'SHELEM'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT XVBPLP WHERE VENUM = SHENR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT P&lt;SUB&gt;VSART R&lt;/SUB&gt;BEZEI FROM LIKP AS P INNER JOIN T173T AS R&lt;/P&gt;&lt;P&gt;               ON P&lt;SUB&gt;VSART = R&lt;/SUB&gt;VSART INTO CORRESPONDING FIELDS OF TABLE IT&lt;/P&gt;&lt;P&gt;               WHERE VBELN = XVBPLP-VBELN AND SPRAS EQ 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF XVBPLP-POSNR IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Versandelement&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      PERFORM PACKING_TREE USING XVBPLP-UNVEL.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Lieferposition (Anteil)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      VBPLP = XVBPLP.&lt;/P&gt;&lt;P&gt;      LOOP AT IT INTO IT.&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            ELEMENT  = 'MODE'&lt;/P&gt;&lt;P&gt;            FUNCTION = 'SET'&lt;/P&gt;&lt;P&gt;            TYPE     = 'BODY'&lt;/P&gt;&lt;P&gt;            WINDOW   = 'DESPATCH'.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&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 = 'DELPOS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    clear vbplp.&lt;/P&gt;&lt;P&gt;  ENDLOOP. &lt;/P&gt;&lt;P&gt;ENDFORM.                    "PACKING_TREE&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;Pritesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Oct 2006 07:14:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-04T07:14:56Z</dc:date>
    <item>
      <title>Error in SAP-SCRIPT control command-newpage.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559052#M252949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on scripts in that i have given conditional page break, though its working but lastly it is printing one more additional page, I want to avoid that page. pls go thro the code and guide me how to avoid that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT XVBPLK WHERE KZOBE = 'X'.&lt;/P&gt;&lt;P&gt;    PERFORM PACKING_TREE USING XVBPLK-VENUM.&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'CONTROL_FORM'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;        COMMAND = 'NEW-PAGE'.       &lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FORM PACKING_TREE USING VALUE(SHENR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Daten des Versandelements shenr ausgeben, also Wurzel des Teilbaums&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  MOVE SPACE TO XVBPLK.&lt;/P&gt;&lt;P&gt;  XVBPLK-VENUM = SHENR.&lt;/P&gt;&lt;P&gt;  READ TABLE XVBPLK.&lt;/P&gt;&lt;P&gt;  VBPLK = XVBPLK.&lt;/P&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 ELEMENT = 'SHELEM'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT XVBPLP WHERE VENUM = SHENR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT P&lt;SUB&gt;VSART R&lt;/SUB&gt;BEZEI FROM LIKP AS P INNER JOIN T173T AS R&lt;/P&gt;&lt;P&gt;               ON P&lt;SUB&gt;VSART = R&lt;/SUB&gt;VSART INTO CORRESPONDING FIELDS OF TABLE IT&lt;/P&gt;&lt;P&gt;               WHERE VBELN = XVBPLP-VBELN AND SPRAS EQ 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF XVBPLP-POSNR IS INITIAL.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Versandelement&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      PERFORM PACKING_TREE USING XVBPLP-UNVEL.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Lieferposition (Anteil)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      VBPLP = XVBPLP.&lt;/P&gt;&lt;P&gt;      LOOP AT IT INTO IT.&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            ELEMENT  = 'MODE'&lt;/P&gt;&lt;P&gt;            FUNCTION = 'SET'&lt;/P&gt;&lt;P&gt;            TYPE     = 'BODY'&lt;/P&gt;&lt;P&gt;            WINDOW   = 'DESPATCH'.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&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 = 'DELPOS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    clear vbplp.&lt;/P&gt;&lt;P&gt;  ENDLOOP. &lt;/P&gt;&lt;P&gt;ENDFORM.                    "PACKING_TREE&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;Pritesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 07:14:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559052#M252949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T07:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error in SAP-SCRIPT control command-newpage.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559053#M252950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;can you try this one ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT XVBPLK WHERE KZOBE = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONTROL_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;COMMAND = 'NEW-PAGE'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM PACKING_TREE USING XVBPLK-VENUM.&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;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 07:21:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559053#M252950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T07:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error in SAP-SCRIPT control command-newpage.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559054#M252951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudheer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already tried this and its printing more pages i.e. its not working properly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 08:03:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559054#M252951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T08:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error in SAP-SCRIPT control command-newpage.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559055#M252952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XVBPLK1[] = XVBPLK[].&lt;/P&gt;&lt;P&gt;DELETE XVBPLK WHERE KZOBE &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;LOOP AT XVBPLK.&lt;/P&gt;&lt;P&gt;PERFORM PACKING_TREE USING XVBPLK-VENUM.&lt;/P&gt;&lt;P&gt;AT LAST.&lt;/P&gt;&lt;P&gt;  LFLAG = 'X'.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;CHECK LFLAG &amp;lt;&amp;gt; 'X'.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONTROL_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;COMMAND = 'NEW-PAGE'. &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 08:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559055#M252952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T08:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error in SAP-SCRIPT control command-newpage.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559056#M252953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;can you try this one ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT XVBPLK WHERE KZOBE = 'X'.&lt;/P&gt;&lt;P&gt;if sy-tabix ne '1'.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'CONTROL_FORM'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;  COMMAND = 'NEW-PAGE'.&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM PACKING_TREE USING XVBPLK-VENUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 08:33:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559056#M252953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T08:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Error in SAP-SCRIPT control command-newpage.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559057#M252954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please tell me &lt;STRONG&gt;relevance of KZOBE field...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why we require check on this field ...as shown above ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it mandatory at Handling Unit level also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in  advance ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 18:53:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-sap-script-control-command-newpage/m-p/1559057#M252954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-09T18:53:14Z</dc:date>
    </item>
  </channel>
</rss>

