By Ribhu Ahuja, TCS
This tutorial explains about creating HRFORMS in HR module of SAP using t code HRFORMS. A complete HR form is an executable report with its own selection screen in the SAP System. HRFORMS use the data available from Metanets.
Concept of Metanet, Metastar, Metadimension, Infonet, Infostar and Infodimension.
The MetaNet is a view SAP HR data which can be printed in a form – adobe interactive or smartform. It covers all the data in SAP HR module which can be printed.
A MetaNet contains MetaStars, which are the individual data sources e.g. employee metastar would contain details about the employee, his address, name etc.
The MetaStar is a view of data that can be read from a specific source of data e.g. from a particular infotype or from a particular HR table – for payroll or time.
The metastar, in turn contain metadimensions and metafigures. The MetaDimension is a complete description of a business object and it contains the relevant business object data – metafields which are either key fields or attributes. A MetaDimension can be used in several MetaStars.
MetaFields are the fields values or information that exist in a MetaDimension. Each MetaField is part of the key that specifies the MetaDimension in full, or an attribute, a further characteristic of the MetaDimension.
Similarly, Infonets, Infostars, Infodimensions and Infofields are the objects which are available in the HRFORM for displaying HR data and are similar to Metanets, metastars, metadimensions and metafields. We can find more details about Metanets using the T code HRFORMS_METADATA.
TCode HRFORMS:
The first screen of HRFORMS contains all the forms available. In order to create a new form, let us click on the create button.
It asks for form name, country grouping and form class. Give the details as shown and for form class, choose PAYSLIP. We can also go for other types of forms. The difference lies in the various types of metastars that would be available to us while creating the forms. For instance, NONE type forms would show all metastars from which we can fetch data except time metastars. TIME type forms would contain only time metastars and none or limited data about other types. So as we chose PAYSLIP type, we see the following screen:
Click on the green tick mark and it takes us to the following screen
Let us take a look at the HR Form tab:
It shows the form class which is PAYSLIP Remuneration in our case, and it shows METANET as SAP Standard Metanet. SAP provides a default metanet which contains HR data in various metastars and metadimensions. In Layout, we can choose SAP Smartform or Form Builder. In our case we would choose form builder and make the forms with Adobe interactive forms.
The Form builder is the Adobe Interactive form interface and here we would not do much of coding but design the form and values would be automatically populated by the self generated driver program. Had we chosen the smartform option, there is little coding required to be done in smartform’s global definition à initialization part, apart from the self generated driver program. The Adobe based forms have a prerequisite is that we must have Adobe Live Server installed on our machine and we have required authorizations for the same.
Currently, the ABAP dictionary structure, SAP form and print program are all inactive.
Creating Adobe based HR form:
On the main screen of HR Forms creation, in the HR forms tab, choose Form Builder in the layout structure and from Metanet dropdown, choose SAP default metanet which is the default metanet available for us. We can create our own metanets and even inherit them from standard SAP default metanet by using the t code HRFORMS_METADATA.
From form class, it is ‘Remuneration Statement’ already chosen. It is for PAYROLL type HR FORM which we chose while we began the HR form creation.