SAP SCRIPT 17


OPEN_FORM

The function module OPEN_FORM opens layout set printing. You must call this function module before you can use any other layout set function (WRITE_FORM, START_FORM, CONTROL_FORM ...).
You need not specify a layout set name. If you omit the name, you must use the function module START_FORM to open a layout set before starting the output.
You must end layout set printing by using the function module CLOSE_FORM. Otherwise, the system does not print or display anything.
Within a program, you can use several OPEN_FORM .. CLOSE_FORM pairs. This allows you to write output to several different spool requests from within one program.

Function call:

CALL FUNCTION 'OPEN_FORM'
EXPORTING FORM = SPACE
LANGUAGE = SY-LANGU
DEVICE = 'PRINTER'
DIALOG = 'X'
OPTIONS = SPACE
APPLICATION = 'TX'
ARCHIVE_INDEX = SPACE
ARCHIVE_PARAMS = SPACE
IMPORTING LANGUAGE =
RESULT =
NEW_ARCHIVE_PARAMS =
EXCEPTIONS CANCELED =
DEVICE =
FORM =
OPTIONS =
UNCLOSED =


Export parameters:

FORM You can enter the name of a layout set here, which then controls output formatting. After calling OPEN_FORM, you can immediately output texts to the layout set using other function modules.If you leave the parameter blank, you must call START_FORM with a valid layout set name before starting any output functions.Default value: SPACE
LANGUAGE Layout sets are language-dependent. Enter the desired language. If a layout set does not exist in this language, the system tries to call the layout set in its original language.Reference field: THEAD-TDSPRASDefault value: SY-LANGU
LANGUAGE The parameter tells you which language variant of the layout set the system actually used.Reference field: THEAD-TDSPRAS
RESULT The parameter contains results of the print formatting process. By comparing the corresponding fields of parameter OPTIONS with those of parameter RESULT, you can determine whether the user made changes to any settings on the print control screen.Structure: ITCPP
NEW_ARCHIVE_PARAMS The parameter contains results of the archiving process, including the archive parameters the user changed on the print control screen. The parameter has the ABAP/4 Dictionary structure ARC_PARAMS.Structure: ARC_PARAMS
Exceptions:

CANCELED When starting SAPscript print formatting, the system displayed a selection screen, on which the user can enter settings for the output, such as: • Printer name• Information on the cover page• Page selection• Number of copiesThe user did not call any subsequent actions allowed on this screen, but canceled the output formatting instead. The function module was ended without further action. No layout set is open for output anymore.

DEVICE The parameter DEVICE contains an invalid device type.
FORM The parameter FORM contains the name of a layout set that the system could not find.Possible reasons:• The layout set does not exist.• There is no active version of this layout set.SAPscript first searches for the layout set in the current client and in the specified language. If the layout set does not exist there, it tries the original language of the layout set. If the layout set is still not found, it searches in client 0, first in the specified language, than in the original layout set language.

OPTIONS The parameter OPTIONS contains invalid values for the formatting options.Possible errors:• The output device specified in field TDDEST does not exist.• The field TDPAGESLCT for selecting the pages to be printed contains invalid characters.
UNCLOSED The system was told to open a new layout set even though an old layout set is still active. The old layout set must be closed first (CLOSE_FORM or END_FORM).

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.
You must use this function module to close layout set printing. Otherwise, no output appears on printer or screen.

Function call:

CALL FUNCTION 'CLOSE_FORM'
IMPORTING RESULT =
TABLES OTFDATA = ?...
EXCEPTIONS UNOPENED =


Import parameters:

RESULT The parameter contains results of the print formatting process. By comparing the corresponding fields of parameter OPTIONS with those of parameter RESULT, you can determine whether the user made changes to any settings on the print control screen.Structure: ITCPPAmong others, the structure ITCPP contains a field with the name of USEREXIT. This field tells you how the user left the print view:Characters E, B, or C:EXIT <-> EBACK <-> BCANCEL <-> C
Table parameters:
OTFDATA If in the parameter OPTIONS the field TDGETOTF contains 'X', the system returns the formatted output in the OTF format in the optional table parameter OTFDATA.In this case, the system does not output anything to printer, screen or fax/telex/teletex.Structure: ITCOO
Exceptions:
UNOPENED The system could not execute the current layout set function, since the layout set output was not yet initialized using OPEN_FORM.




RELATED POSTS

SAP SCRIPT CONTROLS 6
SAP SCRIPT CONTROLS 5
SAP SCRIPT CONTROLS 4
SAP SCRIPT CONTROLS 3
SAP SCRIPT CONTROLS 2
SAP SCRIPT CONTROLS 1
SAP SCRIPTS PART 20
SAP SCRIPTS PART 19
SAP SCRIPTS PART 18
SAP SCRIPTS PART 16
SAP SCRIPTS PART 15
SAP SCRIPTS PART 14
SAP SCRIPTS PART 13
SAP SCRIPTS PART 12
SAP SCRIPTS PART 11
SAP SCRIPTS PART 10
SAP SCRIPTS PART 9
SAP SCRIPTS PART 8
SAP SCRIPTS PART 7
SAP SCRIPTS PART 6
SAP SCRIPTS PART 5
SAP SCRIPTS PART 4
SAP SCRIPTS PART 3
SAP SCRIPTS PART 2
SAP SCRIPTS PART 1

Part Seven

SAP CRM Technology Overview
CRM Data Exchange with SAP R/3 CRM Data Exchange via AdapterCRM E commerce Introduction
CRM Interaction Center System ArchitectureCRM Field Sales
People Centric SAP CRM
Analytical SAP CRm Overview
SAP CRM Solution MonitoringCRM Backup Restoring System
Part Eight

MySAP CRM Marketing Introduction Marketing and Advertizing in CRMMySAP CRM Marketing CalenderSAP CRM Marketing AnalyticsSAP CRM Marketing Personalized E mailSAP CRM Marketing SegmentationCRM Marketing Proposals
CRM Marketing and lead management

No comments :

Post a Comment