15
Hierarchy data loading using flatfile: 1 Introduction Definition: A hierarchy is a method of displaying a characteristic structured and grouped according to individual evaluation criteria. Structure: a) Nodes A hierarchy is created from nodes. The uppermost node is the root. b) Roots A hierarchy can have several roots. They do not have superior nodes. c) Hierarchy Levels All nodes on the same level of the hierarchy (nodes that are the same distance away from the root) form a hierarchy level. The roots of a hierarchy form level 1. The level of a node denotes the distance from the node to the root. d) Leaves The leaves of a hierarchy consist of characteristic values for the basic characteristic and therefore can also have entries in the fact table. A leaf cannot have any sub nodes. e) Basic Characteristic Hierarchies can be created only for those characteristics that do not reference other characteristics. Properties : A BW hierarchy has the following properties: • Hierarchies are created for basic characteristics • Hierarchies are stored in special master data tables. They behave in a similar way to master data, • and can therefore be used and modified in all Info Cubes. • You can define several hierarchies for a single characteristic. • A hierarchy can have a maximum of 98 levels.

Hierarchy

Embed Size (px)

DESCRIPTION

Hierarchy data loading using flatfiles

Citation preview

Page 1: Hierarchy

Hierarchy data loading using flatfile:

1 Introduction

Definition:

A hierarchy is a method of displaying a characteristic structured and grouped according to individual evaluation criteria.

Structure:

a) Nodes A hierarchy is created from nodes. The uppermost node is the root.

b) RootsA hierarchy can have several roots. They do not have superior nodes.

c) Hierarchy LevelsAll nodes on the same level of the hierarchy (nodes that are the same distance away from the root) form a hierarchy level. The roots of a hierarchy form level 1. The level of a node denotes the distance from the node to the root.

d) LeavesThe leaves of a hierarchy consist of characteristic values for the basic characteristic and therefore can also have entries in the fact table. A leaf cannot have any sub nodes.

e) Basic CharacteristicHierarchies can be created only for those characteristics that do not reference other characteristics.

Properties :A BW hierarchy has the following properties:

• Hierarchies are created for basic characteristics

• Hierarchies are stored in special master data tables. They behave in a similar way to master data,• and can therefore be used and modified in all Info Cubes.

• You can define several hierarchies for a single characteristic.

• A hierarchy can have a maximum of 98 levels.

2 Uploading Hierarchy From Flat FileIn the following example , Hierarchy is based on info object ‘Sales Representative’. In addition characteristics ‘Region’ and ‘Country’ are included in the hierarchy.Basic characteristic in this hierarchy is ‘Sales Representative’ and External characteristics are ‘Region’ and ‘Country’.

Page 2: Hierarchy

2.1 Create Info-objects

a) Create 3 info objects ‘Sales Region’ (ZSREGION), ‘Sales Country’ (ZSCONTRY)and ‘Sales Representative’ (ZSREP).

b) For ‘Sales Representative’ characteristic Tick the check box With Hierarchies and select Hierarchy not time-dependent radio button.

Page 3: Hierarchy

c) Include the external characteristics ‘Sales Region’ and ‘Sales Country ‘ in the Hierarchy.And activate the info object ‘Sales Representative’.

Page 4: Hierarchy

2.2 Creating Info Source.

a) Create Info source with direct update for info object ‘Sales Representative’ (ZSREP).

b) Assign flat file source system to the info source ZSREP.

c) Activate the transfer Rules .

d) Click on Hier. Structure Push button

Page 5: Hierarchy

e) Give a Name and description to the Hierarchy and press continue .

f) The structure in the screen represents the structure of the flat file . Field sequence

Page 6: Hierarchy

of the flat file should be exactly same as that in the screen below.

2.3 Creating Flat File for Upload

a) Number the nodes in the hierarchy.

Page 7: Hierarchy

b)Create the flat file based on above hierarchy structure and the node numbers.

2.4 Uploading the Hierarchy Data into BW

Page 8: Hierarchy

a) Create Info Package for Hierarchy Upload. Select the Hierarchy to be uploaded and also the Full Update button as we are uploading the entire Hierarchy.b) There are three update methods for uploading the hierarchy.Full Update : For Uploading the entire hierarchy structureInsert Subtree: For appending the hierarchy with new nodes.Update Subtree : For modifying the nodes of the hierarchy.

c) Select the CSV file to be uploaded and schedule the upload.

d) Display the loaded Hierarchy .

Page 9: Hierarchy

2.5 Uploading Time Dependent Hierarchy

a) For making the hierarchy time dependent select the ‘Time-Dependent Hierarchy structure’ radio button and activate the info object ZSREP

Page 10: Hierarchy

b) In the transfer structure there will be 2 more additional fields date from and date to for the time dependent nodes.

c) Consider that Sales Representative ‘SREP2’ was in England up to 31/12/1995 and moved to USA from 01/01/1996 .

Page 11: Hierarchy

d) Flat file structure for the above hierarchy is shown below . It contains two extra columns Date-to and Date-from.

Page 12: Hierarchy

e) In the info-package Update tab , select Fixed Time interval radio button and give start date as 01/01/1000 and End date as 31/12/9999 so that all nodes are uploaded.

f) Upload the hierarchy data from flat-file to BW.

Page 13: Hierarchy

g) Display the loaded hierarchy.