Sunteți pe pagina 1din 16

Create HANA-Based Analytics for SAP Data

Replication

www.sap.com

TABLE OF CONTENTS
INTRODUCTION ............................................................................................................................................... 3
PREREQUISITES.............................................................................................................................................. 3
Technical Prerequisites .................................................................................................................................. 3
Content-related Prerequisites/Background Information ............................................................................. 3
When Is The Replication Log Registered?.................................................................................................... 3
Tables Relevant for Building Related HANA Views ......................................................................................... 3
GENERALLY REQUIRED CONFIGURATION STEPS .................................................................................... 5
CREATE THE RELATED CALCULATION VIEWS .......................................................................................... 5
CalculationView DataReplication Overview .................................................................................................. 6
Node Join Join_RplctnStatus_to_BusSyst ....................................................................................................... 6
Node Projection Projection_Status_Text .......................................................................................................... 7
Node Join Join_RplctnStatus_to_Text .............................................................................................................. 8
Node Projection ProjRplcntStatusWithBusSyst ................................................................................................. 8
Node Projection Projection_OTC_Text ............................................................................................................. 9
Node Join Join_RplctnStatus_to_OTC_Text ................................................................................................... 11
Node Aggregation ............................................................................................................................................ 12
Node Semantics .............................................................................................................................................. 13
CalculationView DataReplicationQuery ...................................................................................................... 14
Add Calculated Columns ................................................................................................................................. 14
Create xsodata service ................................................................................................................................. 14
Syntax: ............................................................................................................................................................. 14
Test the xsodata Service: ................................................................................................................................ 14
Result: .............................................................................................................................................................. 15

Create HANA-Based Analytics for SAP Data Replication

INTRODUCTION
Starting with SAP Master Data Governance 7.0 SP02 (Feature Pack) SAP HANA-Based analytical
functions have been delivered to monitor and analyze processes using agreed Key Performance Indicators
(KPIs). These KPIs are calculated based on information in change requests and information regarding the
replication of data. This document explains how to build HANA-based calculation views that can be used to
analyze whether data replication occurs in accordance with agreed KPIs.
PREREQUISITES
Technical Prerequisites
You have enabled he HANA-based analytics for SAP Master Data Governance process for your deployment
scenario (Replication Scenario or Integrated Scenario.
For more information, see refer to the central How-to-Guide available on SCN which can be accessed with
the link in the appendix (Error! Reference source not found.).
Content-Related Prerequisites/Background Information
When Is the Replication Log Registered?
Data replication from source systems (for example the MDG HUB) to target systems can be triggered using
the following techniques:
Transaction DRFOUT
This transaction calls an outbound implementation which must be configured in Customizing. An
outbound implementation has to be implemented in the particular master data applications. Replication
can be triggered as initialization or for collected change pointers.
Membership API
The Membership API is called mostly from the MDG applications (for example, Business Partner,
Customer, or Material) when a change request is submitted.
Tables Relevant for Building Related HANA Views
The following tables are the necessary ones for creating the related HANA-based views:
Table head

Data Element

Description

DRFD_OBJ_REP_STA

MANDT
DRF_GUID_16
MDG_BUSINESS_SYSTEM_ID
MDG_OBJECT_TYPE_CODE_BS
DRF_OBJECT_ID
DRF_MESSAGE_LINK
MDG_CREQUEST
DRF_OUTB_IMPL
MDG_COMM_CHANNEL
TIMESTAMP
DRF_REPSTAT
DRF_RUN_ID
BALLOGHNDL
DRF_REP_BLOCKED
DRF_MSG_GUID

MANDT
BUSINESS_SYSTEM
BUS_SYS_ID
LOGSYS
RFCDEST
FILE_PATH
DEF_STORAGE_SERV
UNICODE_SYSTEM

MDG_BUS_SYS_TECH

Client
ID for DRF in the form of GUID Raw
16
Internal ID of business system
Business Object Type
Object ID
Message Number
Change Request
Outbound Implementation
Communication Channel
UTC Time Stamp in Short Form
(YYYYMMDDhhmmss)
Replication Status
Run ID
Application Log: Log Handle
Replication Blocked
Message Guid
Client
Business System
Internal ID of Business System
Logical System
Logical Destination (Specified in
Function Call)
Logical File Path
Download to Presentation Server

Create HANA-Based Analytics for SAP Data Replication

MDGI_OTC_BS

UNICODE_CODE_PAG
DISABLED

System Supports Unicode


Unicode Code Page
Business System Temporarily
Disabled for Replication

OBJECT_TYPE_CODE
CONSTANT_NAME
IS_PROJECTION
MAIN_OBJECT
OITC_FOR_REPL

Business Object Type


Constant Name of Object Type
Object is a Projection of Another
Object
Main Object Type for a Projection
Object Type
Object ID Type for Key Structure
Access

MDG_BUS_ScYS_ATTR

MANDT
BUSINESS_SYSTEM
BUSINESS_OBJECT
COMM_CHANNEL
OBJ_CORRELATION
UPD_KM
PERSISTENCE
TIME_DEPENDENCY

Client
Business System
Business Object Type
Communication Channel
Key Harmonization
Update Key Mapping within ALE Audit
Inbound Processing
Storage Location for Data Replication
Target System Supports Time
Dependency

Create HANA-Based Analytics for SAP Data Replication

GENERALLY REQUIRED CONFIGURATION STEPS


Before executing the mentioned steps below, adhere to the technical as well as content-related prerequisites
described in the previous chapter.
To create the HANA-Based query views according to the described scenario, the following steps are
required:
CREATE THE RELATED CALCULATION VIEWS
1. Logon to SAP HANA Studio
2. Open the HANA Development Perspective and go to the Project Explorer
3. Create a project and assign folders for DataReplication views and a subfolder odata to be used for the
odata service.

Summary:
1. Create the calculation view DataReplication.
2. Create the calculation view DataReplicationQuery.
3. Create the odata service.
Select the Cross Client as default client and select the default schema from which you want to use the
tables.

Create HANA-Based Analytics for SAP Data Replication

CalculationView DataReplication Overview


This picture shows the Joins and Projections of the calculation view DataReplication. The creation of this
view is described below. This calculation view does not have a Data Category and has no privileges.
Start with the Join Join_RplctnStatus_to_BusSyst

Node Join Join_RplctnStatus_to_BusSyst


This node joins the logfile for data replication with the related business system
(tables DRFD_OBJ_REP_STA with MDG_BUS_SYS_TECH).

Create HANA-Based Analytics for SAP Data Replication

Node Projection Projection_Status_Text


Create a projection with table D07T, set filter on DOMANE = DRF_REPSTAT.

Create HANA-Based Analytics for SAP Data Replication

Node Join Join_RplctnStatus_to_Text


Create a text join with the join Join_RplctnStatus_to_BusSyst and Projection_Status_Text.

Node Projection ProjRplcntStatusWithBusSyst


Create a projection on the join Join_Rplctn_to_Text.

Create HANA-Based Analytics for SAP Data Replication

Node Projection Projection_OTC_Text


Create a projection on table MDGI_OTC_T_BS.

Create HANA-Based Analytics for SAP Data Replication

10

Create HANA-Based Analytics for SAP Data Replication

Node Join Join_RplctnStatus_to_OTC_Text


Create a text join with ProjRplcntStatusWithBusSyst and Projection_OTC_Text.

11

Create HANA-Based Analytics for SAP Data Replication

Node Aggregation

12

Create HANA-Based Analytics for SAP Data Replication

Node Semantics
This calculation view does not have a data category and has no privileges.

13

Create HANA-Based Analytics for SAP Data Replication

CalculationView DataReplicationQuery
You use a query view as a basis for creating KPIs.
The data category is CUBE and the privilege is Analytic Privileges, default client is Cross Client.
In this view, measures are calculated.

Add Calculated Columns


By selecting the aggregation node, you will see the calculated columns on the right hand side which show
the available counters and measures.
Name

Data Type

Exception Aggregation

Columns

TotalReplication

Integer

COUNT_DISTINCT

RunId

Formula
IsFailed

VARCHAR (1)

if("StatusName"='SE' OR
"StatusName"='PE','X',' ')

Create xsodata service


In the HANA DB studio, create a project (for example, tmp.ORTHG) with a folder for the calculation view for
example DataReplicationQuery and a subfolder odata for the xsodata file.
Syntax:
service {"tmp.ORTHG.DataReplication::DataReplicationQuery" as "DataReplicationQuery"
keys generate local "GenID"
aggregates always;
}
annotations
{
enable OData4SAP;
}
Test the xsodata service:
Right-click on the .xsodata file -> runs as XS Service.

14

Create HANA-Based Analytics for SAP Data Replication

Result:
Browser starts with a valid XML document.

15

www.sap.com

2015 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form
or for any purpose without the express permission of SAP SE or an SAP
affiliate company.
SAP and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP SE (or an
SAP affiliate company) in Germany and other countries. Please see
http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for
additional trademark information and notices. Some software products
marketed by SAP SE and its distributors contain proprietary software
components of other software vendors.
National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for
informational purposes only, without representation or warranty of any kind,
and SAP SE or its affiliated companies shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP SE or
SAP affiliate company products and services are those that are set forth in
the express warranty statements accompanying such products and services,
if any. Nothing herein should be construed as constituting an additional
warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue
any course of business outlined in this document or any related presentation,
or to develop or release any functionality mentioned therein. This document,
or any related presentation, and SAP SEs or its affiliated companies
strategy and possible future developments, products, and/or platform
directions and functionality are all subject to change and may be changed by
SAP SE or its affiliated companies at any time for any reason without notice.
The information in this document is not a commitment, promise, or legal
obligation to deliver any material, code, or functionality. All forward-looking
statements are subject to various risks and uncertainties that could cause
actual results to differ materially from expectations. Readers are cautioned
not to place undue reliance on these forward-looking statements, which
speak only as of their dates, and they should not be relied upon in making
purchasing decisions.

S-ar putea să vă placă și