Start of Content Area

START_FORM   Locate the document in its SAP Library structure

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.

 

Function call:

 

CALL FUNCTION 'START_FORM'

EXPORTING FORM = SPACE

LANGUAGE = SPACE

STARTPAGE = SPACE

PROGRAM = SPACE

ARCHIVE_INDEX = SPACE

IMPORTING LANGUAGE =

EXCEPTIONS FORM =

FORMAT =

UNENDED =

UNOPENED =

UNUSED =

 

Export parameters:

FORM

The parameter contains the name of the form you want to use for printing. If you specify no form here, the system restarts the last active form.

Default value: SPACE

LANGUAGE

Forms are language-dependent. Enter the desired language here. If the form does not exist in this language, the system tries to call the form in its original language. If the parameter LANGUAGE is empty, the system uses the language of the last active form.

Reference field: THEAD-TDSPRAS

Default value: SY-LANGU

STARTPAGE

Usually, SAPscript starts with the page specified as start page in the form definition. If you want to start output with another form page, enter the name of the desired form page here. If the desired page is not defined, the system uses the start page defined in the form.

Default value: SPACE

PROGRAM

To replace program symbols, SAPscript must know which active program contains the work areas for the values to be passed.

If you omit the parameter, the system searches for the field values in the program that was specified in the parameter OPTIONS (field TDPROGRAM) of OPEN_FORM.

If you enter a program name, the system replaces the program symbols with the values from this program up to the next END_FORM.

Reference field: SY-REPID

Default value: SPACE

ARCHIVE_INDEX

Enter index information for the print output you want to archive. The system stores this information (DARA line) together with the print output in the archive. You can then access this special print output in the archive using the index information.

Structure: TOA_DARA

Default value: SPACE

 

Import parameters:

LANGUAGE

The parameter tells you which language variant of the form the system actually used.

Reference field: THEAD-TDSPRAS

 

Exceptions:

FORM

The parameter FORM contains the name of a form which could not be found.

Possible reasons:

  • The form does not exist.
  • There is no active version of this form.

SAPscript first searches for the form in the current client and in the specified language. If the form does not exist there, it tries the original language of the form. If the form is still not found, it searches in client 0, first in the specified language, than in the original form language.

FORMAT

Within a print output defined between OPEN_FORM and CLOSE_FORM, you must use forms of the same page format. The page format of the current form differs from that of the previously called forms.

Include only those forms into one spool request that have the same format (for example, DINA4). Page orientation is of no consequence; that means, you can mix pages in landscape and portrait format.

UNENDED

The last form opened is still open. It must first be closed using END_FORM or the form output must be closed using CLOSE_FORM.

UNOPENED

The current form function could not be executed, since the form output was no yet initialized using OPEN_FORM.

UNUSED

One of the parameters FORM or LANGUAGE contains only blanks and no form has been opened yet whose name or language could be used as defaults.