Escolar Documentos
Profissional Documentos
Cultura Documentos
The documentation may have changed since you downloaded the PDF. You can always find the latest information on SAP Help
Portal.
Note
This PDF document contains the selected topic and its subtopics (max. 150) in the selected structure. Subtopics from other structures are not included.
2017 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose
without the express permission of SAP SE. The information contained herein may be changed without prior notice. Some software products marketed by SAP
SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are
provided by SAP SE and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP
Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set
forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE in
Germany and other countries. Please see www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.
Table of content
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 1 of 25
Table of content
1 Advanced Form Development
1.1 Special Node Types
1.1.1 Commands
1.1.2 Complex Section
1.1.3 Program Lines
1.2 Processing a Form
1.2.1 Output Control: Overview
1.2.2 Processing Pages
1.2.3 Processing Windows
1.2.3.1 Main Window
1.2.3.2 Copies Window
1.2.3.3 Final Window
1.2.4 Processing Loops and Tables
1.2.5 Summary
1.3 Summing Up Different Currencies
1.3.1 Calculating and Printing Grand Totals
1.3.2 Calculating and Printing Subtotals
1.4 Delivery and Translation
1.5 Parameters of the Generated Function Module
1.5.1 Default Settings (Standard Output)
1.5.2 Control Structure
1.5.3 Output Options
1.5.3.1 Options for Fax Output
1.5.3.2 Spool Settings
1.5.3.3 Options for XML/HTML Output
1.5.4 Querying the Output Result
1.5.4.1 XML/HTML Output Structure
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 2 of 25
1.1.1 Commands
Use
Command nodes contain commands for different application purposes. In most cases, you need the command node to insert a dynamic page break within the
main window.
Features
Command Name
Description
Go to New Page
Dynamic page break. This command is allowed only within a main window.
Initializes the counter of the specified outline paragraph and all paragraphs on
inferior outline levels. It ignores paragraph formats without outline level.
Sends a print control to the output device. Print controls are administered in
the spool administration; during printing they are converted into printer-specific
escape sequences. For general information, refer to
Print Controls. In addition, you can use any existing
Controls.
Spool Attributes
SAPscript Print
You can use the table control in this group box to enter your own spool
attributes:
As
Attribute Name you can enter a new name for an attribute (without inverted
commas and without ampersands ('&')). This attribute is appended to the
spool request that you use to print your form.
As
Attribute Value specify either a literal (in inverted commas) or a field name
(without inverted commas and without ampersands ('&')). For a field name, the
value of the spool attribute is determined dynamically.
The attributes are appended to the spool request. You can display them in the
spool request overview (transaction
SP01 ) using function Request Information on the Free Attributes tab.
The purpose of free attributes is to append application-specific information to
the spool request, for example the first digit of a postal code for postage
optimizing. You can evaluate the attributes using database table
TSP02A (see also report RSPOPRNT ).
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 3 of 25
Procedure
Create a node of type Complex section in the
navigation tree of the Form Builder.
Enter a unique name for the node and a description (for example, template with data).
Determine the general purpose of the complex section. To do this use the General Attributes tab:
Select
U nstructured if you need only the Events tab to display header and footer areas. In this case, you can use the Data tab for repeated processing.
Select Table if you need the
Table tab. In this case, you can use the Data tab for repeated processing.
Select Template if you need the
Template tab. In this case, you cannot use the Data tab for repeated processing.
1. To read data from an internal table using the
Data tab mark the Repeat Processing field in the Data box.
If, due to changing the selection, tab pages would disappear, the Smart Builder offers a warning beforehand.
Result
You can now use the selected tab pages.
Integration
When generating the function module, the program lines node becomes a subroutine in ABAP. SAP Smart Forms then calls this subroutine according to its
position in the navigation tree.
You can use the program lines node to call your own subroutines, which you must have defined on the Form Routines tab of the node Global
Definitions.
Visibility Rules
You can use the following variables:
Global fields (fields from the global definitions or from the form interface), which you enter in the tables Input parameters and Output parametersof
the General Attributes tab.
Variables that you define locally within the program lines node.
Global Fields as Input/Output Parameters
Distinguishing between input and output parameters enables the global check to execute a data flow analysis. Since both input and output variables are global,
changes of these variables in the program lines node have global effects. This distinction between input and output parameters thus is of importance only for
the check, but does not restrict the visibility of the specified fields.
Local Variables
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 4 of 25
As you do in a FORM routine, you can use the DATA statement within program lines nodes to define and use local variables. They are visible only within the
program lines node in which they are defined.
Prerequisites
You must be familiar with ABAP programming.
See also:
Features
Editor Functions
The inline editor corresponds to any ABAP editor and offers the following functions:
Run syntax check
Statement patterns
Pretty Printer
Classification
General rules
If you consider the output controls of all node types together, you find the rules for processing a Smart Form (see:
Summary).
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 5 of 25
as follows:
1. If a condition is assigned to the node, the system evaluates the condition. If the condition is false, the node including its inferior nodes is not processed.
2. The system executes the action assigned to the node (such as printing a text in the window, processing program lines).
3. The system processes the directly inferior nodes of the node in the tree. The processing sequence in this case depends on the node type (for example,
sequentially from top to bottom, only at certain events, alternatively, repeatedly).
4. If output options are assigned to the node, then these options apply for any output described by the node and its inferior nodes. If you assign individual
output options to an inferior node (such as an individual style), these options overwrite the output options of the superior node for that inferior node.
Conditions
You can use the following conditions for processing a node:
Simple IF condition (using AND and OR)
Complex IF condition (using
program lines)
Event queries (for example, Only on First Page , At Page Break and so on)
Any combinations thereof
Output Options
You can determine the following
output options:
Assignment of a
Smart Style. In this case, the Smart Style set for the superior node is never used for output described by this node.
Page protection. Any output triggered by the node and its inferior nodes must be printed on one page; no page break is allowed.
Box and shading. Any output triggered by the node and its inferior nodes are framed or shaded as specified. For inferior nodes of tables and templates,
no boxes or shadings are allowed. Boxes in these cases are pre-determined by the line type.
Specifying lines and cells of a template for output. You can specify in which line and/or cell you want the output of the inferior node to appear.
Next Pages
There are two ways to specify the next page following the current page:
Use the Next page list box of the page node to enter the next draft page you want to process. A page that contains a main window can point to itself. If
you specify nothing but the next page, SAP Smart Forms triggers an automatic page break as soon as the page is full. If the processing ends on this
draft page, the next page set here it is not called.
Use a command node to insert a dynamic page break within a main window. As for any other node type, you can specify conditions to be fulfilled in
order to trigger the manual page break. The page to which you branch using this method is called a dynamic next page.
Note the restrictions for using both manual page break and next page:
Method
Allowed,
but only within the main window
Not allowed
Required
Optional
Allowed
Not allowed
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 6 of 25
For a page without main window, never specify the same page as next page, because this would trigger an endless loop. In such a case, the
system terminates processing after printing three pages.
Last Page
Form processing ends with the last page. The last page is reached if
on a draft page without main window no static next page is specified (for draft pages with main window, you must specify a static next page)
the draft page has a main window and
all inferior nodes of the main window have been processed and
no further manual page break has been processed in the main window
See also:
Copies and Links in the Navigation Tree
Window Types
You can define the following window types in a form:
one
main window
one or more secondary windows
one or more
copies windows
one or more
final windows
individual output areas for graphics or addresses
For graphics and addresses the above general characteristics apply as well. However, since they can have no inferior nodes, you only have to consider their
elementary characteristics.
The main difference between main and secondary window is the page break behavior: While in a main window a page break automatically occurs as soon as
the end of the window is reached, in a secondary window the remaining output is truncated; there is no page break.
The window types final window and copies window have the same characteristics as a secondary window. Final windows are processed only after all the
nodes in the tree have been processed. Copies windows can be used to explicitly print a particular content only on the copy or only on the original.
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 7 of 25
Activities
Main Window on One Draft Page
This is the default. The main window appears only on one draft page, which points to itself using the Next page attribute of the page node. The system
processes this draft page again and again until it reaches the end of the main window. Depending on the size of the output in the main window, SAP Smart
Forms then produces one or several print pages.
In this case, form printing ends at the end of the main window. If you want to print more pages, you must use the command node to include a
dynamic page break as the last inferior node of the main window.
Main Window on Several Draft Pages
Even though only one main window per form is allowed, you can copy it to several draft pages. Each main window then points to the same output control. You
use this technique if you want the pages on which a table with items is printed to have different layouts. Height and position of the main window may differ on
the different pages, but the width must remain the same throughout.
There are two ways to reach the second draft page:
If you want to branch to the second draft page immediately after printing the first draft page with the main window, enter this second draft page as next
page of the first one in the page node attributes. If the main window is not filled completely on the first draft page, the specified next page is not
processed.
If you want to branch to a different draft page later, for example, after printing a particular output, insert a dynamic page break at this position.
The draft page specified like this is processed even if the main window was not filled completely (for example, because at the end of the form you want
to print General Business Terms).
The draft page to which you branched is processed from the beginning. As soon as it starts processing the main window, SAP Smart Forms resumes printing
at the break location (after an automatic page break) or directly after the executed command node (after a dynamic page break).
Prerequisites
You use this window type only if you want to print copies of your form. In the
spool dialog in the Number input field of the Copies group box enter the number of copies (including the original).
Features
You can determine where to print the inferior nodes of a copies window:
Both on the original and on the copies (
Original and Copies )
Only on the original (
Only Original )
Only on the copies (
Only Copies )
You can use the
system fields SFSY-COPYCOUNT or SFSY-COPYCOUNT0 to query whether the current output is the original or, respectively, which number the copy has.
Extras
You frequently
print a graphic on the copies to flag them as copies. If, independent of the copy, the graphic is always the same, SAP Smart Forms can buffer the graphic
before printing the page and thus increase performance. To do this, you must flag the copies window accordingly:
If you mark
Identical Copies SAP Smart Forms buffers the output to increase performance. Within such a window, any queries of the system fields SFSY-COPYCOUNT
or SFSY-COPYCOUNT0 have no effects.
If you mark
Different Copies SAP Smart Forms generates the contents again for each copy. You use this option if, for example, you want to number your copies
consecutively (Copy 1, Copy 2, Copy 3, and so on).
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 8 of 25
Integration
As of Release 6.10 you can set this window type using a radio button on the General Attributes tab. For Releases 4.6C and 4.6D you must first upload a
Support Package. Selection of this window type differs for these releases. For more information, refer to Note 359009 in SAPNet.
Activities
Create a window.
To set the window type, use the
Window Type list box on the General Attributes tab.
For all other output, you can use the output option
Page Protection instead of No Break .
Processing
Requirements for Automatic Page Breaks
During output SAP Smart Forms must determine dynamically whether the output still fits onto the current page. Otherwise it must trigger a page break. When
processing tables, this is of special importance, since the table lines are not printed immediately after the corresponding node is processed. Whenever a new
line starts, the output control must determine the height of it. To do so, it stores the entire line in a buffer. The following examples illustrate why:
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 9 of 25
The cells within a table line contain data that may be printed on one as well as on several lines. If the line type is protected against page break,
all cells of the table line must be printed on the page. This depends on the height of the highest cell within the table line.
Even if the table line type is not break-protected, a subsequent cell might contain a graphic which is higher than the first cells.
These examples illustrate that the output control can determine the height of each line only by analyzing the entire line in the buffer.
Process Flow
For form development not every detail of the output control is important. We want to concentrate on two questions: When is the footer processed? How is the
automatic page break determined?
1. If you activated output at the beginning of the table or at a page break, the header is processed and printed.
2. With the
old table node, output of the first inferior node, for which the output option New Line is marked, determines the end of the current line as well as the beginning
of a new line. With the new table node you specify the end of the line by explicitly creating table lines. In both cases, SAP Smart Forms calculates at this
event wheter to execute an automatic line feed:
1. If the buffer already contains a table line, this is the line of the previous loop pass. With the beginning of the new line, the output control can now check
whether the buffered line still fits onto the current page, thereby considering the yet unprinted footer (provided it must be printed before the page break):
If there is enough space left on the page, the buffered line is printed.
If there is not enough space left, the output control processes the footer and prints it. Then the output control processes all subsequent windows of
the page and triggers a page break. It prints the buffered line after the page break.
1. The output control buffers the table line of the current loop pass to determine its height. However, this line is printed only during the next loop pass.
3. After processing the last inferior node, processing resumes with the first inferior node of the table (in the main area, with new table nodes).
Program Lines Nodes
Nodes of type program lines must be considered separately:
Program lines nodes cannot be buffered. The output control executes them directly while they are processed (unlike table lines, where the buffered line
is printed during the next loop pass). This affects subtotals that are printed at the end of a page above the footer.
Program lines nodes have no output. With the old table node this has the effect that they do not represent the start of a new line for the output control.
This means that all program lines nodes that appear before the next node that contains output are processed even though the line of the last loop pass
has not yet been completed. With the new table node this is different because you specify the line end by explicitly creating table lines.
The program lines nodes within a table or loop are processed in the desired sequence and only once per loop pass. But note that due to the mechanism
described above they are executed out of sync with the output (with the new table node as well).
The section
Summing Up Different Currencies describes how you can use program lines nodes to print correct totals.
The procedure described there is required only if you want to sum up values with different currencies or measurement units. Otherwise you can use the
Calculations tab of the new table node and avoid pondering about how to process the loop.
1.2.5 Summary
The overview below lists the exact rules for processing a form:
1. Processing starts with the start page (the first page in the tree).
2. Processing of a page is executed in the sequence of the assigned windows in the tree.
3. Processing a window means processing the output control of the window (see also
Output Control).
Processing of the main window on a page is finished:
1. If the main window is filled completely on the page and the output control has not yet been processed to the end or
2. If the output control has been processed to the end or
3. If a manual page break (see also
Page Sequence and Numbering) is reached.
1. Processing of a secondary window is finished:
1. If the secondary window is completely filled on the page or
2. If the output control has been processed to the end.
1. After all windows of a page are processed, processing of the page is finished.
2. A page break to a new page occurs as soon as the processing of a page is finished and
1. The output control of the main window has not yet been completely processed or
2. A manual page break was executed in the output control of the main window or
3. The page does not contain a main window.
1. The new page is the static next page. If a new page is called by a manual page break with page specification within the main window (dynamic next
page), the system processes this page.
2. Processing of the form ends if the processing of a page is finished and
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 10 of 25
1. On this page the output control of the main window has been finished and no manual page break occurred at the end or
2. On this page the output control of the main window has not been finished but there is no next page (neither static nor dynamic) or
3. This page does not contain a main window and no static next page exists.
The manual page break is executed only in the main window, which means that you can specify it only in the output control of the main
window.
For pages without a main window the system goes to the static next page after processing all windows. If there is no next page, processing
stops.
For particular applications it is possible to repeat the processing described above (one main window and several secondary windows), so that
actually a form with several main windows is created. The main windows all point to the same output control.
See:
Calculations
You can execute calculations manually using program lines nodes. However, this is necessary only for calculations on values that can have different
currencies or measurement units.
This section, as an example, describes how to sum up different currencies:
How to calculate subtotals according to a certain sort criterion and display them separately by currencies
How to calculate a grand total on different currencies and display it at the end of a table
How to calculate a subtotal of the grand total on different currencies and display it before a page break
You can use these calculations for
printing old tables as well as for the new table nodes (see: Printing Tables).
Integration
You usually calculate totals within data loops of the loop or table nodes. For
grand totals or subtotals of the grand totals at the end of a page use the footer for output. The output control of the footer (see: Processing Loops and Tables)
in this case requires a calculation of the total that is in sync with the output.
For
subtotals by sort criterion use events for summing that are triggered after a break in the sort level.
If you do not want to calculate totals for different currencies or quantity units, use the Calculations tab of the table node (see:
Calculations).
The solution described here refers to
printing old tables. However, it can easily be adapted for the new table node type.
Form
SF_TOTALS in the system illustrates how to print grand totals for different currencies using the old or the new table types. Use application program
SF_TOTALS to call this form.
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 11 of 25
Prerequisites
You are already printing the table using the table node, for which you now want to print a grand total.
Procedure
To print a subtotal of the grand total before a page break, the subtotal must be calculated in a special way. However, you can also use this method if you only
want to print the grand total at the end of the table.
We will use the flight data model to explain this summing method. A table containing the flights of the airline carriers is already being printed in a form. The
corresponding internal table (
T_SFLIGHT ) is defined in the form interface and has type TABLE OF SFLIGHT . To print a table line, you have defined field GS_SFLIGHT of type SFLIGHT
as a global field. You now want to calculate the total on the flight prices, taking into account that the airlines use different currencies to indicate their prices.
1. Create three additional fields in the global definition:
GT_TOTAL
of type TABLE OF SFLIGHT
GS_TOTAL
of type SFLIGHT
GS_4NEXT_ADDITION
of type SFLIGHT
In the navigation tree, you are already printing the table in the main window using table node B. To keep it simple, the table output in our example (see
below) consists only of the nodes C (containing the price) and E (containing the currency). Enhance the form logic as follows:
Form logic for calculating the grand total
Navigation Tree
Node
Attributes/Contents/Conditit
ons
Output parameters
: GT_TOTAL,
GS_4NEXT_ADDITION
Program lines:
refresh gt_total.
clear: gs_total,
gs_4next_addition.
Loop
:
internal table T_SFLIGHT
INTO GS_SFLIGHT
&GS_SFLIGHT-PRICE&
C
Input parameters
: GS_SFLIGHT,
GS_4NEXT_ADDITION
Output parameters :
GT_TOTAL,
GS_4NEXT_ADDITION
Program lines :
if not gs_4next_addition is initial.
collect gs_4next_addition into
gt_total.
endif.
gs_4next_addition-price =
gs_sflight-price.
gs_4next_addition-currency =
gs_sflight-currency.
&GS_SFLIGHT-CURRENCY&
E
Footer
Program lines :
if not gs_4next_addition is initial.
collect gs_4next_addition into
gt_total.
endif.
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Loop
:
internal table GT_TOTAL
INTO GS_TOTAL
Page 12 of 25
&GS_TOTAL-PRICE&
H
&GS_TOTAL-CURRENCY&
I
Result
If the table output covers several pages, a subtotal of the grand total appears at the end of each page. If you want to print a total only at the end of the table,
include the condition
only at end of section into the loop node ( G).
Discussion
Some steps within the form logic are self-explanatory:
To be able to calculate the price in accordance with the currency, we need the internal table
GT_TOTAL . We can then use the ABAP statement COLLECT to add up the values, thereby easily assigning each new value to the correct currency. Each
entry in table GT_TOTAL corresponds to the totals value in one currency.
At the beginning of the table, all summing fields must be cleared (node A).
When printing the footer, we use loop G to print the totals sorted by currencies.
Other steps, in contrast, are hard to understand at first sight, for example, what do we need field
gs_4next_addition for?. Why don't we simply add the current value of gs_sflight to the corresponding value in the internal table GT_TOTAL ?
The reason for this lies in the output control for
loops and tables. Determining the page break requires the output control to buffer table lines before printing them. The output control needs the height
specifications of the entire line before it can determine when to trigger the automatic page break. The program lines nodes, in contrast, are not buffered but
executed directly during processing.
See also:
Processing Loops and Tables
The output control recognizes that the last table line is finished as soon as it starts processing the next line. To synchronize the calcuation of the total with its
output, the calculation must be delayed. And for this reason we need the additional field
gs_4next_addition :
1. Within the loop, the total is calculated after the first output (node D). The node can even be positioned further down in the tree. The important fact is that
the output control has recognized that a new table line starts (with the new table type, this is achieved by explicitly creating table lines). If this last line
does not fit onto the page, the output control jumps to the footer processing. In this case, node D is not processed. This would not have happened if
node D had been inserted before node C.
2. If no new table line starts, the value of the last line above node D is added to the total. Since
gs_4next_addition is empty at the beginning, we must query this in the programming. Otherwise, the COLLECT statement would use an empty currency in
GT_TOTAL . Then, we temporarily store the current value of gs_sflight in gs_4next_addition , before we add it to the total in the next loop pass. This means
that we do the same thing that the output control does with the table line: We buffer the value of this line.
After all table lines have been processed, one last calculation is missing, which we execute in the footer. To make sure that this last addition happens
only at the end of the table output, we enter the appropriate condition in the program lines node. Here, again, we query whether
gs_4next_addition is empty to catch the case that T_SFLIGHT might have no entries.
If you do not want to calculate totals for different currencies or quantity units, use the Calculations tab of the table node (see:
Calculations).
The solution described here refers to
printing old tables. However, it can easily be adapted for the new table node type.
Form
SF_TOTALS in the system illustrates how to print grand totals for different currencies using the old or the new table types. Use application program
SF_TOTALS to call this form.
Prerequisites
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 13 of 25
Procedure
We assume that you are already printing an internal table
T_SFLIGHT of type TABLE OF SFLIGHT . Now we want to print the table sorted by airline and include a subtotal of the price after each airline.
1. Define two global fields for summing:
GT_SUBTOTAL
of type TABLE OF SFLIGHT
GS_SUBTOTAL
of type SFLIGHT
Go to the Data tab of the table node. In the
Sort Criteria group box enter the fields by which you want to sort. In our example, this is the CARRID column. If you already sorted the table before you
passed it to the form, mark Aleady Sorted so that SAP Smart Forms does not have to sort the table again.
Before printing the table lines of an airline carrier, you must clear the summing fields. To do this, mark the checkbox
Event on Sort Begin for the criterion. In the navigation tree ( B) an event node appears whose inferior node you can use to clear the fields at the appropriate
event (program lines node C).
Within the loop calculate the subtotal. To do this, you need another program lines node (E).
To print the subtotal after finishing the items of an airline, mark the checkbox
Event on Sort End of the sort criterion. Another event node ( G) appears in the navigation tree, whose inferior node you can use to print the subtotal.
The facts explained above result in the following form logic:
Form logic for calculating a subtotal according to a criterion
Navigation Tree
Node
Attributes/Contents/Conditio
ns
Loop
:
internal table T_SFLIGHT
INTO GS_SFLIGHT
Sort criteria:
Field name: CARRID
Event on Sort Begin/End:
marked
Output parameters:
C
GT_SUBTOTAL ,
GS_SUBTOTAL .
Program lines:
REFRESH GT_SUBTOTAL.
CLEAR GS_SUBTOTAL.
&GS_SFLIGHT-PRICE&
D
Input parameter
: GS_SFLIGHT
Output parameter :
GT_SUBTOTAL
Program lines :
data: ls_sflight type sflight.
ls_sflight-price = gs_sflightprice.
ls_sflight-currency = gs_sflightcurrency.
collect ls_sflight into gt_subtotal.
&GS_SFLIGHT-CURRENCY&
F
CARRID End of sort level
G
Loop
:
internal table GT_SUBTOTAL
INTO GS_SUBTOTAL
&GS_SUBTOTAL-PRICE&
I
J
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
&GS_SUBTOTALCURRENCY&
Page 14 of 25
Result
The subtotal (for each airline carrier) is printed before a break in the sort level.
Client-Independency
SAP Smart Forms and Smart Styles are client-independent objects.
Translating Texts
SAP Smart Forms and Smart Styles take part in the usual translation process for development objects. The transport objects SSFO and SSST are known to
the translation tools and appear in the relevant worklists. For a Smart Form, you can translate the following texts:
All long texts of nodes
The contents of all text nodes
To translate these texts, use the general procedures for translating long texts.
Standard Forms
Depending on the applications of the SAP System in which you want to use SAP Smart Forms, a number of standard forms is provided. Customers can adapt
any of these forms to their special requirements. However, since the system does not log modifications to the standard forms, the customers should copy the
standard form, modify this copy, and then link it to the application. This procedure prevents the loss of the modified data when, during an upgrade, an updated
version of the standard form is transferred.
Overview
From the function module's point of view there are import (kind K=
I ) and export parameters (kind K= E ):
Parameter Name
Type
Description
ARCHIVE_INDEX
TOA_DARA
ARCHIVE_INDEX_TAB
TSFDARA
ARCHIVE_PARAMETERS
ARC_PARAMS
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 15 of 25
CONTROL_PARAMETERS
SSFCTRLOP
MAIL_APPL_OBJ
SWOTOBJID
MAIL_RECIPIENT
SWOTOBJID
MAIL_SENDER
SWOTOBJID
OUTPUT_OPTIONS
SSFCOMPOP
USER_SETTINGS
TDBOOL
DOCUMENT_OUTPUT_INFO
SSFCRESPD
JOB_OUTPUT_INFO
SSFCRESCL
After
form output you can use this structure
to query which actions produced
which results (see: Querying the
Output Result)
JOB_OUTPUT_OPTIONS
SSFCRESOP
Parameter Name
Value
(
Import Parameters)
USER_SETTINGS
'X'
Control Structure
DEVICE
'PRINTER'
LANGU
(Logon language)
TDSCHEDULE
TDSENDDATE
TDSENDTIME
TDARMOD
'1'
(Print only)
TDTITLE
'Print:'
TDNOARCH
'X'
TDDATASET
'SMART'
TDSUFFIX1
Output Options
( Options for Fax Output)
Output Options
Spool Settings
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 16 of 25
settings)
TDSUFFIX2
(Logged user)
TDDEST
TDPRINTER
RQPOSNAME
TDIMMED
TDDELETE
TDLIFETIME
'8'
TDCOPIES
Component Type
Data Type(Length)
Description
NO_OPEN
TDSFFLAG
CHAR(1)
NO_CLOSE
TDSFFLAG
CHAR(1)
DEVICE
TDDEVICE
CHAR(8)
NO_DIALOG
TDSFFLAG
CHAR(1)
PREVIEW
TDPREVIEW
CHAR(1)
If you specified
NO_DIALOG='X' , you can set this parameter to at
least branch to the print preview.
GETOTF
TDGETOTF
CHAR(1)
LANGU
TDSPRAS
LANG(1)
REPLANGU1
TDSPRAS
LANG(1)
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 17 of 25
REPLANGU2
TDSPRAS
LANG(1)
REPLANGU3
TDSPRAS
LANG(1)
STARTPAGE
TDOBJNAME
CHAR(30)
The
URLCALL parameter is used internally only.
Standard output
XSFCMODE = 'X'.
XSF = SPACE.
XDFCMODE = 'X'.
XDF = SPACE.
(OTF)
XSF
XSFCMODE = 'X'.
XSF = 'X'.
XDFCMODE = SPACE.
XSF+HTML
XSFCMODE = 'X'.
XSF = 'X'.
XSFFORMAT = 'X'.
XDFCMODE = SPACE.
XDF
XDFCMODE = 'X'.
XDF = 'X'.
XSFCMODE = SPACE.
After you have overriden the output format, SAP Smart Forms ignores all other static settings in the form as well. The table below shows which parameters
match which input fields in the Output box of the form attributes:
Matching Parameters for Static Attributes
Output Format
XSF
Output mode
(for XDFOUTMODE='S')
XSFOUTMODE ('S'|'A')
Output device
XSFOUTDEV
Output mode
XSFOUTMODE ('A')
XSF+HTML
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 18 of 25
XDF
BSP page/URL
XSFACTION
Output mode
XDFOUTMODE ('S'|'A')
Output mode
(for XDFOUTMODE='S')
XDFOUTDEV
The default setting for the output format in the form is Standard Output (OTF) . For more information about the parameters for this
case, see
Default Settings (Standard Output).
Component Type
Data Type(Length)
Description
TDTELELAND
LAND1
CHAR(3)
TDTELENUM
SKTELNR
CHAR(30)
TDTELENUME
SKTELNR
CHAR(30)
TDFAXUSER
SO_USR_NAM
CHAR(12)
FAXFORMAT
CHAR3
CHAR(3)
TDSCHEDULE
SKSCHEDULE
CHAR(3)
TDSENDDATE
SKDATE
CHAR(8)
TDSENDTIME
SKTIME
CHAR(6)
'IMM': immediately
'NIG': at night
Component Type
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Description
Page 19 of 25
Data Type(Length)
TDARMOD
SYARMOD
CHAR(1)
TDNOARMCH
TDNOARMCH
CHAR(1)
TDARCCOP
TDARCCOP
CHAR(1)
Parameter Name
Component Type
Data Type(Length)
Description
TDTITLE
TDTITLE
CHAR(50)
TDNOPREV
TDNOPREV
CHAR(1)
TDNOPRINT
TDNOPRINT
CHAR(1)
TDNOARCH
TDNOARCH
CHAR(1)
TDIEXIT
TDIMMEXIT
CHAR(1)
See also:
Archiving.
Options for Print Preview
Component Type
Data Type(Length)
Description
TDDATASET
RSPO0NAME
CHAR(6)
TDSUFFIX1
RSPO1NAME
CHAR(4)
TDSUFFIX2
RSPO2NAME
CHAR(12)
TDCOVTITLE
SYPRTXT
CHAR(68)
Parameter Name
Component Type
Data Type(Length)
Description
TDDEST
RSPOPNAME
CHAR(4)
TDPRINTER
RSPOPTYPE
CHAR(8)
RQPOSNAME
RSPOPRNAME
CHAR(50)
If the
USER_SETTINGS parameter of the control
structure is set, these parameters are ignored.
TDNEWID
SYPRNEW
CHAR(1)
TDIMMED
SYPRIMM
CHAR(1)
TDDELETE
SYPRREL
CHAR(1)
TDFINAL
RSPOFINAL
CHAR(1)
TDNEWID
: New Spool Request
TDIMMED
: Print Immediately
TDDELETE
: Delete after Printing
TDFINAL
: Spool Request Completed
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 20 of 25
If the
USER_SETTINGS parameter of the control
structure is set, the TDIMMED and TDDELETE
parameters are ignored.
TDLIFETIME
SYPEXPI
CHAR(1)
TDAUTORITY
SYPRBER
CHAR(12)
Parameter Name
Component Type
Data Type(Length)
Description
TDCOVER
SYPRSAP
CHAR(1)
SPACE
: no cover page is printed
'X'
: cover page is printed
'D'
: default (printer setting)
TDRECEIVER
SYPRREC
CHAR(12)
TDDIVISION
SYPRABT
CHAR(12)
Parameter Name
Component Type
Data Type(Length)
Description
TDCOPIES
TDSFCOPIES
NUMC(3)
TDGROUP
TDGROUP
CHAR(1)
TDPAGESLCT
TDPAGESLCT
CHAR(60)
Component Type
Data Type(Length)
Description
XSFCMODE
SSFXSFCMOD
CHAR(1)
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 21 of 25
SSFXSF
CHAR(1)
If set and if
XSFCMODE = 'X' (see above), the generated
output is XSF, otherwise it is OTF or XDF. You
cannot have more than one output format at the
same time. For an output in HTML format, XSF
output must have been activated.
XSFOUTMODE
SSFXSFOMOD
CHAR(1)
RSPOPNAME
CHAR(4)
Prerequisite:
XSFOUTMODE = 'S'.
Determines the output device in the spool (usually
a printer name of type
XSF). If TDDEST is filled as well, the system
ignores XSFOUTDEV.
XSFOUTDEV
XSFOUTMODE=A
(Application): You get XSF output using the export
parameter JOB_OUTPUT_INFO-XMLOUTPUTXSFDATA.
XSFOUTMODE=S
(Spool): SAP Smart Forms creates a spool request
for XSF output and returns its ID using the export
parameter JOB_OUTPUT_INFO-SPOOLIDS.
See:
Querying the Output Result.
Component Type
Data Type(Length)
Description
XSFFORMAT
SSFXSFFRMT
CHAR(1)
Prerequisite:
XSFOUTMODE = 'A'.
If set, SAP Smart Forms uses an XSLT program to
create CSS and HTML output, in addition to XSF.
The CSS style sheet is embedded in the HTML
output. See:
Output in HTML Format and XML/HTML Output
Structure.
XSFACTION
SSFACTION
CHAR(255)
Prerequisite:
XSFFORMAT = 'X'.
Determines the URL to which you want to pass the
values of the HTML form. See also:
Evaluating Form Input.
Component Type
Data Type(Length)
Description
XDFCMODE
SSFXDFCMOD
CHAR(1)
XDF
SSFXDF
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
If set and if
Page 22 of 25
CHAR(1)
XDFOUTMODE
XDFOUTDEV
SSFXDFOMOD
CHAR(1)
RSPOPNAME
CHAR(4)
XSFOUTMODE=A
(Application): You get XDF output using the export
parameter JOB_OUTPUT_INFO-XMLOUTPUTXSFDATA (this is not a typing error!).
XSFOUTMODE=S
(Spool): SAP Smart Forms creates a spool request
for XDF output and returns its ID using the export
parameter JOB_OUTPUT_INFO-SPOOLIDS.
For XDF output, SAP Smart Forms creates a spool
request and returns its ID using the export
parameter
JOB_OUTPUT_INFO-SPOOLIDS.
See:
Querying the Output Result.
Component Type
Data Type(Length)
Description
OUTPUTDONE
TDOUTDONE
CHAR(1)
ARCHDONE
TDARCDONE
CHAR(1)
USEREXIT
TDEDEXIT
CHAR(1)
TDFORMS
TDSFFORMS
NUMC(5)
TDNEWID
SYPRNEW
CHAR(1)
SPOOLIDS
TSFSPOOLID
FAXIDS
TSFFAXID
MAILIDS
TSFMAILID
OTFDATA
TSFOTF
XMLOUTPUT
SSFXMLOUT
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
'B'
: Back button (green arrow)
'E'
: Exit button (yellow arrow)
'C'
: Cancel button (red cross)
SPACE
: Other function
Page 23 of 25
Overview
Components
XML Output Structure
Structure XMLOUTPUT (Type: SSFXMLOUT)
Parameter Name
Component Type
Data Type(Length)
Description
XSFDATA
TSFIXML
Table of
RAW(1024)
XSFLENGTH
TDIXMLLEN
INT4(10)
XSFTYPE
SFHTTPTYPE
STRING
XSFDOCPTR
SSFDOCPTR
Ref To
IF_IXML_DOCUMENT
STSHEET
SSFSTYLS
TRFRESULT
TRFRESULT
Component Type
Data Type(Length)
Description
FMTNAME
STRING
FMTTYPE
SFHTTPTYPE
STRING
FMTCONTENT
TSFSTBODY
Table of
STRING
FMTLENGTH
TDIXMLLEN
INT4(10)
Component Type
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Description
Page 24 of 25
Data Type(Length)
TYPE
SFHTTPTYPE
STRING
CONTENT
TSFIXML
TABLE OF
RAW(1024)
LENGTH
TDIXMLLEN
INT4(10)
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 25 of 25