cancel
Showing results for 
Search instead for 
Did you mean: 

related to forms

Former Member
0 Kudos

hello Experts,

What are the advantages of SAP SCRIPTS over SMARTFORMS and what are thae advantages of SMARTFORMS over SAP SCRIPTS?

Accepted Solutions (1)

Accepted Solutions (1)

former_member588853
Active Contributor
0 Kudos

hi,

Advantages of smartforms over scripts

1).Smartforms are client independent and Sapscripts are client dependent.

2).Multiple page formats are possible in smartforms which is not the case in SAPScripts

3).It is possible to have a smartform without a main window .

4).Labels cannot be created in smartforms.

5).Routines can be written in smartforms tool.

6).Smartforms generates a function module when activated.

Disadvantages

Disadvantages,

1. Labels cannot be created in smartforms.

2. Routines can be written in smartforms tool.

3. Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.

4. 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.

hope you understood

rrewards if useful,

regards,

nazeer

Former Member
0 Kudos

Hi shaik,

Can u give me some detailed explanation about protect and endprotect?

Former Member
0 Kudos

Hi Vinil.

Protect & endprotect will reserve the space on a particular page. Suppose you have five lines which needs to be printed. & there is only three lines of space on the current page then a page break will happen & all the five lines will be printed on the next page. If five lines are available on the current page then they will be printed on the same page. e.g.:

PROTECT.

name1 ..

name2 ...

city ....

country ...

zip code ....

ENDPROTECT.

Reward points if helpful answer.

Ashvender

Former Member
0 Kudos

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.

Syntax:

/: PROTECT

:

:

/: ENDPROTECT

The lines to be protected lie between the two commands.

•An ENDPROTECT command without a preceding PROTECT command

is ineffective.

•If the last ENDPROTECT is missing, it is implicitly assumed at the end

of the text.

•PROTECT .. ENDPROTECT commands cannot be nested. If a second

PROTECT command is recognized while another is active, the second is

ignored.

•If the text between PROTECT and ENDPROTECT is so extensive that it

would not completely fit on an empty page, then only one form feed is

generated and the text is then output normally. Thus, in this case, the

section to be protected can be separated by a page break.

Ex:

/: PROTECT

P &VAR&

P THIS IS for test

P This is test

/:ENDPROTECT

/: PROTECT

:

:

/: ENDPROTECT

The lines to be protected lie between the two commands.

Regards,

Priyanka.

Answers (1)

Answers (1)

amit_khare
Active Contributor
0 Kudos

Refer the link -

Regards,

Amit

Reward all helpful replies.