Professional Documents
Culture Documents
HORIZON
HR Forms
Tutorial
History
Version Status Date
1.1 Draught 15.12.2006
Storage location of this document: \\dwdf035/ITP/Payroll/Payroll Evaluation/SpecDesign
Content
1 What is Hrforms ................................................................................... 4
2 Making a form: preliminary steps ....................................................... 5
2.1 Thinking up the form structure .......................................................................... 5
2.2 Thinking up the data structure........................................................................... 6
2.3 Building the metadata ....................................................................................... 6
Adding fields to a MetaStar ............................................................................................. 6
Creating a MetaFigure .................................................................................................... 7
Creating a MetaDimension ............................................................................................. 7
Creating a MetaStar ........................................................................................................ 8
3 Building a form................................................................................... 10
3.1 The InfoNet ..................................................................................................... 10
Setting up the form properties ....................................................................................... 10
Setting up restrictive data selection .............................................................................. 11
Setting up parametric data selection ............................................................................. 11
Intelligent Collect........................................................................................................... 11
Setting Up the Selection Screen of the Print Programme ............................................. 12
Remarks on the Selection Screen ................................................................................ 12
3.2 Building the Form Layout ................................................................................ 12
3.3 Activating the Hrforms form............................................................................. 13
4 More info ............................................................................................. 14
5 Figures ................................................................................................ 15
Figure 1 15
........................................................................................................................ 15
1 What is Hrforms
Hrforms is a framework aimed at reading HR data from the database and outputting it in a form. Each form
consists of a DDIC structure, a layout, a print program and a TADIR logical object referencing several table
entries. All such objects are generated automatically by the Hrforms Workplace (transaction HRFORMS),
which presents the user (i.e. the consultant) with a graphical interface to define the form properties and takes
charge of all the lower level operations.
The data a form will produce is chosen from a catalogue of tables. Both the structure and the reading proce-
dure of such tables are defined in the Hrforms Metadata Workplace (transaction HRFORMS_METADATA).
This is another graphical tool, which presents the user with an easy interface and takes charge of the lower
level operations.
The layout of the forms is created on choice with SAP Smartforms or with the Form Builder. They are both
graphical tools, to make the user’s job easier.
You can now take a look at transactions HRFORMS and HRFORMS_METADATA to get a feeling for them.
The specifications may require you to output a table with RT and CRT wage types on the same line; this is a
common requirement, aimed at comparing the current value with the YTD accrual. The best you can do here
is keep your RT and CRT separated and join them in the form layout. You can also make a MetaStar with a
join of RT and CRT, but that would break modularity and start you off on a path of bloating the table cata-
logue (MetaNet). Remember not to think in layout terms at this stage, but rather in database terms.
• If you are dealing with a field that may be summed, or has a unit associated, look up something suit-
able in the MetaFigure tree. If you cannot find it, see Creating a MetaFigure and then return here; other-
wise, drag and drop it into your MetaStar. Now select your MetaStar and go to page “MetaFigures” in the
tabstrip. You will see that your field can be copied directly from a field in the metaStar table, or passed
along through a function. The former case will apply most times; if this does not suit you, you will input a
function name, click on the “create” icon next to it and write your function. You can return with F3.
• If you are dealing with a field that may not be summed and has no units associated, look up some-
thing suitable in the MetaDimension tree. If you cannot find it, look up Creating a MetaDimension and
then return here; otherwise, drag and drop it into your MetaStar. Now select your MetaStar and go to
page “MetaFields” if the fields of the MetaDimension are to be copied directly from fields of the MetaStar,
or page “MetaDimensions” if direct copying is not good enough and you need a function to fill them. To
create such a function, click on the “create” icon next to it and write your function. You can return with
F3.
A MetaDimension can have more than one key field, because they are intimately related to one another,
and perhaps also non-key fields. Once you have inserted a MetaDimension into a MetaStar, you must
supply a way of filling all the key fields from a record of the MetaStar, as explained above. Non-key fields
are filled separately by the MetaDimension, and you don’t have to bother with them here.
No matter if you are dealing with a MetaFigure or a MetaStar, you may not add any fields to a MetaStar with-
out defining how they are to be read, except for non-key fields of MetaDimensions. Go back to Making a
form: understanding the requirements if you are unclear with this.
Creating a MetaFigure
Before you create a MetaFigure, you must be totally sure that no existing MetaFigure matches your needs.
We don’t want to clutter up the MetaNet with redundancies. If you are sure, think of the size of your field and
the unit it is associated with, if any, and create it. Don’t forget to define all the MetaFigure properties in the
tabstrip, particularly the flag if it is to be summed or not. Typically, amounts per unit should not be summed
while ordinary amounts should. You can then return to Adding fields to a MetaStar.
Creating a MetaDimension
Before you create a MetaDimension, you must be totally sure that no existing MetaDimension matches your
needs. We don’t want to clutter up the MetaNet with redundancies. If you are sure, proceed as follows:
Group into the same MetaDimension those fields that logically belong together, and avoid grouping together
fields that you might need separately. Bear in mind that you are building a metadata catalogue, i.e. your
forms are rarely going to use all the objects you define here, but rather a small selection of them. Even if a
MetaStar contains thirty MetaDimensions, you may use as few as one in a form. On the other hand, you may
not split a MetaDimension: you will always use all its fields, or none. This is why you should only group inti-
mately related fields in the same MetaDimension. See Intelligent Collect to learn more.
Creating MetaDimensions requires similar logical processes as creating simple database tables or views.
You want your MetaDimension to be simple and reusable for different purposes. It often holds true that add-
ing too many key fields reduces reusability, and a well-thought up logical structure enhances it. You might
use your new MetaDimensions in different MetaStars, and fill it in different ways, and always want to get the
right data in it.
Let’s take a “Weekday” MetaDimension as an example. The name of the weekday will be different in every
language, and yet have the same logical meaning. In order to come up with the name of a weekday, you
certainly need to know the language, and then either a day counter or a date, and you don’t need any more
information than this. Create the MetaDimension in the MetaDimension tree, and add three fields: language,
date (or day counter), weekday text. Set up language and date (or day counter) as key fields in the tabstrip.
Once all the fields have been added, you will tell your MetaDimension how to read the non-key field(s) once
it knows the key field(s), either by pointing it to a suitable transparent table (each field will be copied from the
table field you assign to it), or by means of a function (if you don’t have a suitable transparent table). You can
create, edit or view the function by clicking on the icon to the right of the “Function” field.
Once you have created your MetaField, you can return to Adding fields to a MetaStar.
Creating a MetaStar
Are you really, really sure that none of the available MetaStars match your requirements? Remember, you
don’t want to clutter up the MetaNet with unneeded objects, and a Metastar can be a cumbersome one. Plus,
you ought to know exactly the structure of your table and how it is to be filled. If you are unsure, refer to
Thinking up the data structure, or even Thinking up the form structure. If you are sure, carry on here.
First of all you must know how MetaStars work (see also Figure 1). When producing a form,
• Hrforms fills a preliminary table with the procedure set up in the MetaStar (leftmost page of the tab-
strip), then
• loops over it. At every loop run,
• the MetaDimension keys and the MetaFigures are filled from the record of the preliminary table cur-
rently looped at, following the procedure set up in the MetaStar (second, third and fourth pages of
the tabstrip).
• Once all MetaDimension keys and MetaFigures have been filled, they are appended to the final Me-
taStar table in the form of a single structure including all of them.
• Once the loop is over, the Intelligent Collect takes place.
• MetaDimension tables are also filled in the process; non-key fields are still blank for now. Once all
MetaStars have been filled, and just before the data is passed on to Smartforms or the Form Builder, the
non-key fields are populated, following the rules set up in their MetaDimensions.
You can now define the preliminary table of your MetaStar and the procedure to populate it, on paper for
now. You want to make sure that:
• Your table contains data from the right source.
• Your table contains all the records you will require in the final table. As explained above, your final
table will contain one record for each record of the preliminary table, and the Intelligent Collect may re-
duce their number. As a consequence, the final table will never contain more records than the prelimi-
nary table, no matter what tricks you use.
• All the fields you need are either in the preliminary table, or in the final table (i.e. in MetaDimensions
or MetaFigures belonging to your MetaStar). In the latter case, the preliminary table must contain
enough information for the MetaStar to populate all the fields of the final table, with the procedures the
Metadata Workplace allows you to set up. See Adding fields to a MetaStar if you are unsure.
If these three requirements are not all met, check again Thinking up the data structure.
Now you can create your MetaStar: create it in the MetaStar tree and set up its properties in the first page of
the tabstrip. First of all you must set up its type. There are five types of MetaStars, not all of which are al-
lowed in every form class. Basically, you can not use payroll cluster-bound tables together with time cluster-
bound tables in the same form.
• Free, employee-bound. This is the most generic type of MetaStar and allows you to read any data,
provided you write your own functions and define your own DDIC structures. Only use it if you must.
• Free, not employee-bound. This is the same as above, except the data is not employee-related but
form-related, so it is only filled once at the beginning of the print program.
3 Building a form
Every Hrforms form consists of
• A collection of objects (i.e. tables) taken from the metadata catalogue and a collection of form prop-
erties, which together make up an InfoNet. InfoNets are saved as specific TADIR object (HRFO), and
automatically handled by transaction Hrforms.
• A complex DDIC structure with the tables that are fed to the form layout.
• A form layout, built with Smartforms or the Form Builder.
• A print program, which can be called as a standalone report or from other applications, by means of
function modules. The print program populates the InfoNet and passes its data to the form layout.
Transaction Hrforms generates the print program automatically.
Intelligent Collect
Every time two or more records have the same key Hrforms will make a “collect” on them, provided all nu-
meric fields are summable. Adding or removing a field can mean that less or more records respectively are
“collected” together.
This comes in handy whenever you want to work out totals: if your table has e.g. an employee field and a
wage type field and you want the wage type totals over all employees, just take out the employee field in the
InfoNet. If you have not read about InfoNets yet, you will understand later.
On the other hand, you must pay close attention to having enough key fields for the data you want to display,
or the Intelligent Collect will lose you information.
may have made more InfoStars because of complex selection requirements, but the data should stay to-
gether in the form).
4 More info
You can find more information in the Hrforms design document, if you have access to it.
5 Figures
Figure 1
Copy directly Process with function Copy directly Process with function