cancel
Showing results for 
Search instead for 
Did you mean: 

START-FORM

Former Member
0 Kudos

Where exactly we need to use the START-FORM ? What is its function ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

The layout set can be changed in the current print procedure with START_FORM. It is therefore possible to combine several different layout sets in one printer output. Before a new layout set is opened with START_FORM, an open layout set must be closed with END_FORM.

Suppose one page as potrait form and another is as lanscape form.

Thanks,

suma.

Former Member
0 Kudos

Say Ex: i have 2 Scripts: 1. zscr1 & zscr2.

So how can they called in single progrm using START_FORM ?

Former Member
0 Kudos

HI,

CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZSCR1'
LANGUAGE = SY-LANGU.
.
CALL FUNCTION 'END_FORM'.

CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZSCR2'
LANGUAGE = SY-LANGU.
.
CALL FUNCTION 'END_FORM'.

Regards,

Nisrin.

Edited by: Nisrin Pindwarawal on Aug 8, 2008 12:35 PM

Edited by: Nisrin Pindwarawal on Aug 8, 2008 12:35 PM

Former Member
0 Kudos

I have written the following code. i am facing the error as END FORM is start_form is invalid as end form is missing. Here is the code.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

form = 'ZSCR1'

language = sy-langu.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = 'LINES'

window = 'MAIN'.

CALL FUNCTION 'START_FORM'

EXPORTING

form = 'ZSCR2'

language = sy-langu.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = 'DEMO'

window = 'MAIN'.

CALL FUNCTION 'END_FORM'.

CALL FUNCTION 'CLOSE_FORM'.

former_member181995
Active Contributor
0 Kudos

Manjunath,

CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = 'ZSCR1'
language = sy-langu.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'LINES'
window = 'MAIN'.
CALL FUNCTION 'CLOSE_FORM'.."should be here

CALL FUNCTION 'START_FORM'
EXPORTING
form = 'ZSCR2'
language = sy-langu.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DEMO'
window = 'MAIN'.
CALL FUNCTION 'END_FORM'.
.

Former Member
0 Kudos

Your code looks fine.

You are passing elements as 'LINES' , in case if its of tline structure try using this fm 'WRITE_FORM_LINES'.

Regards,

Nisrin.

Former Member
0 Kudos

we can even use WRITE_FORM. But what is that error nisrin ?

Former Member
0 Kudos

Hi,

I tried doing your code this is the problem with the code.

CALL FUNCTION 'OPEN_FORM'.

CALL FUNCTION 'START_FORM'
EXPORTING
form = 'ZSCR1'
language = sy-langu.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'LINES'
window = 'MAIN'.

CALL FUNCTION 'END_FORM'.


CALL FUNCTION 'START_FORM'
EXPORTING
form = 'ZSCR2'
language = sy-langu.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DEMO'
window = 'MAIN'.

CALL FUNCTION 'END_FORM'.

CALL FUNCTION 'CLOSE_FORM'.

Regards,

Nisrin.

Edited by: Nisrin Pindwarawal on Aug 8, 2008 1:09 PM

Former Member
0 Kudos

Hi, I have changed the sequence of function call , just try it-

CALL FUNCTION 'OPEN_FORM'
EXPORTING
*form = 'ZSCR1'
language = sy-langu.

CALL FUNCTION 'START_FORM'
EXPORTING
form = 'ZSCR1'
language = sy-langu.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'LINES'
window = 'MAIN'.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DEMO'
window = 'MAIN'.


CALL FUNCTION 'END_FORM'.

CALL FUNCTION 'START_FORM'
EXPORTING
form = 'ZSCR2'
language = sy-langu.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'LINES'
window = 'MAIN'.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'DEMO'
window = 'MAIN'.

CALL FUNCTION 'END_FORM'.

CALL FUNCTION 'CLOSE_FORM'.

Regards,

Sujit

former_member181995
Active Contributor
0 Kudos

Manjunath,

as i already indicate in my previous reply that your problem is with FM sequence pls check them.

Amit.

Former Member
0 Kudos

Hi Guys i have solved the issue. Kindly find the code.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

language = sy-langu.

CALL FUNCTION 'START_FORM'

EXPORTING

form = 'Z1'

language = sy-langu.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = 'LINES'

window = 'MAIN'.

CALL FUNCTION 'END_FORM'.

CALL FUNCTION 'START_FORM'

EXPORTING

form = 'Z2'

language = sy-langu.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = 'DEMO'

window = 'MAIN'.

CALL FUNCTION 'END_FORM'.

CALL FUNCTION 'CLOSE_FORM'.

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Manjunath,

http://sapscriptcode.blogspot.com/

Regards,

Sravanthi

former_member705122
Active Contributor
0 Kudos

Hi,

Ex: i have 2 Scripts: 1. zscr1 & zscr2.

Check this link,

Regards

Adil

Former Member
0 Kudos

Hi,

START_FORM is used to start new form.

suppose if you have 3 forms..in the report you want to start 3rd form after 1form...you can directly switch to the 3rd form by specifying 3rd form name to START_FORM function module.

if you are not mentioning any form for START_FORM..then it will call previous activated form.

Regards,

venkat

former_member705122
Active Contributor
0 Kudos

Hi,

Check this link:

for examples:

Regards

Adil

Former Member
0 Kudos

Hi Majunath,

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.

Regards,

Nisrin.

Former Member
0 Kudos

Thanks for the reply. I am actually waiting for the example.

Former Member
0 Kudos

Check these links ,

Using start_form in driver program :

http://help.sap.com/saphelp_nw04/helpdata/en/d6/0dba34494511d182b70000e829fbfe/frameset.htm

The series of function modules used in script:

http://help.sap.com/saphelp_nw04/helpdata/en/d6/0db511494511d182b70000e829fbfe/frameset.htm

For the example of a code check this:

Regards,

Nisrin

Former Member
0 Kudos

This is in Scripts