on 05-25-2008 10:40 AM
if we wrote code like this what happens
protect
protect
endprotect
endprotect
Hi Jai,
I think....That is not a proper usage of Protect ...Endprotect....The meaning it self is clear ...is that One paragraph will come in one page and other is bigger den it will come in anothe page....If u write like That....
it will give consider the first one only....it will give error I think...
Regards,
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The protect- endprotect cannot be nested.
I think the system will not consider the inner protect- endprotect ie it will take it as a comment.
cheers
vamshi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i think it will say endprotect is missing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
SAPscript provides the PROTECT .. ENDPROTECT command pair to allow you to define the areas to be protected against a page break on an individual basis. If you enclose the text to be protected in these commands, then SAPscript will ensure that each line of this text is printed together on the same page.
If the complete text fits in the space remaining on the current page, then it is output on that page just as it would be if no PROTECT command had been used. If, however, the remaining space is not sufficient for the text, then the PROTECT command has the same effect as a NEW-PAGE command and text is printed on a new page.
Thus the PROTECT/ENDPROTECT commands may be regarded as a kind of conditional NEW-PAGE command, the condition being whether or not the lines enclosed between the two commands fit in the space remaining in the current main window.
Syntax:
/: PROTECT
:
:
/: ENDPROTECT
The text lines to be protected are enclosed between the two commands.
u2022 An ENDPROTECT command without a preceding PROTECT command has no effect.
u2022 If the terminating ENDPROTECT is missing, then it will be assumed at the end of the text.
u2022 PROTECT .. ENDPROTECT command pairs cannot be nested. If a second PROTECT command occurs before the first one has been terminated by an ENDPROTECT, it will be ignored.
u2022 If the text enclosed by a PROTECT .. ENDPROTECT pair is itself too long for a single page, then a page break is generated immediately before the text and the text is output in the normal way. It is then unavoidable that a page break will occur at some point within the text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
PROTECT
ENDPROTECT is used to keep the lines together causing a page brak if they don't fit in the same page.
So, why do you wanna code this thing that way, one PROTECT does the job.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.