Figure 23: HR Forms Workplace: Data Structure
You choose the data that is required on the form from the overview tree of the MetaNet. To do so, select the MetaStars, MetaDimensions, and MetaFigures in the MetaNet overview tree. You can then move the selected objects to the InfoNet overview tree on the right of the screen by drag and drop.
In this way, the objects that correspond to the objects in the MetaNet are created in the InfoNet.
The InfoNet overview tree contains the data that you have selected to be printed.
You can arrange this data on the form and add formatting at a later stage.
Additional information is provided on the individual tab pages for each node in the overview tree.
The MetaNet is a technical grouping, while the InfoNet is a business-related grouping of available data.
The InfoStars tab page provides an overview of the InfoStars contained in the InfoNet of the form and the MetaStars used to create them.
Figure 24: Creating the InfoNet
You create the InfoNet in the HR Forms Workplace editor.
Using drag and drop, you move the required data (MetaStars, MetaDimenions, MetaFields, and MetaFigures) from the MetaNet to the InfoNet of the new form.
The statuses for the DDIC structure, the SAP Smart Form, the print program, and the HR form are still inactive at this time.
InfoStars can contain the same InfoDimensions and InfoFigures. Their business significance varies on the basis of the wage types selected.
Figure 25: Inserting Selections
There are two ways to further restrict the data you have selected.
• Variable selection, which is redefined every time the HR form is printed.
• Fixed selection, which is specified when the form is designed.
In the example form, select the payroll period and personnel numbers using the selection screen of the subsequent print program with variable selections.
You can restrict the value area with the fixed selection by choosing the Insert Selection pushbutton.
In the form shown here, the wage types to be printed are restricted to /101 (total gross), /559 (bank transfer), and the wage type range from M000 to M400.
By choosing the Layout pushbutton, you exit HR Forms and enter SAP Smart Forms. At the same time, the ABAP Dictionary structure is generated and the Smart Form created.
Here, you save the new (empty) Smart Form and activate it. Exit the Smart Form editor by choosing Back and return to the HR form editor.
Choose Activate. When you activate the Smart Form, the following three parts become active:
• ABAP Dictionary structure
• Smart Form
• Print program
Figure 26: HR Form Attributes
You can find and enter general information on the HR Form tab page. This is where the form class is specified (remuneration statement, time statement, other forms), and also where you choose the layout editor to be used.
If you choose flat structure in the Star Structuring field, the InfoStar tables also contain attribute fields. This means you do not have to execute LOOP statements to represent associated data. The HR Forms Workplace executes these automatically after it has read the data. The InfoDimension tables are available in both layout editors but are no longer required for the form. This considerably simplifies the process of creating a form.
In the Form Parts area, you can see the names and generation status of the previously mentioned HR form objects. Here, the following steps have already been performed successfully: Creation of the ABAP Dictionary structure (takes place when layout editor is called), form definition, and print program.
You can make adjustments to the selection screen on the Select. Screen tab page.
If the form class is a time statement, you can select a report class here.
Figure 27: Verifying the Data Selection
Once you have created the InfoNet and activated everything, choose Form → Print Program (Test) to start the program and check the data selection.
The print program selection screen appears.
Use an employee with payroll results and choose Execute. An overview tree containing the generated internal tables appears on the left of the screen and the table content is displayed on the right.
The example in the graphic shows the relationships between the star and
dimensions tables. You can see the STAR_PAY_RESULT table with the amounts.
Each amount is characterized by the EMPLOYEE, INPERIOD, and WAGETYPE dimensions.
Figure 28: SAP Smart Forms: Form Interface
When an application program calls an SAP Smart Form (or rather, the generated function module of the form), it must be possible to communicate with it. Data must be sent to the form and returned by the form to the calling program. All data is exchanged through the interface of the form. You define the interface in the global settings of the Form Builder.
All parameters of the interface are global, which means they are recognized in all nodes of the form.
The HRDATA parameter can be found under the Form Interface node. This parameter represents the HR data selected.
The other parameters are predefined by SAP Smart Forms. They contain print and archiving parameters.
The associated type of the HRDATA parameter is the generated ABAP Dictionary structure of HR Forms. The structure name consists of the namespace /1PYXXFO/
and the name of the HR form. In this case, the name is /Z99_PAYSLIP.
Choose Field list on/off to display the ABAP Dictionary structure as an overview tree.
You can use drag and drop to select fields to be printed from this list during subsequent processing steps.
Figure 29: SAP Smart Forms: Global Definitions
Here, you define the work areas required in form processing as line types of the tables. These are filled in a loop and output on the form.
The work area variables (WA_...) for use within the form relate to the structure of the HR form. Typing must relate to the dictionary structure generated. The name of the structure follows the naming convention /1pyxxfo/Zform, with Zform standing for the name of the form you have created.
It is useful to call the generated dictionary structure (SE11) in a separate session when you are creating the global definitions. That way, you can see the names of the components that you want to use (STAR_name or DIM_name).
Variables entered on the Global Data tab page are recognized in the entire form and can, for instance, be used as work areas of tables or loops.
You can check your entries with the Check pushbutton.