cancel
Showing results for 
Search instead for 
Did you mean: 

diff b/w close_form & End_form?

Former Member
0 Kudos
302

1.diff b/w close_form & End_form?

Accepted Solutions (0)

Answers (2)

Answers (2)

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Also check http://sap.niraj.tripod.com/id20.html

Regards,

Rich Heilman

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

The function module END_FORM is used in conjunction with START_FORM. THe function module CLOSE_FORM is used in conjunction with OPEN_FORM. You will always need the OPEN and CLOSE, but not always the START and END.

The OPEN and CLOSE are used to open and close the spool. The START and END is used to start and end the form. Lets say for example, that you have a report that is to go to the sold to customers, one spool for each customer, but you need to break the report by ship-to. So for each ship-to under the sold-to, you need to start the page numbering over again, but still inside of the "Sold To" spool. If this is your requirement, you would use the START and END function modules to write each ship-to report to the sold-to spool. You can also use the START and END to force the printing of a certain page in the sapscript.

Regards,

Rich Heilman

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Taken from website http://www.supinfo-projects.com/cn/2005/forms_sapscript_en/6/

<i>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.</i>

Regards,

RIch Heilman