<?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: Protec - endprotec in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/protec-endprotec/m-p/969497#M69356</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 you want to protect the text elements you called into loop, you should use it in you program:&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 = 'PROTECT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT..&lt;/P&gt;&lt;P&gt;    CALL FUNCTION WRITE&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;CALL FUNCTION CONTROL_FORM&lt;/P&gt;&lt;P&gt;   EXPORTING &lt;/P&gt;&lt;P&gt;      COMMAND = 'ENDPROTECT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: max bianchi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Sep 2005 16:33:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-09-14T16:33:53Z</dc:date>
    <item>
      <title>Protec - endprotec</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/protec-endprotec/m-p/969495#M69354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am working on SAP Script.&lt;/P&gt;&lt;P&gt;I have to print the details of one operation and then next operation and so on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Now, if the space on the page is very less so as to accomodate the complete details of next operation on same page then it should go on next page otherwise the same operation along with it details should continue on the page.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;How do I achieve this ? I guess I have to use protec-endprotect ? Do I have to write this as control command in SCRIPT EDITOR or write it in abap driver program ?&amp;lt;/b&amp;gt;My sample code is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IAFVC.&lt;/P&gt;&lt;P&gt; LOOP AT IRB. &lt;/P&gt;&lt;P&gt;       IF IRB-VORNR = IAFVC-VORNR.&lt;/P&gt;&lt;P&gt;            CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;            EXPORTING&lt;/P&gt;&lt;P&gt;            ELEMENT = 'COMPONENT_LISTING'  &lt;/P&gt;&lt;P&gt;            WINDOW  =  'MAIN'.&lt;/P&gt;&lt;P&gt;            ENDIF.&lt;/P&gt;&lt;P&gt;        ENDIF.&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                      =  'PRT_LABELS'&lt;/P&gt;&lt;P&gt;          WINDOW                       =  'MAIN'.&lt;/P&gt;&lt;P&gt;         &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          CALL FUNCTION 'READ_TEXT'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;          id                      = 'AVOT'   "Text ID&lt;/P&gt;&lt;P&gt;          language                = 'E'      "Laguage&lt;/P&gt;&lt;P&gt;          name                    = XTDNAME2 "Text name&lt;/P&gt;&lt;P&gt;          object                  = 'AUFK'   "text object&lt;/P&gt;&lt;P&gt;          tables                  = IT_TEXTS. "Int.table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT IT_TEXTS.&lt;/P&gt;&lt;P&gt;            CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;            EXPORTING&lt;/P&gt;&lt;P&gt;            ELEMENT        = 'OPERATION_LONG_TEXT'&lt;/P&gt;&lt;P&gt;            WINDOW                         = 'MAIN'.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the each operation number will keep on looping and its respective details will be printed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Note: Its not a paragraph that I want to protect using protect-endprotect but its the complete operation detail with different elements.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2005 16:26:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/protec-endprotec/m-p/969495#M69354</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-14T16:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Protec - endprotec</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/protec-endprotec/m-p/969496#M69355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tushar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to put PROTECT...ENDPROTECT in your SAP Script screen code.  Then the written elements within will always be printed on one page, never split across two.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gill&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2005 16:32:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/protec-endprotec/m-p/969496#M69355</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-14T16:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Protec - endprotec</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/protec-endprotec/m-p/969497#M69356</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 you want to protect the text elements you called into loop, you should use it in you program:&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 = 'PROTECT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT..&lt;/P&gt;&lt;P&gt;    CALL FUNCTION WRITE&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;CALL FUNCTION CONTROL_FORM&lt;/P&gt;&lt;P&gt;   EXPORTING &lt;/P&gt;&lt;P&gt;      COMMAND = 'ENDPROTECT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: max bianchi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2005 16:33:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/protec-endprotec/m-p/969497#M69356</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-14T16:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Protec - endprotec</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/protec-endprotec/m-p/969498#M69357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then trigger the protection inside the print program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  call function 'CONTROL_FORM'
       exporting
            command   = 'PROTECT'
       exceptions
            unopened  = 01
            unstarted = 02.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&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;Your Code goes here&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  call function 'CONTROL_FORM'
       exporting
            command   = 'ENDPROTECT'
       exceptions
            unopened  = 01
            unstarted = 02.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2005 16:34:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/protec-endprotec/m-p/969498#M69357</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-09-14T16:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Protec - endprotec</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/protec-endprotec/m-p/969499#M69358</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 guess PROTECT ENDPROTECT will not work across TEXT ELEMENT boundaries . It will work for only one text element . You can combine all the text elements into one&lt;/P&gt;&lt;P&gt;and use IF condition in SAPSCRIPT itself to supress some of the lines if required. Use PROT ENDPROT on this one text element only ( either in program or in SAPSCRIPT).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2005 17:13:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/protec-endprotec/m-p/969499#M69358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-14T17:13:01Z</dc:date>
    </item>
  </channel>
</rss>

