Vous êtes sur la page 1sur 5

SAP ABAP Interview Questions Part 3 : Smartforms

Welcome to yet another post on ABAP interview questions. Here I have complied
a list of interview questions on Smartforms in SAP. This list is quite
comprehensive. Hope you find it useful. Cheers !!
Smartform is SAP's print form technology and is an alternative to SAP-Scripts.
Whenever you activate a Smartform , a function module is generated for that
Smartform. The program that calls this function module is called the Driver
Program for Smartform. The T.code for Smartforms is SMARTFORMS.
Unlike SAP-Scripts, Smartforms are client independent.
Here we go:
*An SAP R/3 system has 2 clients 800 & 810. You create an SAP Script
Z_Script and a Smartform Z_Smartform in client 800. Will both Z_Script
and Z_Smartform be available in client 810 as well?
Client 200 will have just the Smartform Z_Smartform and not the SAP Script
Z_Script.
SAP-Script is client dependent whereas SMARTFORM is client independent. Many
people don't understand what this is all about. The above answer should suffice.
However, if you still do not understand this, find an SAP system where you have
2 clients. Create a dummy Smartform / script in one client and check whether
they exist in the other client.
*You have created a Smartform in DEV environment. Then you migrated
the Smartform to PROD environment. Will the name of the function
module be same in DEV and PROD?
Once you transport the Smartform from DEV to PROD environment, a new
function module name for the Smartform in generated in the PROD
environment. For a particular Smartform , generated function module names are
different in different systems.One can get the name of the function module for
Smartform by passing the Smartform name to FM
SSF_FUNCTION_MODULE_NAME.
Hence in the driver program for Smartform, it is common practice to use FM
SSF_FUNCTION_MODULE_NAME and then calling the Smartform Function Module.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_SMARTFORM'
IMPORTING
fm_name = lv_fm_name
CALL FUNCTION lv_fm_name

*How do you convert a Smartform Output to PDF output?


There is a tricky solution here.But let's keep that for the last. Let us first discuss
the conventional way of getting a PDF output for Smartform. For that you need
to keep in mind the following two function modules and their
importing/exporting parameters:
CONVERT_OTF
CONVERT_OTF_2_PDF
In the Driver program, import the parameter 'job_output_info' from the
Smartform FM and utilize that info in 'OTF' parameter of the two aforementioned
function modules.
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 :).

To see the Smartform Print Preview output as list output,


Type SLIS in the command prompt and hit enter.

*How do you achieve Bar Code printing in Smartforms?


Step1: Use SE73 i.e. SAP-Script Font Maintenance and create a Bar code say
ZDEMO.
Step 2: For Smartform, create a character format C1 and use the recently created
Barcode ZDEMO.

It can be finally used to print Barcode as:

How do you add a Watermark Or a Background Image for Smartforms ?


If you go to the properties of a page in Smartform, you will find a tab for Background
Image.
Specify the source of the image you need here and it can be used as background
image / Watermark in Smartforms.
Graphics can be maintained using T.code SE78.

How will you print on both sided of a Smartform?


At the Page level in Smartforms, you can find something called as Print Mode.

Set the Print mode to duplex to print on both sides of the Smartform.

What is the difference in a Table and a Template in Smartform?


A Template has fixed number of Rows and Columns whereas a Table can have
variable rows and columns i.e. you can have a internal table with contents
associated to a Table element but not to a Template.
You should use a template when the tabular output is fixed!
How do you achieve Page Protection in Smartform ?
While one can use the PROTECT ..... ENDPROTECT command for SAP-Scripts, for
Smartforms 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.
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.

Can you have a Smartform without a main window?


Yes, you can create a Smartform without a Main Window. But there is no need to do
anything of such sort.
Whenever you create a Smartform, a main window is created by default. I can't
think of a situation , where you will have a situation in which it is mandatory for you
to remove the Main Window. But still I have seen this question in ABAP interviews.
So I have put it here.
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.
What is a Copies Window?
What is a Final Window?
Final Window is called after all the other windows are called in a Smartform.
How do you pass data to Smartforms from the driver program?
How do you Debug Smartforms ?
How would you go about printing a logo in a Smartform?
How do you print address number in Smartforms ?
How do you print Symbols and Icons in Smartforms?
What are Basic Nodes and Auxiliary Nodes ?
What is the use of Folder in Smartforms ?

Vous aimerez peut-être aussi