SAP Smart Forms Interview Questions & Answers

4 avg. rating (80% score) - 1 votes

SAP Smart Forms Interview Questions & Answers

Do you like to switch your career? Here's our recommendation on the important things to need to prepare for the job interview to achieve your career goals in an easy way. SAP Smart Forms is used in creating and maintaining forms for mass printing. They are very much simple and easier to develop, maintain and transport when compared to SAP script. Candidate should have good command on all activities to be done. There is huge demand for jobs related to SAP Smart Forms anywhere. One can check the availability of the job across cities including Mumbai, Delhi, Bangalore, Pune and Hyderabad. Follow Wisdomjobs page for SAP Smart Forms job interview questions and answers page to get through your job interview successfully.

SAP Smart Forms Interview Questions

SAP Smart Forms Interview Questions
    1. Question 1. Forcing A Page Break Within Table Loop?

      Answer :

      Create a loop around the table. Put a Command node before the table in the loop that forces a NEWPAGE on whatever condition you want. Then only loop through a subset of the internal table (based on the conditions in the Command node) of the elements in the Table node.

    2. Question 2. Font Style And Font Size?

      Answer :

      Goto Transaction SMARTSTYLES.

      There you can create Paragraph formats etc just like in sapscript.

      Then in your window under OUTPUT OPTIONS you include this SMARTSTYLE and use the Paragraph and character formats.

    3. Question 3. Line In Smartform?

      Answer :

      Either you can use a window that takes up the width of your page and only has a height of 1 mm.

      Then you put a frame around it (in window output options).

      Thus you have drawn a box but it looks like a line.

      Or you can just draw "__" accross the page and play with the fonts so that it joins each UNDER_SCORE.

    4. Question 4. Difference Between 'forminterface' And 'global Definitions' In Global Settings Of Smart Forms

      Answer :

      The Difference is as follows.

      To put it very simply:

      Form Interface is where you declare what must be passed in and out of the smartform (in from the print program to the smartform and out from the smartform to the print program).

      Global defs. is where you declare data to be used within the smartform on a global scope.

      ie: anything you declare here can be used in any other node in the form.

    5. Question 5. Smartforms Function Module Name?

      Answer :

      Once you have activated the smartform, go to the environment -> function module name. There you can get the name of funtion module name.

      The key thing is the program that calls it. for instance, the invoice SMARTFORM LB_BIL_INVOICE is ran by the program RLB_INVOICE.

      This program uses another FM to determine the name of the FM to use itself. The key thing is that when it calls this FM (using a variable to store the actual name), that the parameters match the paramters in your smartform.

      Another thing to note is that the FM name will change wherever the SF is transported to.

      So you need to use the FM to determine the name of the SF.

      Here is the code that can be use to determine the internal name of the function module:

      Code:

      if sf_label(1) <> '/'. " need to resolve by name
      move sf_label to externalname.
      call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
      formname = externalname
      importing
      fm_name = internalname
      exceptions
      no_form = 1
      no_function_module = 2
      others = 3.
      if sy-subrc <> 0.
      message 'e427'.
      endif.
      move internalname to sf_label.
      endif.

      It checks to see if the sf_label starts with a '/', which is how the internal names start. if it does, the name has already been converted. If not, it calls the FM and converts the name.

      You would then CALL FUNCTION sf_label.

    6. Question 6. Smartforms Output Difference?

      Answer :

      Problem with Smartforms: in a certain form for two differently configured printers, there seem to be a difference in the output of characters per inch (the distance between characters which gives a layout problem - text in two lines instead of one.

      It happens when the two printers having different Printer Controls' if you go to SPAD Menu (Spool Administrator Menu) you can see the difference in the Printer Control and if you make the Printer control setting for both the printers as same. then it will be ok. and also u have to check what is the device type used for both the output devices.

    7. Question 7. Smartforms Output To Pdf?

      Answer :

      There is a way to download smartform in PDF format.

      Please do the following:

      1. Print the smartform to the spool.
      2. Note the spool number.
      3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4 and entering the noted spool number.

    8. Question 8. How Does One Transport Smartform? Se01?how Do You Make Sure That Both, The Smartform & It's Function Module Gets Transported? Or Does The Fm With Same Name Gets Generated Automatically In The Transported Client?

      Answer :

      A smartform is transported no differently than any other object. if it is assigned to a development class that is atteched to a transport layer, it will be transported.

      The definition is transported, and when called, the function module is regenerated.

      This leads to an interetsing situation. On the new machine, it is very likely the function module name will be different than the name on the source system. Make sure, before you call the function module, you resolve the external name to the internal name using the 'SSF_FUNCTION_MODULE_NAME' function module.

      Typically, generate the SF, then use the pattern to being in the interface. Then change the call function to use the name you get back from the above function module.

      Smartforms: protect lines in main window.

    9. Question 9. How To Protect Lines In The Main Window From Splitting Between Pages?

      Answer :

      It was easy with SAPscript, but how to do it with SF's. For 4.7 version if you are using tables, there are two options for protection against line break:

      • You can protect a line type against page break.
      • You can protect several table lines against page break for output in the main area.

    10. Question 10. Protection Against Page Break For Line Types?

      Answer :

      • Double-click on your table node and choose the Table tab page.
      • Switch to the detail view by choosing the Details pushbutton.
      • Set the Protection against page break checkbox in the table for the relevant line type. Table lines that use this line type are output on one page.

    11. Question 11. Protection Against Page Break For Several Table Lines?

      Answer :

      • Expand the main area of your table node in the navigation tree.
      • Insert a file node for the table lines to be protected in the main area.
      • If you have already created table lines in the main area, you can put the lines that you want to protect again page break under the file using Drag&Drop. Otherwise, create the table lines as subnodes of the file.
      • Choose the Output Options tab page of the file node and set the Page Protection option. All table lines that are in the file with the Page Protection option set are output on one page.

    12. Question 12. What Are Smart Forms In Sap System?

      Answer :

      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.

    13. Question 13. What Are The Differences Between Sap Scripts & Smartforms?

      Answer :

      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.

    14. Question 14. How Many Main Windows Can We Have In A Smartform?

      Answer :

      Unlike SAP Scripts, in Smart Forms you can have only one main window. And that too its width should be same in all the pages whereas height can be varied. Only one main window per smartforms is allowed but you can have 99 sub-windows.

      Main Window - Smartforms – Only 1

      Main Window – SAP Scripts - 99

    15. Question 15. Is It Mandatory To Have A Main Window In Smartforms?

      Answer :

      It is possible to create Smartforms without a main window also. In case, confirmation of a mail to client or customer is required there is no need of main window, this can be achieved or done through smartforms without main window.

    16. Question 16. What Are The Types Of Windows Available In Smartforms?

      Answer :

      Four Types of windows available in Smart Forms. They are:

      • Main Window
      • Secondary Window
      • Copies Window
      • Final Window

    17. Question 17. Explain The Significance Of Main Window?

      Answer :

      Basically, we use main window when there is a need to display text or data which can cover several pages. Say there is a requirement to display data of all the rows of a table (a table in which you are not very sure as to how many row it has), in such cases we always use main windows.

      As soon as a main window is completely filled with text/data, the system continues to display the text/data in the main window of the next page. It automatically triggers the page break.

      Only one window can be defined in a form as main window. The main window can be called in other pages of the form but it must have the same width on each page, but can differ in height.

      A page without main window must not call itself as next page, since this would trigger an endless loop. In such a case, the system automatically terminates after three pages.

    18. Question 18. Explain The Significance Of Secondary Window?

      Answer :

      Basically, secondary window is used to display text or data output with a fixed length.

      Secondary windows are used when there is a need to display text and data in a predetermined output area. There is no flow text display with page break. 

      If we position a secondary window with the same name on several pages, the system displays the contents of this secondary window on each page.

      Text & data that do not fit into the secondary window are truncated and not displayed.

    19. Question 19. Explain The Significance Of Copies Window?

      Answer :

      Basically, Copies Window is a special type of secondary window for making pages as copy or original. This window type is used to output data either on original, or on copies, or both.

      In simple words, Copies window is to be used when there is a requirement to print copies of the pages.

      Copies window is used to define an output area for the print output, whose content you want to appear either only on the copy or only on the original. This allows you to flag copies as copies when the form is printed.

    20. Question 20. Explain The Significance Of Final Window?

      Answer :

      Final window is to be used where there is a requirement to show/display details that has to be processed only at the end of the form processing.

      The windows in a page are processed from top to bottom. So the execution first skips all the Final windows and completes the processing of other windows. Once all the non-final windows are processed, the Final windows are processed from top to bottom. 

      For example if there is a requirement to display the total value of all the items on the first page but the total value is known only at the end of the form processing, we can use the Final window for displaying the total value. The sum of line items is calculated in the MAIN window.

    21. Question 21. What Is The Difference Between Tables & Template Node?

      Answer :

      Template contains a fixed number of rows and columns, where the output is fixed where as a table can have variable number of rows. Templates are also preferred where there is a need of proper alignment. Templates are used to print tables whose layout and rows are fixed and known before the application program runtime. Example: Tax Forms

      Template is a static entity i.e. its dimensions cannot be changed at run time whereas Table is a dynamic entity i.e. its dimensions can be changed at run time. Hence, based on the data, it can last from one page to multiple pages. For line items display, normally table is used because one does not have prior information about the number of line items and no of pages.

      Table node has 3 components- HEADER, ITEM and FOOTER

      • The Header component will be executed once.
      • The Item component can be used to process/display table contents.
      • At the end footer will be executed.

      Templates can be used to define the following:

      • No. of rows and cell
      • Height of each row
      • Width Of individual cells
      • Separators or frames to be displayed or not
      • Alignment of the table in the 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. 

    22. Question 22. How Do You Find The Name Of The Function Module For A Smartform? When Is This Function Module Created?

      Answer :

      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.

    23. Question 23. 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?

      Answer :

      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 
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. 
      ENDIF.

      Once you transport the Smartform from Development to Production server, a new function module name for the Smartform in generated in the Production server. For a particular Smartform , generated function module names are different in different systems. 

    24. Question 24. State The Difference Between Form Interface & Global Definitions In Global Settings Of Smartforms?

      Answer :

      Form Interface is where we can declare what must be passed in and out of the smartform (in from the print program to the smartform and out from the smartform to the print program). 

      Global Definition is where we declare data to be used within the smartform on a global scope i.e. anything we declare here can be used in any other node in the form.

    25. Question 25. In A Certain Smartform, For Two Differently Configured Printers, There Seem To Be A Difference In The Output Of Characters Per Inch (the Distance Between Characters Which Gives A Layout Problem - Text In Two Lines Instead Of One?

      Answer :

      It happens when the two printers having different Printer Controls. We can go to SPAD Transaction Menu (Spool Administrator Menu) where we can see the difference in the Printer Control and if we make the Printer control setting for both the printers as same then there would be no difference in the output of characters per inch. Also we will have to check what is the device type used for both the output devices if the issue persist.

    26. Question 26. How Can You Convert Smartforms Output To Pdf?

      Answer :

      Following steps needs to be carried out to convert Smart Forms output to PDF:

      • Print the Smart Form to the spool.
      • Note the spool number.
      • Download the PDF file version of the spool by running Program RSTXPDFT4 and entering the noted spool number.

    27. Question 27. How Will You Print On Both Sided Of A Smartform?

      Answer :

      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.

    28. Question 28. How Can One Insert Symbols In Smartforms?

      Answer :

      Select the Text Node --> Change Editor --> Go to Menu Option 'Insert' --> Characters --> SAP Symbols.

      Choose the SAP symbol that you want to insert.

    29. Question 29. How Can I Make The Smartforms To Choose A Printer Name By Default?

      Answer :

      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'.

    30. Question 30. How Can I Make The Smartforms To Display A Print Preview By Default Without Displaying The Popup For Print Parameters?

      Answer :

      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.

    31. Question 31. How Can I Display The Total Number Of Pages In Smartforms?

      Answer :

      Use SFSY-FORMPAGES to display the total number of pages in the Smartforms 

      • &SFSY-PAGE& : Current page number
      • &SFSY-FORMPAGE& : Total number of pages in the currently formatted layout set
      • &SFSY-JOBPAGE& : Total number of pages in the currently formatted print request
      • &SFSY-COPYCOUNT& : Original-1,1st copy-2
      • &SFSY-DATE& : Date
      • &SFSY-TIME& : Time
      • &SFSY-USERNAME& : Username

    32. Question 32. 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?

      Answer :

      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 &SFSY-FORMPAGES(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.
      • 'C' Compress Spaces.

    33. Question 33. What Are The Various Text Formatting Options In Smartforms?

      Answer :

      Various text formatting options available in Smart Forms are:

      • &symbol(Z)& : Omit Leading Zeroes
      • &symbol(S)& : Omit Leading Sign
      • &symbol(<)& : Display Leading Sign to the Left 
      • &symbol(>)& : Display Leading Sign to the Right
      • &symbol(C)& : Compress Spaces
      • &symbol(.N)& : Display up to N decimal places
      • &symbol(T)& : Omit thousands separator
      • &symbol(R)& : Right justified
      • &symbol(I)& : Suppress output of the initial value

    34. Question 34. Why Pages & Windows Node Are Required Or Mandatory While Creating A Smart Form?

      Answer :

      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.

    35. Question 35. How Can You Find The Generated Function Module Name For A Smart Form?

      Answer :

      First activate the Smart Form. Go to Environment -> Function Module Name and get the automatically generated function module for the Smart Form.

    36. Question 36. How Do You Debug A Smart Form?

      Answer :

      By Putting a break point on the generated function module of the Smartform, one can debug it.

    37. Question 37. What Are The Different Auxiliary Nodes Available In Smart Form?

      Answer :

      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.
      • Program Lines: Executes ABAP Code.
      • Folder: Combines successor nodes to logical groups.
      • Loop: Processes successor nodes repeatedly.
      • Alternative: Branches depending on conditions.
      • Command: Executes Special Commands.

    38. Question 38. What Are The Text Types Available In Smart Form?

      Answer :

      There are 4 different types of Text available in Smart Forms. They are:

      • Text Element
      • Text Module
      • Include Text
      • Dynamic Text

    39. Question 39. What Are Text Modules In Smart Forms? What Are The Advantages Of Using Text Module?

      Answer :

      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.
      • Can be translated to other languages through the transaction SE63.

    40. Question 40. What Is The Use Of Command Node In Smart Form?

      Answer :

      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.

    41. Question 41. Can One Restrict The Translations Of Smart Form To Specific Languages?

      Answer :

      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.

    42. Question 42. How Can You Translate A Smart Form From One Language To Another?

      Answer :

      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.

    43. Question 43. How Do You Assign Transport Request To Translations For Smart Forms?

      Answer :

      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.

    44. Question 44. What Is The Use Of Folder Node In Smart Form?

      Answer :

      Folder option is useful for placing all the contents into a single place which we call as logical grouping. If we want to put a condition on a group of text elements or templates we can place them in a folder and apply the condition once to the folder. 

      Folder option allows you to place all the contents into a single place. This is basically useful when you have number of windows and with each window you have different graphics, texts, tables, templates used. So to differentiate between 2 windows we generally go for folders and place all contents of one window in a folder and wise versa.

      Page Protection property of Folder control will be used in order to display text in the same page without separating it into two different pages. If there is not enough space for a text node, or a group of text nodes, a group of table rows, etc. the items will be displayed as a group on the next page with maintaining the integrity of these items. 

      In SAP Smartforms documents frequently it is a requirement to print data in same page. For example in a Smart Form table, some of the table rows are required to print in same page together. If the empty space is not enough it is preferred to print those table rows in following page together. In such cases Smartforms Folder control helps ABAP developers creating SAP Smartforms documents. Folder control is the key for page protection in Smartforms.

      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.

    45. Question 45. How Do You Use Barcode In Smart Form?

      Answer :

      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.


Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

SAP Smart Forms Tutorial