cancel
Showing results for 
Search instead for 
Did you mean: 

sapscript

Former Member
0 Kudos

hi,

what is the use of startform and endfrom.plz explain.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have a look at below link.

http://help.sap.com/saphelp_nw2004s/helpdata/en/d6/0dba34494511d182b70000e829fbfe/frameset.htm

<b>START_FORM</b>

In-between the function modules OPEN_FORM and CLOSE_FORM, you can use different forms. This allows you to combine several different forms into one print output. However, you can combine only those forms that have the same page format. To switch forms, use the function module START_FORM. If another form is still open, you must close it first using END_FORM. If you specify no form name when calling START_FORM, the system restarts the last open form. If after OPEN_FORM no form was activated yet, the system leaves the function module with the exception UNUSED.

<b>END_FORM</b>

END_FORM ends the currently open form and executes the required termination processing. After calling this function module, no more form is active. For further output, you must start a new form using START_FORM. END_FORM does not replace CLOSE_FORM, that is, you must always close any SAPscript output using CLOSE_FORM.

I hope it helps.

Best Regards,

Vibha

*Please mark all the helpful answers

Answers (4)

Answers (4)

Former Member
0 Kudos

hi

good

6.3 'OPEN_FORM' and 'CLOSE_FORM' call functions

The 'OPEN_FORM' call function permits to initialize the form printing. This function must be executed at the beginning of the program because it precises that the program calls a form. The 'OPEN_FORM' call function syntax is the following:

CALL FUNCTION 'OPEN_FORM'

EXPORTING FORM =

LANGUAGE =

DEVICE =

OPTIONS =

DIALOG =

IMPORTING LANGUAGE =

EXCEPTIONS =

The 'FORM' option indicates the form name to be edited. The printing options are managed by the 'DEVICE' option. Its values can be: PRINTER (the output is a local or distant printer), TELEFAX (fax sending) or SCREEN (screen output). The end of the printing is done using the 'CLOSE_FORM' call function. Its syntax is the following:

CALL FUNCTION 'CLOSE_FORM'

IMPORTING RESULT =

EXCEPTIONS=

All the other call functions concerning the form printing must be made between those two call functions. In the case when a call is made before the 'OPEN_FORM' function or after the 'CLOSE_FORM' function, it will not be interpreted and an error will occur. It is highly recommended to use just one time each call function described above when only one form has to be edited.

6.4 'START_FORM' and 'END_FORM' call functions

The 'START_FORM' function permits to customize the form edition making copies of the form with different data. The forms are equal, but data inserted in the windows can be different from each others. Before usnig this call funtion, it is necessary to call the 'OPEN_FORM' function. The syntax corresponding to the 'START_FORM' function is the following:

CALL FUNCTION 'START_FORM'

EXPORTING FORM =

LANGUAGE =

STARTPAGE =

IMPORTING LANGUAGE =

EXCEPTIONS =

The 'END_FORM' call function does not stop the form printing process. It does not replace the 'CLOSE_FORM' call function. This call function only specifies that a part of the form printing is stopped. However, another call to the 'START_FORM' function can occurs after a call to the 'END_FORM' function. The 'END_FORM' syntax is the following:

CALL FUNCTION 'END_FORM'

IMPORTING RESULT =

EXCEPTIONS =

It is possible to use those two call functions as many times as wanted, unlike the first two call functions described in the above paragraph.

thanks

mrutyun^

raguraman_c
Active Contributor
0 Kudos

Hi,

Check this out

The 'START_FORM' function permits to customize the form edition making copies of the form with different data. The forms are equal, but data inserted in the windows can be different from each others. Before usnig this call funtion, it is necessary to call the 'OPEN_FORM' function. The syntax corresponding to the 'START_FORM' function is the following:

CALL FUNCTION 'START_FORM'

EXPORTING FORM =

LANGUAGE =

STARTPAGE =

IMPORTING LANGUAGE =

EXCEPTIONS =

The 'END_FORM' call function does not stop the form printing process. It does not replace the 'CLOSE_FORM' call function. This call function only specifies that a part of the form printing is stopped. However, another call to the 'START_FORM' function can occurs after a call to the 'END_FORM' function. The 'END_FORM' syntax is the following:

CALL FUNCTION 'END_FORM'

IMPORTING RESULT =

EXCEPTIONS =

It is possible to use those two call functions as many times as wanted, unlike the first two call functions described in the above paragraph.

Feel free to revert back.

--Ragu

former_member502730
Participant
0 Kudos

Hi,

Start a form FM is Starts the form. and End form FM Ends the form.

If u don't use this FM, while you execute the Script Program it gives the error, "START_FORM END_FORM missing".

If you have changed the layout of script and to set new layout you have to use Start_form FM.

Regards,

Dharmesh

Former Member
0 Kudos

In-between the function modules OPEN_FORM and CLOSE_FORM, you can use different forms. This allows you to combine several different forms into one print output. However, you can combine only those forms that have the same page format.

To switch forms, use the function module START_FORM. If another form is still open, you must close it first using END_FORM.

If you specify no form name when calling START_FORM, the system restarts the last open form. If after OPEN_FORM no form was activated yet, the system leaves the function module with the exception UNUSED.

Open_form => It assign the form and printer, It should be first.

Start_form => It start Writing mode. You can use write_form in loop to write more than one lines befor End_form.

End_form => It end writing mode of current page and will require to start again through Start_form.

Close_form=> it end the Form. After this you can not start again for created file.

Former Member
0 Kudos

Hi Mani,

*To begin several indentical forms containing different data within a single spool request, begin each form using START_FORM, and end it using END_FORM

call funtion 'START_FORM'.....

For Details go <b>SAP SCRIPT Function Module</b> in the link:

http://help.sap.com/saphelp_46c/helpdata/en/d6/0dc169494511d182b70000e829fbfe/frameset.htm

Reward points if this Helps.

Manish

Message was edited by:

Manish Kumar