on 12-21-2006 6:47 AM
Hi
I wanted to know what is the use of START_FORM and END_FORM in print program of SAP script.
In which kind of scenario we can use this function modules.
Thanks in advance.
Chintan.
Hi Soni,
CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZGILL_SCRIPT'
LANGUAGE = 'SY-LANGU'.
.
CALL FUNCTION 'END_FORM'.
Here u r keeping sy-langu in single quotes ( 'SY-LANGU' ) , remove the single quotes
CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZGILL_SCRIPT'
LANGUAGE = SY-LANGU.
.
CALL FUNCTION 'END_FORM'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
<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>Function call:</b>
<b>CALL FUNCTION 'START_FORM'
EXPORTING FORM = SPACE
LANGUAGE = SPACE
STARTPAGE = SPACE
PROGRAM = SPACE
ARCHIVE_INDEX = SPACE
IMPORTING LANGUAGE =
EXCEPTIONS FORM =
FORMAT =
UNENDED =
UNOPENED =
UNUSED =</b>
http://help.sap.com/saphelp_47x200/helpdata/en/d6/0dba34494511d182b70000e829fbfe/content.htm
<b>CLOSE_FORM </b>
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.
Function call:
<b>CALL FUNCTION 'CLOSE_FORM'
IMPORTING RESULT =
TABLES OTFDATA = ?...
EXCEPTIONS UNOPENED =</b>
http://help.sap.com/saphelp_47x200/helpdata/en/d6/0dba27494511d182b70000e829fbfe/content.htm.
The above function modules are used between OPEN_FORM and CLOSE_FORM.
If you want to call a different form or the same form with different print parameters ...in such scenarios the above function modules can be used.
Regards,
Vara
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
layout set can be changed in the current print procedure with START_FORM and END_FORM closes the current layout set.
if u wnt to set multiple layouts u need to use end_form for each start_form
Regards
- Gopi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We use start_form and wnd_form in scenarios where in we need to call two different layouts for the same print job.
Say we have two layouts which should be alternatively called.
Then the sequence would.
open_form.
if <condition1>.
start_form.
end_form.
else.
start_form.
end_form.
endif.
close_form.
kishan negi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kisan,
below is my code...after executing this code i am getting short dump.
REPORT Z_44072_SCRIPT_TEST .
data : x type c value 1.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'Z_44072_TEST'
LANGUAGE = SY-LANGU.
if x = 1.
CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZGILL_SCRIPT'
LANGUAGE = 'SY-LANGU'.
.
CALL FUNCTION 'END_FORM'.
ELSE.
CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'Z_44072_TEST'
LANGUAGE = 'SY-LANGU'.
CALL FUNCTION 'END_FORM'.
ENDIF.
pls. do the needful.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.