SAP START_FORM Function Module for SAPscript: Start a form
START_FORM is a standard start form SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for SAPscript: Start a form processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for start form FM, simply by entering the name START_FORM into the relevant SAP transaction such as SE37 or SE38.
Function Group: STXC
Program Name: SAPLSTXC
Main Program: SAPLSTXC
Appliation area:
Release date: 20-Jan-1995
Mode(Normal, Remote etc): Normal Function Module
Update:

Function START_FORM pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'START_FORM'"SAPscript: Start a form.
EXPORTING
* ARCHIVE_INDEX = "Archive index
* FORM = ' ' "Form name
* LANGUAGE = ' ' "Form language
* STARTPAGE = ' ' "First page
* PROGRAM = ' ' "Program name for symbol replacement
* MAIL_APPL_OBJECT = "MAIL: Application object (type of document)
IMPORTING
LANGUAGE = "Form language
EXCEPTIONS
FORM = 1 FORMAT = 2 UNENDED = 3 UNOPENED = 4 UNUSED = 5 SPOOL_ERROR = 6 CODEPAGE = 7
IMPORTING Parameters details for START_FORM
ARCHIVE_INDEX - Archive index
Data type: TOA_DARAOptional: Yes
Call by Reference: No ( called with pass by value option)
FORM - Form name
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE - Form language
Data type: THEAD-TDSPRASDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
STARTPAGE - First page
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PROGRAM - Program name for symbol replacement
Data type: SY-REPIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MAIL_APPL_OBJECT - MAIL: Application object (type of document)
Data type: SWOTOBJIDOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for START_FORM
LANGUAGE - Form language
Data type: THEAD-TDSPRASOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
FORM - Form name
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FORMAT - Page format is not allowed
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNENDED - Previous form is not yet ended
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNOPENED - Form output not opened
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNUSED - No form opened yet
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SPOOL_ERROR -
Data type:Optional: No
Call by Reference: Yes
CODEPAGE - Codepage not allowed
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for START_FORM Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_form | TYPE STRING, " | |||
| lv_language | TYPE THEAD-TDSPRAS, " | |||
| lv_archive_index | TYPE TOA_DARA, " | |||
| lv_form | TYPE C, " SPACE | |||
| lv_format | TYPE C, " | |||
| lv_unended | TYPE C, " | |||
| lv_language | TYPE THEAD-TDSPRAS, " SPACE | |||
| lv_unopened | TYPE THEAD, " | |||
| lv_startpage | TYPE C, " SPACE | |||
| lv_unused | TYPE C, " | |||
| lv_program | TYPE SY-REPID, " SPACE | |||
| lv_spool_error | TYPE SY, " | |||
| lv_mail_appl_object | TYPE SWOTOBJID, " | |||
| lv_codepage | TYPE SWOTOBJID. " |
|   CALL FUNCTION 'START_FORM' "SAPscript: Start a form |
| EXPORTING | ||
| ARCHIVE_INDEX | = lv_archive_index | |
| FORM | = lv_form | |
| LANGUAGE | = lv_language | |
| STARTPAGE | = lv_startpage | |
| PROGRAM | = lv_program | |
| MAIL_APPL_OBJECT | = lv_mail_appl_object | |
| IMPORTING | ||
| LANGUAGE | = lv_language | |
| EXCEPTIONS | ||
| FORM = 1 | ||
| FORMAT = 2 | ||
| UNENDED = 3 | ||
| UNOPENED = 4 | ||
| UNUSED = 5 | ||
| SPOOL_ERROR = 6 | ||
| CODEPAGE = 7 | ||
| . " START_FORM | ||
ABAP code using 7.40 inline data declarations to call FM START_FORM
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single TDSPRAS FROM THEAD INTO @DATA(ld_language). | ||||
| DATA(ld_form) | = ' '. | |||
| "SELECT single TDSPRAS FROM THEAD INTO @DATA(ld_language). | ||||
| DATA(ld_language) | = ' '. | |||
| DATA(ld_startpage) | = ' '. | |||
| "SELECT single REPID FROM SY INTO @DATA(ld_program). | ||||
| DATA(ld_program) | = ' '. | |||
Search for further information about these or an SAP related objects