2007 Oct 03 11:49 AM
Hi,
Can any one say how to handle protect and endprotect in smartforms.
2007 Oct 03 12:02 PM
Hi,
The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
Regards,
Bhaskar
Hi,
Can any one say how to handle protect and endprotect in smartforms.
2007 Oct 03 11:53 AM
There is a "page protection" checkbox in some nodes in Output options tab
2007 Oct 03 11:53 AM
HI,
There is no concept of 'protect' and 'endprotect' but to access this functionality u can use 'page protection' check box. In the Window Attrinutes, yuo can check the Checkbox page protection.
In a node or template you will have tab output options. There you have check box withe title called page protection. This acts as protect/end protect
Regards
Sudheer
2007 Oct 03 11:53 AM
Prince,
protect & endprotect r used in scripts... to prevent page breaks..
If you want to display the data in one page..And do not want to split the data into two pages..you will using PROTECT....ENDPROTECT..
Here is the link, it will make u understand about protect and endprotect..
http://help.sap.com/saphelp_47x200/helpdata/en/d1/80318f454211d189710000e8322d00/frameset.htm
Reward if helpful,
Karthik
2007 Oct 03 11:55 AM
Any text between the PROTECT / ENDPROTECT statements will always be displayed on the same page. For example if there are 3 lines space left on the page and the next element (between PROTECT / ENDPROTECT) contains 5 lines the form will start a new page. Without PROTECT / ENDPROTECT the form would split the lines across two pages.
In smartform in table (output options) you can see Page protection, do check that check box.
In a node or template you will have tab output options. There you have check box withe title called page protection. This acts as protect/end protect.
2007 Oct 03 11:56 AM
Hi Prince,
Protect Endprotect is used to print the data in one page, if data is more to fit in one page then it moves to the next page, I mean it prints on page2.
in smartforms let suppose i have records 1000. but the first page prints only 50 in this case
After every 50 records u need to print next set of records in new page,for that u need commandline as soon as u right click on the node u will see command line , use it to trigger the next page , here next page is nothing but first page .
PROTECT...ENDPROTECT is used to Keeps the block of text in the same page.
Eg:
/: PROTECT
Customer No
Name
Street
City
/: ENDPROTECT
In The above example Protect .. Endprotect ensures that if all the four lines of Customer info can be displayed in Current Page, It will display otherwise it will print all the Four lines in Next Page.
Reward for helpful.
Regards,
Harini.S
2007 Oct 03 11:57 AM
Hi
PROTECT: Protect from page break
You can determine that a paragraph must not be separated by a page break in the style or layout set. If the attribute page protection is set, then all the lines of this paragraph are always output together on one page. This attribute is linked to the respective paragraph.
It certainly does not make sense, to provide all the paragraphs with a page protection attribute to neutralize an unwanted page break. This event is much too dynamic for this and only results from the current text. Furthermore, it can also happen that you only want to protect parts of a paragraph from a page break. In principle, you could solve this problem using the command NEW-PAGE, by explicitly starting a new page before the affected parts of the text. However, this procedure is not very easy to make changes to. Assume that you have formatted your text using the NEW-PAGE command so that you have no unwanted
page breaks. If you now insert new lines or delete existing ones, you would have to check all the NEW-PAGE commands inserted after this point in the text, as changes can result in the movement of page breaks. With the command pair PROTECT. ENDPROTECT, SAPscript offers you the option of individually defining protection from a page break. If you parenthesize the text in question using these commands, SAPscript automatically guarantees that all the lines it contains are printed together on one page. If the lines fit on the current output page, they are output there, in exactly the same way as if the PROTECT
command was not used. If, however, the space is not sufficient, the PROTECT command then works as a NEW-PAGE and generates a form feed .For this reason, you can view PROTECT/ENDPROTECT as a conditional NEW-PAGE command, whose condition consists of whether the included lines fit into the current window MAIN or not.
2007 Oct 03 12:02 PM
Hi,
The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
Regards,
Bhaskar
2007 Oct 03 12:15 PM
hi,
There is Page protection in Smart Form. But it will activate only on text field and folder .