Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

sap scripts

Former Member
0 Kudos

what is the difference b/w open_form and close_form.

In program open_form and close_form,b/w these two fm's we can use start_form,write_form, end_form fm's multiple times ,and we can use multiple open_form and close_form fm's pairs ? in exactly which situation we can use these .

4 REPLIES 4

Clemenss
Active Contributor
0 Kudos

Hi

I think there is documentation available for the functions. See also Start_form and end_form and this

<a href="http://www.google.com/search?hl=en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=sapscriptsopen_form+close_form&spell=1">sap scripts</a>

Regards,

Clemens

Former Member
0 Kudos

OPEN_FORM creates a spool request whereas START_FORM does not create a spool request. START_FORM is used to generate multiple layout sets like one layout for one particular customer...

Former Member
0 Kudos

Hi,

We will use open_form and close form in sap scripts.

open_form is used to to create spool requests. open_form is used to work on single layout. after opening the form we need to close it. we will close the open_form by using close_form.

Reward points if useful.

Thanks & Regards,

Vasudeva Rao.

Former Member
0 Kudos

Hi,

<u><b>OPEN_FORM</b></u>

The function module OPEN_FORM opens form printing. You must call this function module before you can use any other form function (WRITE_FORM, START_FORM, CONTROL_FORM...).

You need not specify a form name. If you omit the name, you must use the function module START_FORM to open a form before starting the output.

You must end form printing by using the function module CLOSE_FORM. Otherwise, the system does not print or display anything.

Within a program, you can use several OPEN_FORM.. CLOSE_FORM pairs. This allows you to write output to several different spool requests from within one program.

<u><b>CLOSE_FORM</b></u>

The function module closes the form opened using OPEN_FORM. The system executes any terminating processing steps for the last opened form.

You must use this function module to close form printing. Otherwise, no output appears on printer or screen.

<u><b>START_FORM</b></u>

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.

<u><b>WRITE_FORM</b></u>

The system outputs the form element specified in parameter ELEMENT into the currently opened form.

In the parameter WINDOW you can specify the name of a window for the output. Remember that the form element must be defined in this window. The parameter FUNCTION specifies how to merge the text lines to be output with any existing contents in the window. In this case, there are differences between the different window types or areas.

Regards,

Bhaskar