Creating A Custom Metanet
Creating A Custom Metanet
This tutorial explains about creating a custom Metanet in HR Module of SAP using T.Code
HRFORMS_METADATA.
MetaNet: The MetaNet is a view of printable data in
the SAP System. It covers all data sources in Human Resources that are available for the form creation
process. The MetaNet is provided by SAP or can be created and represents a directory from which you
can select data to be printed in forms. The MetaNet contains the following objects represented in a
hierarchy:
1. MetaStar
2. MetaDimension
3. MetaField
4. MetaFigure
MetaStar: A view of data that can be read from a specific data source in the SAP R/3 System.
MetaDimension: Complete description of a business object or concept.
MetaField: Items of information in a MetaDimension. Each MetaField is part of the key that completely
specifies the MetaDimension, or it is an attribute, an additional characteristic of a MetaDimension.
MetaFigure: A key figure. If the key figure is linked to a unit, this unit is also part of the MetaFigure.
When we require custom MetaNet: SAP provides SAP_DEFAULT (SAP standard MetaNet) which contains all
possible data of SAP standard HR master data, personnel time data, and payroll results. If there is any new
infotype created or any data required in the output from any new custom infotype then a new node must be
created into the MetaNet. We create a new custom MetaNet and calls SAP provided MetaNet into that and then
add new node based on requirement.
E.g.;
Here, in our case all payroll results are stored into a custom infotype. Data form the custom infotype can not be
populated using standard SAP MetaNet. Therefore, I have created a custom MetaNet and added a
new node for custom infotype. The complete steps are written below in details.Transaction for
creation of custom MetaNet: HRFORMS_METADATA
Step 01: Give the Custom MetaNet name and Choose Country then click on Create button. For example:
MetaNet: ZCUSTOSMMETANET
Country: Great Britain
Step 02: In the maintenance screen of the MetaNet, we see there are three columns in left side
MetaFigures, MetaDimensions, MetaStars and in the right side work place for MetaNet.
Step 03: If there is any field that has reference table for the currency/ Quantity field then a custom MetaFigure
must be created under MetaFigure column for that field. Click on the create button of the MetaFigure column
and give a custom MetaFigure name starting with Z* and description. For all such type of fields corresponding
MetaFigures must be created.
Tax Amount
Step 04: Details of the Metafigure crated under step 03 must be mapped with the unit that can be done
on the right hand side bottom of the screen. Reference table name and field must be maintained
here. Remember Field name must be unique for each MetaFigure, i.e. if there are five quantities fields
in the MetaFigures then all fields name for the Unit must be different where as Field Type may be
same. Field Type for the MetaFigure must be same as data element of the corresponding field.
If field has cumulate values then check the check box of cumulate Values.
Step 05: If any table need to add into the MetaNet then a custom MetaDimension must be created. Click
on the create button of the MetaDimension column, give MetaDimension name starting with Z and
description.
Give the field name and description: for example: Name: BEGDA
Description: Begin date
Similarly create all MetaFields.
Step 07: Mapping of the MetaDimension must be done after creation of all Metafields. After just clicking
on the MetaDimension on the right hand side bottom of the screen mapping can be done.
In the first tab MetaDimension give the table name form which data need to populate.
On the MetaFields tab map the table fields with the Metafields. For identifying key fields and attributes just
double click on the first column.
Here Is the example first three fields BEGDA, ENDDA & PERNR are key fields that will be used for
fetching data, where as rest all fields are attribute.
Step 08: Create a new MetaStar, click on the create button of the MetaStar column. Give the custom
MetaStar name starting with Z and description.
Step 09: When all required MetaFigures & MetaDimensions are inserted under then custom MetaStar
then map the fields, on the right hand side of the screen. In the first MetaStar give type as Master Data &
Infotype name.
Go to tab MetaFields, then map Metafields (here only Key MetaFields will be displayed) with the infotype
fields.
Go to tab MetaFigures and Map Metafigure with the fields of Infotype and also the unit field of the
infotype.
Step 10: Finally click on the work place of the MetaNet , Information about the MetaNet will display at the
bottom of the window. Give the details as shown in the screen shot.
Step 11: Just drag and drop custom metaStar form the metaStar column to metaNet workplace.
Step 12: Save and exit form the MetaNet. This custom MetaNet ( ZCUSTOMMETANET) can be used in
HR Forms.