Smart Forms Interview Questions and Answers
Smart Forms Interview Questions and Answers
SAP Smartform is a graphical user interface tool to create and maintain forms. SAP Smart Forms
supports printer, fax, e-mail or internet (XML) as its output medium.
SAP Smartform is a tool for the maintenance of forms on which application data from the SAP
system can be output. Depending on the application, the number of forms to be printed can be
very high, and they might have to be printed in a short period of time, in a mass printing.
Examples of mass printing are monthly invoices sent by telecom companies or salary statements.
Transaction Code to create and maintain forms is SMARTFORMS.
2. What Are The Differences Between SAP Scripts & Smartforms?
Differences between SAP Scripts and Smart Forms are:
Smart Forms are client independent and SAP Scripts are client dependent.
Multiple page formats are possible in Smart Forms which is not the case in SAP Scripts.
It is possible to have a Smart Form without a main window where as you create a SAP
Script without a main window.
Smart Forms generates a function module when activated, which is not the case with SAP
Scripts.
SAP Scripts require a driver program to display the output whereas in Smart Forms the
form routines can be written so that it is standalone.
An integrated Form Builder helps to design Smart Forms more easily than SAP Scripts.
A Table Painter and Smart Styles to assist in building up the Smart Forms which is not
available in SAP Scripts.
Smart Forms generates XML output which can be viewed through the web.
Main Window
Secondary Window
Copies Window
Final Window
Tables are used to print dynamic data which is not known before the application program
runtime. Example: Material list Of Purchase orders.
Tables node to be used only in main window and no such fixed height can be set for table
rows.
Global Settings --> Form Attributes -->Output Options tab --> Style.
14. Why SAP Scripts Are Client Dependent & Smartforms Are Client Independent?
Smart Forms create its own function module so it doesnt need to transport the request
through SCC1. As all the Development Object are stored in client independent tables.
Whereas SAP Script doesnt generate any function module while executing so we need to
transport the request number through SCC1. Sap Script is stored inside the client dependent
table as a TEXT. So SAP Scripts are client dependent and Smart Forms are client independent.
15. A SAP R/3 System Has 2 Clients 100 & 110. You Create An SAP Script Z_Script & A
Smartform Z_Smartform In Client 100. Will Both Z_Script & Z_Smartform Be Available
In Client 110 As Well?
Client 110 will have just the Smartform Z_Smartform and not the SAP Script Z_Script. SAPScript is client dependent whereas SMARTFORM is client independent. One will have to
manually import the SAP Script to 110 through SCC1 transaction in SAP.
16. How Do You Find The Name Of The Function Module For A Smartform? When Is This
Function Module Created?
The function module for Smartform is created when the Smartform is activated. You can
find the name of the Function Module for a Smartform by going to Environment --> Function
Module Name.
17. You Have Created A Smartform In Development Server. Then You Transported The
Smartform To Production Server. Will The Name Of The Function Module Be Same In
Both The Servers?
The Smart Form that is created in the Development may not have the same name in the
Production server. So it is always advised to use the Function Module
'SSF_FUNCTION_MODULE_NAME' to get the Function Module name by passing the
Smartform name.
DATA: fm_name TYPE rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMARTFORM'
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
others = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION fm_name
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
Download the PDF file version of the spool by running Program RSTXPDFT4 and
entering the noted spool number.
Here is one more and probably the easiest way to see PDF output for a Smartform.
Type PDF! In the command prompt and hit enter button.
23. How Can I Make The Smartforms To Choose A Printer Name By Default?
In the CALL FUNCTION of the Smartform Function Module (CALL FUNCTION fm_name ),
set the output options parameter to set the printer name. The output option is of the type
SSFCOMPOP which contains the field TDDEST. Set the TDDEST field to your default
printer name.
For Example:
OUTPUT_OPTIONS-TDDEST = 'Printer Name'.
24. How Can I Make The Smartforms To Display A Print Preview By Default Without
Displaying The Popup For Print Parameters?
In the CALL FUNCTION of the Smartform Function Module (CALL FUNCTION
fm_name ), set the Output Options and Control Parameters as mentioned below:
control_options-preview = 'X'. " Print Preview
control_options -no_open = 'X'.
control_options -no_close = 'X'.
control_options -no_dialog = 'X'.
control_options -device = 'PRINTER'.
output_options-TDDEST = 'PRINTER NAME'. "Spool: Output Device
output_options-TDNOPRINT = 'X'. "No printing from print preview
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_formname
IMPORTING
fm_name = lf_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
CALL FUNCTION LF_FM_NAME
EXPORTING
CONTROL_PARAMETERS = control_options
OUTPUT_OPTIONS = output_options
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
25. How Can I Display The Total Number Of Pages In Smartforms?
Use SFSY-FORMPAGES to display the total number of pages in the Smartforms
&SFSY-DATE& : Date
&SFSY-TIME& : Time
&SFSY-USERNAME& : Username
26. Sometimes While Using The Variable SFSY-FORMPAGES Or SFSY-PAGE, You Get A
Star '*' Instead Of The Total Number Of Pages Or Current Page Number. How To Resolve
Such Issues?
There may not be enough space in the window to display the variable, either increase the
window dimensions or condense the spaces using &SFSY-FORMPAGES(C)& or using &SFSYFORMPAGES(ZC)& or using &SFSY-FORMPAGES(4ZC)&.
Here
'4' reserves a four character wide output. (It can be set to any value.)
'Z' eliminates the leading zeroes.
In case if you the address number or the person number is already known, then we just we
need to maintain the values in the options given in the address node.
In case if you are fetching the address number or the person number dynamically or during
run time, you can achieve it by passing the variable as shown below:
29. What Is The Concept Of Page Protection In Smart Forms? How Do You Achieve Page
Protection In Smart Forms?
Page Protection is used to avoid displaying the broken contents of the page and allow it to
display in the new page from the beginning after the previous page.
Page Protection attribute is to be used to determine whether or not to display a paragraph
completely on one page. Mark it if you want to avoid that a paragraph is split up by a page
break. If on the current page (only in the main window) there is not enough space left for the
paragraph, the entire paragraph appears on the next page.
While one can use the PROTECT ..... ENDPROTECT command for SAP-Scripts, for Smart
Forms the Page-Protection checkbox can be used to ensure page protection.
Note: You have Page-protection property only for Text Elements in the Main Window.
30. Can You Move A Smartform From One SAP System To Another Without Using
Transports?
Yes, this can be achieved using the Upload/Download feature for Smartforms. One can download
the Smartform from one system and save it as an XML file. Once that is done, the XML file can
be used to upload the Smartform in another system.
31. Why Pages & Windows Node Are Required Or Mandatory While Creating A Smart
Form?
The Page represents the layout of the Page that is printed on and the items to be printed on the
Page are contained in Windows. The page together with the windows defined on the page
determines how the print will appear and the contents of the print.
32. How Can You Find The Generated Function Module Name For A Smart Form?
First activate the Smart Form. Go to Environment -> Function Module Name and get the
automatically generated function module for the Smart Form.
33. How Do You Debug A Smart Form?
By Putting a break point on the generated function module of the Smartform, one can debug it.
For more information, Refer the link mentioned below.
http://wiki.scn.sap.com/wiki/display/ABAP/Easy+Step+To+Debug+a+Smartform
34. What Are The Different Auxiliary Nodes Available In Smart Form?
Auxiliary nodes help to control and format the print but do not print any contents by themselves.
Following are the different auxiliary nodes available in Smart Form:
Table: Output of a table containing application/dynamic data.
Template: output of a table containing static data.
Include Text
Dynamic Text
36. What Are Text Modules In Smart Forms? What Are The Advantages Of Using Text
Module?
A Text Module acts as some sort of container of text, which makes reuse of text easier.
There are texts that frequently appear in different forms. Text Modules can be used to store
these texts centrally in the system. This detaches text maintenance from form maintenance, with
the result that there will be no need to call the Form Builder to edit individual texts.
Text modules can be maintained using smartforms transaction. The text module is
maintained exactly like the Text element. Text literals as well as fields can be written in the text
module. Fields of the Text module take values from the Smart Form from which it is called.
Since a Text Module is a separate entity, it has its own Management (Attributes) screen.
The main advantages of using a Text module are:
Central storage and maintenance of texts: Commonly used texts like Terms and
Conditions, Address line on footer, etc. do not have to be typed and maintained on every
Smart Form being made. Also, changes made to the text at one place can be cascaded to
all Forms where it is used if the Copy option is not used.
Language specific maintenance: Text modules can be maintained in different
languages. Thus, by referring to the same Text module name, Smart Forms in different
languages pick up the text of the corresponding language.
Client independence: This is an advantage over Include texts that are client dependent.
Can be assigned to CTS: An advantage over Standard Texts that are not assigned to a
Transport System by default.
Command Nodes can be used to achieve page break. By using Command Node, one
can manually control the numbers of records to be displayed per page based on some
condition.
For More information, Refer the link mentioned below:
http://www.saptechnical.com/Tutorials/Smartforms/Command/Page3.htm
38. Can One Restrict The Translations Of Smart form To Specific Languages?
Yes, one can restrict the translations of Smart forms to specific languages by creating a
super set of languages for which you want to allow the translations. Go to form
Attributes --> General Attributes --> Language Attributes --> Into Selected
Language.
Select all the languages for which you want the translation to happen.
39. How Can You Translate A Smart Form From One Language To Another?
In smart forms, if you want a user to see the text in other languages (other than language
in which smart form is created) , in Global settings ,we need to select radio button Into
Selected languages and maintain the Translations in that particular language using SE63.
There is no other way to automate this process but to maintain translations with
human intervention for selected languages.
In SE63 transaction, Use path Translations -> ABAP objects -> Other Long Text. Click
on Forms and Styles & Select Forms.
Please give object name in CAPITALS. Also select Source and target language from F4
help.
40. How Do You Assign Transport Request To Translations For Smart Forms?
Once you are done with your translation and you want to push the translation to your
target system, you need a transport request. Run the transaction code SLXT or
program RS_LXE_RECORD_TORDER for creation of transport request.
For more information, refer the link mentioned below:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0010d07e-ec5d2e10-72ad-f233bd6a2c4d?quicklink=index&overridelayout=true
SAP Smartform Folder control has the Page Protection attribute which can be used by
SAP Smart Form developers as a switch for keeping items in the same page.
First go to SE73 SAP Script Font Maintenance to create or display the system bar
codes.
Then go to SMARTSTYLES transaction, create a new character format and assign the
barcode name that you have created in it. Then you can use the character format in your
Smartform wherever you want the barcode to be displayed.