Вы находитесь на странице: 1из 9

QlikStart for use with SAP HR

QlikStart for Use with SAP HR

2010-09-08
QlikView Version: 10.xx English

Page 1 of 9

QlikStart for use with SAP HR

Contents
1

INTRODUCTION................................................................................................................. 3

PREREQUISITES................................................................................................................ 4

INSTALLATION AND POPULATION..................................................................................5


3.1
3.2

CONTENTS.................................................................................................................... 5
DATA LOAD................................................................................................................... 5

SCRIPT DETAILS................................................................................................................ 7
4.1
4.2
4.3
4.4
4.5

MAPPING...................................................................................................................... 7
HR TABLES................................................................................................................... 7
CALCULATED FIELDS...................................................................................................... 8
EXTRACTION FILTERS.................................................................................................... 8
QVD CREATION............................................................................................................ 9

Page 2 of 9

QlikStart for use with SAP HR

1 Introduction
QlikStart templates provide a sample set of key information deliverables for your SAP
modules that combine data extraction scripts, pre defined calculations and a variety of sample
analyses in a front end application combining dashboards, charts and reports.
QlikStart templates contain value for both IT and the business, for IT a series of predefined
extraction scripts with table joins and calculations provide valuable insight. The business user
can start using the predefined reports to analyse their business within a very short time.
A high level architecture diagram of the QlikStart template is described below:

QVD Layer
01-SAP-HR_QVDGENERATOR.qvw
SAP
R/3

02_SAP-HR_LAYOUT.qvw

This document covers the technical background involved with the data extraction along with a
step by step guide to implement the QlikStart template .

Page 3 of 9

QlikStart for use with SAP HR

2 Prerequisites
Completion of the QlikView Designer training courses as the process assume knowledge of
standard QlikView script syntax such as mapping load etc.
Prior to starting the process you should have downloaded and installed the QlikView Connector
for use with SAP from here. The installation guide includes all the information re setup of the
connector on both the client and SAP instances.
For extracting data with the QlikStart template the script builder qvd files are used , these will
need to be populated with the relevant data dictionary entries to enable completion the tables
and columns to be reloading with the extraction script. The procedure is covered in the
installation guide section 3.5.2 and is also detailed below:

You can find the applications via Start-> Programs -> QlikView or find it in C:\Documents
and Settings\All Users\Application Data\QlikTech\Custom
Data\QVSAPConnector\ScriptBuilder\.

You should start with the ReLoadSAPDD.qvw application that downloads data from the
Data Dictionary of your SAP system. Since the content of the Dictionary is different for
different variants and versions of SAP this is a necessary first step.

The ReLoadSAPDD.qvw creates .qvd files that can be loaded into the ScriptBuilder
application.
You should change the Script regarding the connection and language in this application
prior to doing a reload.

To use this application for several SAP systems, copy the complete folder and change
the connection in the script. Redo the refresh of the Dictionary content.

Page 4 of 9

QlikStart for use with SAP HR

3 Installation and Population


3.1

Contents

The QlikStart template consists of 2 qvw files:

01_SAP-HR_QVDGENERATOR.qvw
o Connection string for SAP
o Load script to extract relevant tables with calculations and associated key fields
o QVD creation script

02_SAP-HR_LAYOUT.qvw
o Load script for previously created QVD's
o Dashboards and reports for SAP HR

3.2

Data Load

The first step in the process will be to create the qvd files from which the layout application can
read from to populate the various reports contained within.
1. Copy both qvw files to a file location (qvd files will also be created within here)
2. Open 01_SAP-HR_QVD_GENERATOR.qvw and set the variables shown:

3. Open the script editor and add your connection string using the QVSAPConnector.dll
option.
4. Open 02-SAP-HR_Layout.qvw and set the variables shown:

The SAP Language variable determines which data dictionary files will be used to
populate field and table names.
Script Builder QVD location is the file location of the qvd files which must be
created prior to running the template.
Field Description length determines the field description length to be used from
the data dictionary, S (Short), M (Medium) and L (Long) are available.
Page 5 of 9

QlikStart for use with SAP HR

QVD Destination determines the location the resulting qvd files will be stored

and reload the application.

Page 6 of 9

QlikStart for use with SAP HR

4 Script Details
4.1 Mapping
The first part of the extraction process within 01_SAP-HR_QVDGENERATOR.qvw uses the pre
extracted data dictionary files from the SAP instance generated by the ScriptBuilder reload
process. The following tables are used
Table
DD03L
DD04T
DD02T

Description
Fields in a Table
Field name descriptions (language specific)
Table name descriptions (language specific)

Two of the tables are language specific and contain field/table descriptions in the language set
via the vLanguage variable set in the front end, along with the relevant description length set
also in the front end.
Table names and field names are obtained from the data dictionary tables via a mapping load
and are used in the remainder of the script within the rename fields/rename tables process.
Note : Not all fields within the reporting application will be renamed via the data
dictionary, derived fields will need to be renamed into the appropriate language if
required.

4.2

HR Tables

The extraction script will connect to SAP and pull information from the following tables
described below:
Table
PA0001
HRP1000
PA0000
T527X
T500P
PA0002
PA0006
PA0007
PA0008
PA2001
T554T

Description
Infotype 0001 - Organizational Assignment
Job ID Descriptions
Infotype 0000 - Actions
Organizational Unit Descriptions
Personnel Areas Descriptions
Infotype 0002 -Personal Data
Infotype 0006 - Addresses
Infotype 0007 - Planned Working Time
Infotype 0008 - Basic Pay
Absences
Absence and Attendance Texts

Page 7 of 9

QlikStart for use with SAP HR

Each table has a key field prefixed with '%' these fields are hidden from the main reporting
application via the SET HidePrefix = '%' command on the main tab.

4.3

Calculated Fields

The extraction process contains a number of calculated fields used in the front end analysis
application below:
Table
PA0002

Calculation

PA0002

if(GBDAT='0000-00-00','Non
Given',age(today(),GBDAT))
as [Age]

Age calculation based on


GBDAT birth date with a 0
value translation

PA0000

if(MASSN = 01,'Hired Date',


(if(MASSN = 10 ,'Terminated
Date','Other'))) as [Hire
Date Type];

PA0007

if(EMPCT=100,'Full
Time','Part Time') as [Full
or Part Time]

Translation of MASSN (Action


Type) flag to determine
employment status from the
date.
Translation of EMPCT
(Employment Percent) to
determine full/part time status

4.4

if([GESCH]=1,'M','F') as
[Gender_Desc_GESCH]

Description
Gender flag translation

Extraction Filters

The extraction process contains a series of filters in the where clauses of certain table
extractions:
Table
HRP1000

T554T

Calculation
SQL Select OBJID,STEXT
from HRP1000
where OTYPE = 'C' and
PLVAR = '01' and ISTAT =
'1' and
LANGU = '$(vLanguage)' and
SEQNR = '000';

SQL Select ATEXT, AWART,


MOABW from T554T
where MOABW = '01' and
SPRSL = '$(vLanguage)';

Page 8 of 9

Description
Filters for:
OTYPE (Object Type) = C
indicating job
PLVAR (Plan Version) =01
ISTAT (Planning Status)=1
SEQNR (Infotype record no)
=000

MOABW (Personnel Sub


group)= '01'

QlikStart for use with SAP HR

4.5

QVD Creation

The final process with the table extraction creates qvd files in the location set within the
vDirectoryPath variable. The process is designed to be dynamic and respect the language
settings with associated mappings for tables names derived from the Mapping section of the
script.
The process is described below:
//Store Data to QVD File:
Let vTabname = tablename(0);
Store * from [$(vTabname)] into "$(vDirectoryPath)$(vTabname).qvd";
Drop Table [$(vTabname)];
Let vTabname = '';

The variable vTabname is set using the tablename() function which is derived from the language
specific information contained in the data dictionary tables loaded from the mapping section. All
of the data from the table is stored into a qvd file with into the location and with the table name
specified from the variables. Finally the table is dropped from memory and the vTabname
variable is reset in preparation for the next extraction.

Page 9 of 9

Оценить