Advance Development Concepts



In this chapter, we will discuss in detail about the advance development concepts of SAP Smart Forms. This chapter will cover aspects like Special Nodes, Form Processing and Function Modules as well.

SAP Smart Forms – Special Nodes

In a SAP Smart Form, you have different special nodes that can be used as a part of the advance development concepts. To add special nodes in a smart form, you should move it to the navigation tree.

On each page, right Click → Open Context menu → Create → Flow Logic → Command.

Special Nodes

The following list of special node types can be used −

Command Node

This is commonly used to insert commands for different application purposes. You can use a command node to insert a dynamic page break in the main window. You have different options under command node to apply a dynamic page break −

  • Go to New Page − This command is used to provide a page break and is allowed only in the main window.

  • Reset Paragraph Numbering − This option can be used to set the counter for specified outline paragraphs.

  • Include Printer Control − This option is used to send print control to output device.

  • Free Attributes of Spool Request − This option can be used to define attributes for spool requests.

Command Node

Program Lines

Program lines can be used to perform calculations of totals and subtotals. You can insert program lines in the tree structure.

On the General Attributes tab use the tables Input parameters and Output parameters to pass global fields. With the ABAP code, you can access the global fields entered in these tables.

Complex Section

You use this option to combine tab pages of node types, to create complex section node click Create → Complex Section.

In the General Attribute tab of the Complex Section, you can define settings for combining different tab pages such as −

  • Event tab
  • Table tab and
  • Template tab.

SAP Smart Forms – Form Processing

In a smart form, you use the tree structure under the form builder to define form logic to print the texts, graphics and different elements in the smart form. When a smart form is activated, a function module is generated and the SAP smart form processes the tree structure of the form and uses the ABAP programing code to print the form contents.

The output of a smart form is determined by inferior nodes in a tree structure that constitutes Pages and Windows in a Form builder. For each node in a tree, you can define output options and conditions.

A node is processed in the following scenarios −

Condition

  • When a condition is set for the node and system evaluates the condition. If it is found false, node and its inferior nodes in a tree structure are not processed.

  • Inferior nodes can be processed directly depending on the node type.

  • An action assigned to a node can also be processed.

  • When you define the output options for a node and its inferior node and individual output options are assigned to inferior nodes, then option overwrites the output option of superior node.

The following condition types can be used for processing a node.

  • Simple IF Condition − This is done using AND or OR option.

  • Complex IF condition − This is used using program lines.

Event Queries Combination

Queries

SAP Smart Forms – Function Modules

When a smart form is activated, a function module is generated. There are various standard parameters that can be applied on the function module. These parameters directly appear in the form interface and can’t be changed. To activate a smart form click on the Activate Button at the top.

Function Module

When the function module is called from an application, you can use these parameters for defining the output format or spool request or various other purposes.

  • Report − zcall_smartform.

  • Call Function − '/1BCDWB/SF00000279'

Here SF00000279 – represents the function module.

But this is not the recommended way of calling a function module as the Function Module name is generated as per the number range in the system. When you transfer the smart form to the production system, a new function module is generated.

To handle this, it is recommended to use the function – SSF_FUNCTION_MODULE_NAME to get the function module name dynamically.

  • Report − zcall_smartform.

  • Data − fname TYPE rs38l_fnam.

  • Call Function − 'SSF_FUNCTION_MODULE_NAME’

How to get a Function Module Name?

To check the function module name for a smart form, navigate to Environment tab at the top → Function Module Name.

Module Name

The Function Module is shown in the next window −

Information

You can also perform vice versa using the Transaction SE 11 and go to table – STXFADMI.

Advertisements