0% found this document useful (0 votes)
31 views4 pages

SAP SmartForms: TCode and Design Guide

The document discusses features and steps for designing and printing smart forms in SAP, which are client-independent forms that can include text, images, tables, and business logic. Smart forms allow reusable paragraph and character formats through styles and make it easier to work with structured form data compared to using scripts. The generated function module interface is important for passing form data in the driver program.

Uploaded by

Subodh Kant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views4 pages

SAP SmartForms: TCode and Design Guide

The document discusses features and steps for designing and printing smart forms in SAP, which are client-independent forms that can include text, images, tables, and business logic. Smart forms allow reusable paragraph and character formats through styles and make it easier to work with structured form data compared to using scripts. The generated function module interface is important for passing form data in the driver program.

Uploaded by

Subodh Kant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

TCODE : SmartFormS

Forms—Offer Letter,Invoice(bill) Purchasing Order,Sales order,Debit and Credit Memo.

Forms acts as business Documents with External Parties.

It is the smarter way to work with smartforms.


Other way is scripts.
Features :
(1)Smartforms are client Independent,scripts are client Dependent.
(2) Each page have its own orientation[portrait,Landscape] where as scripts all the pages should have
the page format.
(3) Text can be printed with colors in smartforms.
(4)Data can be printed in Tabular Format.
(5)Paragraph and character formats are reusable.
(6)Back ground pictures can be printed on this page.
(7)Business logic can be implemented at form level if required.
Note: At the time of activating the smartform unique Fucntion Module is generated through which all
the data i.e., required for the entire form can be transferred at once.
In smartforms images can be printed only through Graphic objects.

Steps to design and print on Smartforms:


(a)Execute TCODE : Smartforms
(b) Goto OutPut Options:
Page Format :
Style:
Save .
(c) Global Settings
Form Attributes-Form Name,Desc,Page Format,Style
Form Interface-Function Module Interface.
Global Definitions-Variables,Declared with in Form and can be used through out this form.
(d) Pages and windows:
Main Window
%page1 New Page
To create further pages,windows right click on Page.
(e) To create the text on the windows right click on the window.
Windoe-create new window.
Click on General Attributes-click on editor *ccode : &wa_t001-bukrs
*butxt: &wa_t001-butxt
(f) to print the image(graphic object) on the window.
Right click on page1-crete-graphic
(or) right click on windoe-include graphic.
Name
Object
Id
(g) click on form Painter[f9] for Graphical form Painter.
All the variables used in the form should be known to the form as part of the global definition(or) form
Interface.
Double click on the form Interface:
Par Name Typeassignment Ass type
Wa_t001 type t001

Test(F8).
Fucntion Module is generated./bcdwb/sf00000456.
Test/Execute.

Driver Program—Lab Program.

Importance of FM: SSF_FUNCTION_MODULE_NAME.


In the driver program of any smartform.
Input : Smartform Name
Output: Fm Name.
The Fucntion Module generated for the smartform activation is unique with in the same system and it
can’t be migrated to other environment and the same thing has to be regenerated in the other
environments,and regenerated FM name differs from the actual FM Name.
Instead of sending directly Fm name to quality,So some occurs while regenerated for that purpose use
V_FM.

Printing Data on the Tabular Format in two ways:


Static table:Each row has its own structure and Input is not <itab> can be part of any type ofWindow.
Dynamic Table: All the rows should have the same Same structure.
Input is <itab>.
Should be a part of Main Window,as the number of rows in <itab> are not fixed.

Steps to Create and print the data in template format.


Right Click on the Window-create-template.
In % template1-Click on Select Pattern-Display framed Patterns
Click on Details-Switch to details.
Template :
Name From To Reference Height U 1 U 2 U 3 U….
Write in the tabular Format.
While printing data on the template along with the data to be printed the row and column details
should be provided.
While Printing the data on the template along with the data to be printed the roa and column details
should be provided.
Right click on the template.-create-text.
Go to Output Options---Line:
Column:
Repeat the same for all the Rows and columns.
Right click on the template.-create-text.
Go to Output Options---Line:
Column:
Repeat the same for all the Rows and columns.
Printing Data in Creating and Printing tables:
Right Click on Main Window-Create-Table.
Table contains : Header
Main Area
Footer
Click on Data-Loop at itab into wa.
Right click on Header---Create Table lines
Output table-Line type :
The cells are added automatically.
Header-Row1-cell1,cell2.
Cell1-create text.
Main Area-Different Line type or same Line type.
Footer-- Different Line type or same Line type.
Footer--Different Line type or same Line type.

Driver Program-Lab Program.


Types of windows:
Main Window : is created by default in PAGE1, and the text in the Main Window can be extended to the
next Main Window if available.
Main Window is mandatory in both scripts and smartforms when the same page is called as Next Page.
In Samrtforms the same main window cannot be placed more than once in the same page where as in
scripts the same thing can be placed upto 100 times[main00 main01…..main99].
Without Main Window we can’t extended to Next Page.
Secondary Window: is a default type of window[similar to the Variable Window].
Copies Window: can be printed either only on original orCopies or both.
Printing: Output device—No of Copies-3 1st-Original 2nd 3rd –Copies.
Final Window: It can be used only the Final values of the respective page.i.e., the values after printing
the page completely.

Smart Style :
Is the known for the reusable Paragraph and Reusable Formats.
The default type is System.

Steps to create the style:


Go to Smartforms-Click on Style-z<style>--Create.
Click on the Paragraph Format-create Node—Paragraph format-P1.
P Format:p1
Description
Click on font:
Font family :
Font Size:
Font style:
Paragraph Format:P2
Descry
Font family
F size
F style
Character Format:
Create Node: Char Format:C1-enter
Standard Settings/Font.

Make sure that the standard Parameter Format[default paragraph format] is provided before activating
the logic.
Form Attributes-Output options-style-Zstyle Name
Now these style names can be used either at the form level or at the text element level.
Window-Text element-Editor-

Common questions

Powered by AI

Smart Style enhances text formatting consistency across SmartForms by allowing predefined settings for paragraphs and characters to be applied universally within forms. Typically features include paragraph formats specifying font family, size, style, and default settings, as well as character formats for additional text stylization. These reusable formats ensure uniformity in document appearance, simplify maintenance, and reduce errors, thereby providing a professional and consistent look throughout SmartForms .

SmartForms allow text to be printed in color and enable the inclusion of background pictures using graphic objects. However, images can only be printed through graphic objects and require precise handling within the form design process .

The function module generated for SmartForms activation is unique within the same system and cannot be directly migrated to other environments. Each environment requires a regenerated function module, which results in a different module name than the original. To handle function module regeneration issues across environments, VF_FM is used instead of sending the function module name directly to quality to circumvent errors during regeneration .

Creating a style in SmartForms involves navigating to the Smartforms interface, selecting the Style option, and then creating a new style with z<style> as a convention. Within this style, nodes for paragraph formats (to define font, size, and style) and character formats are established. These steps ensure consistency in text appearance across the form and influence the form's output by standardizing paragraph and text element appearance, ensuring cohesive document presentation .

SmartForms consists of several window types: Main Window, Secondary Window, Copies Window, and Final Window. The Main Window is mandatory and allows text continuation across pages but cannot be repeated on the same page. The Secondary Window serves as an additional text area, while the Copies Window manages copies printing, determining settings for originals and duplicates. The Final Window calculates and displays final page values after full page printing. Each window type has specific use cases, with the Main Window being a core element for document flow .

In SmartForms, the Main Window is crucial as it is mandatory when calling the same page as the next page, and it can link text across multiple pages. Unlike scripts, the same Main Window cannot be placed more than once on the same page, offering less flexibility than scripts where a main window can appear up to 100 times on a single page. Without a Main Window, SmartForms cannot extend to additional pages, making it a vital component for multi-page documents .

Dynamic tables in SmartForms are designed to handle variable data row counts by requiring all rows to have the same structure. The input data must be of type <itab>, and dynamic tables are typically part of the Main Window, allowing them to adjust to the number of elements flexibly. This contrasts with static tables where each row has a defined structure .

Static tables in SmartForms manage tabular data by defining a fixed structure where each row is pre-defined, allowing parts of any type of window to contain structured data. In contrast, dynamic tables manage tabular data where the number of rows isn't fixed, necessitating that all rows share the same structure and making them a part of the Main Window. This flexibility allows dynamic tables to expand according to the data but requires specific handling in the Main Window to adapt effectively .

SmartForms are client-independent, while scripts are client-dependent. Each page in SmartForms can have its own orientation, such as portrait or landscape, whereas in scripts, all pages must follow the same page format .

Reusable paragraph and character formats, known as Smart Style in SmartForms, allow designers to define standard formatting that can be consistently applied across different form elements. They facilitate consistency and ease of updates across documents. These formats are implemented by creating nodes for paragraph and character formats under Smart Style, allowing specific settings such as font family, size, and style to be reused within or across forms .

You might also like