Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function modules used in SAP Script

Former Member
0 Likes
6,893

Hi all,

List at least function modules used in SAP Script.

Along with explaination of function module.

Thanks in advance.

Regards

Raj

5 REPLIES 5
Read only

Former Member
0 Likes
2,371

Hi Raj,

In scripts, open_form, write_form & close_form are the mandatory function modules.

Start_form & end_form are optional.

Start_form is used to start a new layout set.It has to be followed by an end_form.

Regards

Aneesh.

Read only

Former Member
0 Likes
2,371

Open_form...TO open the form,

Write_form..writes the data in the form.

Close_form.. Closes the form.

In addition to this you can also use start_form and end_form.

This FM are used when you are printing Multiple header items.

For eg - Multiple orders and each order on a different page

Shreekant

Read only

Former Member
0 Likes
2,371

hi,

in script, we use these function moduleS frequently.

OPEN_FORM

START_FORM

WRITE_FORM

END_FORM

CLOSE_FORM.

<u><b>open_form</b></u>

this FM open's the form printing and initialses the layout.

call function 'open_form'
        exporting 
                      form = ' ' ' here specifies the form name. default value is SPACE
                      language = sy-langu "here specifies the language in which form existing
                     device = 'printer' " here pass o/p device type.

<u><b>close_form</b></u>

this FM close the form printing, we must close the opened form with close-form.

call function 'close_form'

**this FM has no parameters

<u><b>start_form</b></u>

this FM is used for printing the form specified page, not from starting page.

call function 'start_form'
                  exporting 
                               form = ' ' "name of the form
                               language = sy-langu " exisisting language
                               startpage = < > ' here specifies the page number from which printing is started.

<u><b>end_form</b></u>

this FM is used for end the form printing whish was started by start_form.

start_form must end with end_form FM.

<b>

call function 'end_form'

**has no mandatiry parameters</b>

<u><b>write_form</b></u>

this FM outputs the form elements specified in the parameter element.

call function 'write_form'
                   exporting
                                element = < > "pass the element to output
                                window = <> " specifies the output location
                                type = < > "specifies the position onn window

<u><b>control_form</b></u>

this FM is used for inserting script control command from program into script editor.

call function 'control_form'
                   exporting
                                  command = < > 'here pass the control command.

regards,

Ashokreddy.

Message was edited by:

Ashok Reddy

Read only

0 Likes
2,371

Hi Ashok,

Thanks for the answer..

Will you please give me the example so that i can understand exact use of these function modules in reality..

especially

START_FORM

END_FORM

CONTROL_FORM

Thanks in advance..

Raj

Read only

0 Likes
2,371

Hi,

Function module used in Scripts:

1. OPEN_FORM: It Opens the output layout set.

2. CLOSE_FORM: It closes the output layout set.

3. WRITE_FORM: It calls the elements from the layout set.

4. STATR_FORM: Starts a new layout set.

5. END_FORM: End a new layout set.

regards,

Nasreen