Application Development 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: 

SCRIPT

Former Member
0 Kudos

Hi all,

in the driver program of SCRIPT, if I dont used the function CLOSE_FROM, waht happence.

Best regards,

U.khan.

6 REPLIES 6

Former Member
0 Kudos

Hi,

Basically it will show syntactically correct but while running the program, it wont show the desired output, itll terminate and go back to the program. so, you use open_form function module, you've got to have a close_form.

Regards,

Aswin

former_member181962
Active Contributor
0 Kudos

Close_form has some tables parameters like OTFDATA which are necesssary for further processing (Creating pdfs etc).

Those will not be possible.

and the next write_form function module will write the doata in the already opened form.

This is what the FM documentation says:

<i><b>SAPscript: End layout set printing

Form printing started with OPEN_FORM is completed. Possible closing operations on the form last opened are carried out.

Form printing must be completed by this function module. If this is not carried out, nothing is printed or displayed on the screen.</b></i>

Regards,

Ravi

Former Member
0 Kudos

Hii

CLOSE_FORM is manadatory..it throws a error if use OPEN_FORM and dont use CLOSE_FORM

. the FM OPEN_FORM is used for opening a Form for printing.. there you specify the form name and other options like device type , Dialog which prompts a dialog for inputing the device name and so on..

eg,

call function 'OPEN_FORM’

exporting

form = 'S_EXAMPLE_1’

2.the WRITE_FORM as the name implies is to write on the form it calls the element and window on which you make your output.

eg,

call function 'WRITE_FORM'

exporting element = 'HEADING'

type = 'TOP'

window = 'MAIN'

function = 'SET'

for heading

call function 'WRITE_FORM'

exporting

element = 'BOOKING’

type = 'BODY’

window = 'MAIN'

for body

3. CLOSE_FORM closes the form finally.

call function 'CLOSE_FORM'

ps:reward points if it helps you

Go through this link for detailed description..

http://www.sappoint.com/abap/ssintro.pdf

regards

Naresh

Former Member
0 Kudos

HI

GOOD

IF YOU WONT USE CLOSE_FORM IT WONT RETRUN YOU THE APPROPRIATE VALUE FROM THE PRINT PROGRAM TO FORM

THANKS

MRUTYUN

Former Member
0 Kudos

Hai

Close_Form: The function module closes the layout set opened using OPEN_FORM. The system executes any terminating processing steps for the last opened layout set. No Export parameters for this Function Module.

OPEN_FORM: This function module opens layout set printing. One must call this function module before he uses any of other layout set function modules like Write_Form, Start_Form, Control_Form etc., You need specify a layout set name in the export parameters of this function module. If nothing is passed to Open_Form then one should use Start_Form function module to open layout set before starting the output. The layout set opened by Open_Form should be closed by Close_Form function module, other wise output doesn’t appear. We can use any number of Open_Form, Close_Form functions in one single program. But Close_Form must be there for every Open_Form in the program.

Some of the important export parameters we have to pass to Open_Form function module.

Form: Enter the Layout set name here, which then controls the output formatting. If nothing is specified then we must use Start_Form for opening layout set.

Language: Layout sets are Language dependent. Enter the desired language here. If the entered layout set is not in that language, then the function tries to open the Form entered in its original language. The default value is SY-LANGU.

Device: SAP Script can format a text on different device types. The device can be ‘PRINTER’ or ‘TELEX’, ‘TELEFAX’, ’ABAP’ and ‘SCREEN’.

Dialog: Use parameter DIALOG to determine whether to display a dialog box before printing, in which the user can set several spool parameters for print formatting. Possible values: SPACE displays no print parameter screen. 'X' display print parameter screen. Default value: 'X'

Options: Use parameter OPTIONS to set several options for print formatting. The parameter has the structure ITCPO. The user can change some of the defined settings on the print control screen. The default value for Options is ‘ ‘. We will discuss about ITCPO structure in detail later.

Other Export, Import and Exceptions are self-explanatory.

Thanks & regards

Sreeni

0 Kudos

hi Ubed,

The function module closes the form opened using OPEN_FORM. The system executes any terminating processing steps for the last opened form.

<b>You must use this function module to close form printing. Otherwise, no output appears on printer or screen.</b>

Check this Link

http://help.sap.com/saphelp_erp2005/helpdata/en/d6/0dba27494511d182b70000e829fbfe/frameset.htm

Regards,

Santosh