START FORM
Usually a print program does not print only one urging letter or one account statement, but several layout sets for different customers. To have the output for each customer begin with the start page of the layout set, you must start the current layout set again and again.
To start a layout set again, you must first end the current layout set and then open the layout set again. Within one print request, first call the function module END_FORM. It executes the final processing for the current layout set. Then start the layout set again using START_FORM. Output then begins again on the start page of the desired layout set.
CALL FUNCTION 'OPEN_FORM'
:
CALL FUNCTION 'START_FORM'
:
CALL FUNCTION 'END_FORM'
:
CALL FUNCTION 'START_FORM'
:
CALL FUNCTION 'END_FORM'
:
CALL FUNCTION CLOSE_FORM
If you use START_FORM and END_FORM, you must not specify a layout set for OPEN_FORM. However, in this case you can use the SAPscript output functions only after opening a layout set with START_FORM.
Neither this documentation nor any part of it may be copied or reproduced in any form or by any means or translated into another language, without the prior consent of SAP AG.
WRITE_FORM
The system outputs the layout set element specified in parameter ELEMENT into the currently opened layout set.
In the parameter WINDOW you can specify the name of a window for the output. Remember that the layout set element must be defined in this window. The parameter FUNCTION specifies how to merge the text lines to be output with any existing contents in the window. In this case, there are differences between the different window types or areas.
Function call:
CALL FUNCTION 'WRITE_FORM'
EXPORTING ELEMENT = SPACE
WINDOW = 'MAIN'
FUNCTION = 'SET'
TYPE = 'BODY'
IMPORTING PENDING_LINES =
EXCEPTIONS ELEMENT =
FUNCTION =
TYPE =
UNOPENED =
UNSTARTED =
WINDOW =
Export parameters:
ELEMENT Specify the name of the text element you want to output into the layout set window specified in the parameter WINDOW. The element must be defined in that layout set window. If you specify no element, the system uses the default element, if one is defined in the layout set.Default value: SPACE
WINDOW Specify the name of the window into which you want to output the layout set element specified in the parameter ELEMENT.Default value: 'MAIN'
FUNCTION The parameter determines how to output the text element into the respective window. The output type depends on the window type and area:Window type MAIN, area BODY:'SET' append to previous output 'APPEND' same as SET'DELETE' no effectWindow type MAIN, areas TOP and BOTTOM;all other windows:'SET' delete old window or area contents and output the element 'APPEND' append the element to the existing elements 'DELETE' delete the specified element from the window or areaDELETE in the TOP area (headings) takes effect only on the next page. You can no longer delete any heading from the TOP area after outputting text to the BODY area.Default value: 'SET'
TYPE The system interprets this parameter only for output to the main window.The parameter determines the area of the main window into which you want to output the element. Possible values:'TOP' header area'BODY' main area'BOTTOM' footer areaDefault value: 'BODY'
Import parameters:
PENDING_LINES If a text is output to the BOTTOM area of the main window (TYPE = 'BOTTOM'), there may be not enough space left on the current output page. The system then internally flags this text for output into the BOTTOM area of the next page. The actual output is pending.If output is pending, the parameter PENDING_LINES contains 'X', and the print program can react accordingly. For example, an explicit page break at the text end (NEW-PAGE) could implicitly trigger the pending BOTTOM output on the next page.
RELATED POSTS
SAP SCRIPTS PART 19
Usually a print program does not print only one urging letter or one account statement, but several layout sets for different customers. To have the output for each customer begin with the start page of the layout set, you must start the current layout set again and again.
To start a layout set again, you must first end the current layout set and then open the layout set again. Within one print request, first call the function module END_FORM. It executes the final processing for the current layout set. Then start the layout set again using START_FORM. Output then begins again on the start page of the desired layout set.
CALL FUNCTION 'OPEN_FORM'
:
CALL FUNCTION 'START_FORM'
:
CALL FUNCTION 'END_FORM'
:
CALL FUNCTION 'START_FORM'
:
CALL FUNCTION 'END_FORM'
:
CALL FUNCTION CLOSE_FORM
If you use START_FORM and END_FORM, you must not specify a layout set for OPEN_FORM. However, in this case you can use the SAPscript output functions only after opening a layout set with START_FORM.
Neither this documentation nor any part of it may be copied or reproduced in any form or by any means or translated into another language, without the prior consent of SAP AG.
WRITE_FORM
The system outputs the layout set element specified in parameter ELEMENT into the currently opened layout set.
In the parameter WINDOW you can specify the name of a window for the output. Remember that the layout set element must be defined in this window. The parameter FUNCTION specifies how to merge the text lines to be output with any existing contents in the window. In this case, there are differences between the different window types or areas.
Function call:
CALL FUNCTION 'WRITE_FORM'
EXPORTING ELEMENT = SPACE
WINDOW = 'MAIN'
FUNCTION = 'SET'
TYPE = 'BODY'
IMPORTING PENDING_LINES =
EXCEPTIONS ELEMENT =
FUNCTION =
TYPE =
UNOPENED =
UNSTARTED =
WINDOW =
Export parameters:
ELEMENT Specify the name of the text element you want to output into the layout set window specified in the parameter WINDOW. The element must be defined in that layout set window. If you specify no element, the system uses the default element, if one is defined in the layout set.Default value: SPACE
WINDOW Specify the name of the window into which you want to output the layout set element specified in the parameter ELEMENT.Default value: 'MAIN'
FUNCTION The parameter determines how to output the text element into the respective window. The output type depends on the window type and area:Window type MAIN, area BODY:'SET' append to previous output 'APPEND' same as SET'DELETE' no effectWindow type MAIN, areas TOP and BOTTOM;all other windows:'SET' delete old window or area contents and output the element 'APPEND' append the element to the existing elements 'DELETE' delete the specified element from the window or areaDELETE in the TOP area (headings) takes effect only on the next page. You can no longer delete any heading from the TOP area after outputting text to the BODY area.Default value: 'SET'
TYPE The system interprets this parameter only for output to the main window.The parameter determines the area of the main window into which you want to output the element. Possible values:'TOP' header area'BODY' main area'BOTTOM' footer areaDefault value: 'BODY'
Import parameters:
PENDING_LINES If a text is output to the BOTTOM area of the main window (TYPE = 'BOTTOM'), there may be not enough space left on the current output page. The system then internally flags this text for output into the BOTTOM area of the next page. The actual output is pending.If output is pending, the parameter PENDING_LINES contains 'X', and the print program can react accordingly. For example, an explicit page break at the text end (NEW-PAGE) could implicitly trigger the pending BOTTOM output on the next page.
RELATED POSTS
SAP SCRIPTS PART 19
No comments :
Post a Comment