Introduction to SAP HANA Modeling for SAP Business One: Modeling Master Data Dimensions Welcome to Modeling Master Data Dimensions for SAP Business One.

Slides:



Advertisements
Similar presentations
Topic: Sales Tax and 1099 Reporting
Advertisements

MyFloridaMarketPlace Analysis 2.0 Functional Overview December 18 - December 19, 2007.
Creating Custom Forms. 2 Design and create a custom form You can create a custom form by modifying an existing form or creating a new form. Either way,
Adobe Forms THE FORM ELEMENT PANEL. Creating a form using the Adobe FormsCentral is a quick and easy way to distribute a variety of forms including surveys.
Your Tour Guide is Jim Provensal. What We Will Cover s Introduction to MicroSoft Access u What is a database u What is a “Relational” Database s The Major.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Introduction to Access By Mary Ann Chaney and Alicia Harkleroad.
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
Teacher’s Assessment Assistant Worksheet Builder Starting the Program
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
Introduction to Enterprise Guide Jennifer Schmidt Rhonda Ellis Cassandra Hall.
Gold – Crystal Reports Introductory Course Cortex User Group Meeting New Orleans – 2011.
Online Catalog Tutorial. Introduction Welcome to the Online Catalog Tutorial. This is the place to find answers to all of your online shopping questions.
An Introduction to Forms. The Major Steps of a MicroSoft Access Database  Tables  Queries  Forms  Macros  Reports  Modules On our road map, we are.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 6 1 Microsoft Office Access 2003 Tutorial 6 – Creating Custom Forms.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
3M Partners and Suppliers Click to edit Master title style USER GUIDE Supplier eInvoicing USER GUIDE The 3M beX environment: Day-to-day use.
Microsoft Office Access 2010 Lab 1
Microsoft Office Access 2010 Lab 3
Creating Oracle Business Intelligence Interactive Dashboards
Working in the Forms Developer Environment
MRP: Material Resource Planning
Microsoft Access 2013 Bobby Wan.
Creating & Editing Reports
Microsoft Office Access 2010 Lab 2
The Smarter Balanced Assessment Consortium
Data Virtualization Tutorial: XSLT and Streaming Transformations
Hiring Center An Inside Look… Your inside look at the hiring center.
SQL MODELER - OPEN There are Three Ways to open the SQL Modeler
Regional Architecture Development for Intelligent Transportation
Best Practices for SAP HANA Modelling and SAP Data Services Data Loading Dr. Bjarne Berg PwC.
Additional Configuration The Intercompany Integration Solution for SAP Business One Version 2.0 for SAP Business One 9.1 Welcome to the course on additional.
RAD-IT Architecture Software Training
The Smarter Balanced Assessment Consortium
Adding Assignments and Learning Units to Your TSS Course
(Global / All Markets View)
Comprehend. Create. Communicate. Achieve More.
Access Lesson 1 Understanding Access Fundamentals
Exploring Microsoft Office Access 2007
AIRWays Reporting Training Module
Database Applications – Microsoft Access
12 Product Configurator
Microsoft Office Access 2003
Tutorial 1 – Introduction To Microsoft Access 2003
Additional Configuration The Intercompany Integration Solution for SAP Business One Version 2.0 for SAP Business One 9.1 Welcome to the course on additional.
The Smarter Balanced Assessment Consortium
Microsoft Official Academic Course, Access 2016
Microsoft Office Access 2003
Tutorial 3 – Querying a Database
The Smarter Balanced Assessment Consortium
Relational Queries (query 12) Display vendor contact info (contact person and phone number) for inventory products (relationship query) Query: Inventory.
Microsoft Office Access 2003
NORMA Lab. 5 Duplicating Object Type and Predicate Shapes
Word offers a number of features to help you streamline the formatting of documents. In this chapter, you will learn how to use predesigned building blocks.
Microsoft Office Access 2003
Introduction to Database Programs
From and Report.
Welcome USPS – R 03/20/2019 4/6/2019.
Exploring Microsoft Office Access 2010
EBSCOhost Digital Archives Viewer
Tutorial 7 – Integrating Access With the Web and With Other Programs
Introduction to Database Programs
The Smarter Balanced Assessment Consortium
The Smarter Balanced Assessment Consortium
New Perspectives on Microsoft
Presentation transcript:

Introduction to SAP HANA Modeling for SAP Business One: Modeling Master Data Dimensions Welcome to Modeling Master Data Dimensions for SAP Business One version for SAP HANA. In this course, we use the Modeler perspective in the SAP HANA Studio to model a dimension in the semantic layer of the SAP Business One version for SAP HANA.

Objectives At the end of this topic, you will be able to: Describe how to model master data for SAP Business One in the SAP HANA Studio At the end of this topic, you will be able to describe how to model master data for SAP Business One in the SAP HANA Studio.

Business Scenario The sales manager at OEC Computers wants to analyze sales totals in an interactive way. He wants to be able to see invoice amounts summarized by customer information and date. Transactions and Dimensions Needed: Transaction: A/R invoice Measure(s): document total Dimensions: Customer Group, Customer, Posting Period Potential additional measures and dimensions: tax amount, status, territory, sales employee, item, item group, etc. We will base our model on this business scenario. The sales manager at OEC Computers wants to analyze sales invoice totals in an interactive way. He needs to be able to see the invoices summarized by customers information and by time period. Think a moment about what measures and dimensions you would include. After discussing his analysis needs in more detail, we determine that the business transaction underlying our model will be the A/R invoice. The measure needed is document total. The dimensions will include customer, customer group, fiscal year and posting period. To provide more options for future analytic needs, it might also be a good idea to include some additional measures and dimensions, such as tax amount, document status, territory, sales employee, item, and item group.

Copy and Extend vs. Create New In this example, we create new views for you to learn the steps. However SAP recommends you copy and extend existing views. Why? SAP provides a robust semantic layer with pre-built views designed for SAP Business One analytics Reuse views exist for dimensions and query views are ready to use. Main reason to create views is to add custom columns or to delete unused columns, however, it is easy to copy an existing view to add or delete columns. In this course we will create new views so that you can learn the steps. However, SAP recommends that you copy and extend existing views wherever possible. Why? SAP provides a robust semantic layer with pre-built views designed for SAP Business One analytics Reuse views exist for dimensions and query views are ready to use. Main reason to create views is to add custom columns or to delete unused columns, however, it is easy to copy an existing view to add or delete columns. For example, one reason to copy and modify a view might be to add user-defined fields. See the document How to Guide on How to Work with Semantic Layers to see the large number of delivered views available. In the demo, you will see that we have added a user-defined field for Business Partner size to the OCRD table. In order to use this field as an attribute in reporting, we need to add it into our Business Partner dimension. In real life, we would copy the delivered reuse view for the Business Partner dimension and add the user-defined field. Then we would copy any query views that use that reuse view as a dimension so that we could replace our dimension with the delivered dimension.

Model for our Business Example To provide the analysis our sales manager needs, we will create: Dimensions for business partners and dates Cube for invoices joined with master data dimensions Dimension for Dates Data Foundation Year Quarter Month Date Time Stamp Cube for Invoices Data Foundation Invoice Date Invoice Number Customer Invoice Total Tax Amount Dimension for Business Partners Business Partner BP Name BP Group BP Group BP Group Name Country Country Country Name In our business scenario, we will create the following views to provide the analysis our sales manager needs: A dimension for business partners A dimension for dates Then we will tie them together with the transactional data in cube for our invoice transactions The cube will be based on the OINV table of the A/R invoice transaction. That table will form the data foundation for the calculation view. However, we need more details on the customer than we find in the transactional table OINV. We want to be able to subtotal the report by the customer name and customer group name as well as by country. Therefore, we need to reference the business partner table OCRD and the business partner group table OCRG for the details. To be able to run reports by country, we need to add a link to the table OCRY. We do this by creating by creating an master data dimension based on OCRD, OCRG and OCRY. Additionally, we want to be able to summarize our report by year, quarter and month. So we will also create a dimension for dates. Once the two views for the master data dimensions are created, we create an calculation view cube with star schema that uses the OINV table as the data foundation. We will go through the process of creating these three calculation views.

Business Partner Dimension DocEntry Date BPCode DocTotal Tax 1 20120301 C001 100.00 8.00 2 20120302 C002 150.00 12.00 First we will be creating a view to represent a business partner dimension. A dimensions only contains attributes not measures. Think about the data we normally have in a transaction. At the top of the graphic, we see a typical sales transaction. The document entry, posting date and business partner code are the attributes in this transaction. Attributes allow us to give context and meaning to the measures like document totals in the transactions. Attributes are typically master data. Some attributes, such as business partner code, are also keys in related tables that contain more information related to those attributes. The view shown in the bottom half of the graphic is based on business partner master data. Even though only the business partner code appears in the transactional data above, a view with the business partner code as the key can bring in related business partner information such as business partner’s group or region. In our business scenario, we want to analyze figures in the OINV table. This table contains the information that will help us report on when the transaction was posted and which customer was invoiced. However, if we want more information on the business partners, such as business partner groups, we need to pull that information from related tables. The business partner details are contained in the OCRD table. This table will include the business partner group code. However, most report users do not want to just see the code for the business partner group. They want to see the group name. Therefore we need to have a join between the OCRD business partner table and the OCRG BP group table which contains the group name. A master data dimension allows us to make this link. We can set up a view containing the Business Partner Code and Name as well as the Business Partner Group and Name. This view can then be joined with transactional data in another view built as a cube with a star schema for reporting invoice information. It also gives us the flexibility to use this same dimension in other cubes for reporting on different sales and purchasing documents. Remember that this dimension will only contain attributes, no measures. Later we will link this view to transactional data for reporting when we build a cube.

Building a dimension Here is the process flow for creating a dimension: Here is the process flow for creating a dimension: First set the parameters for the view. Then select the tables you want for the view. In our first example we will be selecting the OCRD table for business partners and the OCRG tables. You then define the table joins and their properties. Next you select attributes and measures for the view. For our first dimension, we will select the business partner code and name and the BP group and name. Optionally you create hierarchies in the model. Hierarchies are used to better aggregate data reflecting the relationship between the levels. For example, the geographic relationship like Country, State and City. Another example is a hierarchy for dates. We will see this in the second demo when we build our second dimension for the posting date. Once you complete these steps, save and activate your view. At that point you can preview the data Now we will take a closer look at the steps in this process.

First step: setting parameters Name and Label Calculation View Type Always use calculation views for speed Copy from Choose a view as the basis for your view Can modify copy Changes in the original do not affect the copy. Subtype Defaults to graphical Option to use Scripted Data Category Set to Dimension When creating a new view in the SAP HANA Studio, the first step allows you set up basic view parameters. First enter a name and a descriptive label. Then use the Calculation View type. A best practice is to copy an existing view and modify the copy to meet your needs. Mark the checkbox Copy from and then browse for the view you wish to copy. The copy does not keep a connection with the original. If the original is changed, the changes do not affect the copy. The default subtype for a calculation view is graphical. This allows you to drag and drop elements to build your view. If you prefer writing code, you can choose the option for a scripted view. Choose Dimension as the subtype when modeling master data attributes.

Nodes in a Dimension A New Dimension contains: Projection Node Semantics node Other types of nodes include: Join Union Aggregation You can add other nodes as needed. Click on the node type in the toolbar on the left. Then click in the Graphical area to add the node. In our Business Partner Dimension we need to add a Join before we choose tables. A newly created dimension contains a projection node and a semantics node. A projection node allows you to add tables to a model, to select fields and to filter data. The semantic node defines the output for your model. You have the option of adding other types of nodes. These are the join, union and aggregation nodes. It is easy to add nodes as needed. Just click on the node type in the toolbar on the left then click in the graphical area to add the node. In our example, we want to join the business partner table OCRD with the business partner group table OCRG, so we need to add a Join node before we choose tables.

Select tables Use a search window to find tables: Choose Add Objects icon, or Open the context menu from the node and choose Add Objects Drag tables from Catalog to the node or You can select the tables you want in two ways. You can drag tables from the Catalog folder to the nodes node in the Scenario panel. Or you can select a node and choose Add from the Context menu.

Add Filters Add a filter on CardType column Right click on the CardType column Select AddFilter Choose operator and Value You can set a filter for your attributes if you desire. The option to apply a filter is available in the context menu. For example, you can limit output from the business partner table to only customers, no leads or vendors. Once you have set a filter, a filter symbol appears to the right of the field in the table and the details are visible in the field’s properties.

Define join conditions Define the join type Inner join Left Outer Join Set the cardinality View the join properties in the Properties box When you join tables, you need to define the join conditions, such as the join type and cardinality. You can view the join conditions in the Properties box. Cardinality defines the relationship between the joined tables. Examples of cardinalities include one-to-many, one-to-one or many-many. For example there is a one-to-many relationship between business partner groups and business partners, because a business partner can belong to only one group. if you want to have different cardinalities from the same table, you can add the same table more than once using table aliases in the editor. In a moment, we will discuss the join types frequently used in SAP HANA views.

SAP HANA Join Types Inner Join: The INNER JOIN selects the set of records that match in both the Tables. Left Outer Join: The Left Outer Join selects the complete set of records from first table, with the matching records (where available) in the second table. If there is no match, the right side will contain null. Right Outer Join: The Right Outer Join selects the complete set of records from second table, with the matching records (where available) in the first table. If there is no match, the left side will contain null. Full Outer Join: The FULL OUTER JOIN selects the set of records that match in both the Tables. There are four join types: the inner join, the left outer join, the right outer join and the full outer join. An inner join selects the set of records that match in both tables. A left outer join selects the complete set of records from the first table and selects the matching records (where available) in the second table. If there is no match then the right side will contain null. A right outer join is similar to a left outer join except that the main table is on the right rather the left. The right outer join selects the complete set of records from the table on the right with the matching records where available with the left table. If there is no match the left side will contain null. A full outer join selects the set of records that match both tables. The first two join types are the most popularly used. Let’s look at some examples of how these two join types work.

Left Outer Join C_CODE C_NAME NATION 1 Smith AU 2 Jones 3 Martinez MX 4 Rosario NATION NNAME AU AUSTRALIA KO KOREA Returns all rows from left table Even if no matches in right table C_CODE C_NAME NATION NNAME 1 Smith AU AUSTRALIA 2 Jones 3 Martinez MX ? 4 Rosario The left outer join is a popular join type for views because it returns all rows from the left table even if there are no matches in the right table. Let us look at a couple of tables and how the left outer join would work with these tables. In our example, we will have a customer table and a nation table. The customer table contains 4 rows of customers. These four customers reside in 2 nations. The nation table contains 2 values and is missing one of the nations in the customer table. When we use a left outer join between the customer and nation table, this join returns all rows from the left table even if there are no matches in the right table.

Inner Join C_CODE C_NAME NATION 1 Smith AU 2 Jones 3 Martinez MX 4 Rosario NATION NNAME AU AUSTRALIA KO KOREA Only returns rows where there is a match on both sides of join Example returns only first two rows because no value for MX in table C_CODE C_NAME NATION NNAME 1 Smith AU AUSTRALIA 2 Jones Another option would be an inner join, so let us look at what happens when you use an inner join with the same tables. As we saw before, we will have a customer table and a nation table. The nation table is missing one of the values for nations in the customer table. When we use an inner join between the customer and nation table, this join only returns rows where there is at least one match on both sides of the join. Therefore, we only see the first two rows of the customer table, because there is no value for MX in the nation table.

Referential Integrity Referential integrity requires that every value of fields where tables are joined (join partners) exist in both tables. These tables lack referential integrity because the Nation table is missing a value in the Customer table. C_CODE C_NAME NATION 1 Smith AU 2 Jones 3 Martinez MX 4 Rosario NATION NNAME AU AUSTRALIA KO KOREA One of the important concepts in data modeling is the property of referential integrity. As we saw in our example, the inner join could return results for customers 3 and 4 because there was no value MX in the Nation table. Referential integrity requires that every value of the fields where the tables are joined (join partners) exist in both tables. The tables in this example lack referential integrity because the Nation table is missing a value for Nation that is found in the Customer table. This is why we will use left outer joins in master data dimension for business partners.

Tips on Joins for Dimensions The Many table must be the left / inner table. Check all joins have cardinality 1 to the right/outer table and 1 or N to the left/inner table. Drag joins from the center table to outer table, then change cardinality as needed. Recommendations: Use Left Outer Joins when facts with missing attributes are allowed Here are some tips for creating joins for your dimensions. When there is a one-to-many cardinality, the Many table must be the left/inner table. Check all joins have cardinality 1 to the right/outer table and 1 or N to the left/inner table. Drag joins from the center table to outer table, then change cardinality as needed. Recommendation: Use Left Outer Joins when facts with missing attributes are allowed. For more information on joins, use the link to the sap HANA tutorial shown on the graphic. For more info: http://saphanatutorial.com/sap-hana-join-types/

Select attributes Define the output structure for view Add table columns to output Specify any filters The next step is to select the attributes you want in your view. You need to explicitly define the output structure for your view. There are two ways to add the table columns to the output. You can select the toggle button on the left of the table field, or open the context menu for the field and choose Add to Output. The fields you choose are automatically mapped as attributes and appear in the Output area. Additionally all the chosen attributes in the tables appear in bold with an orange dot to the left (as we see in the graphic). You can set a filter for your attributes if you desire. The option to apply a filter is available in the context menu. For example, you can limit output from the business partner table to only customers, no leads or vendors. Once you have set a filter, a filter symbol appears to the right of the field in the table and the details are visible in the field’s properties.

Connect All Nodes in Model All nodes need to be connected The model ends at the projection and semantic nodes A view can have multiple nodes Draw a line from one node to another to connect nodes A calculation view can have multiple nodes. In this graphic we see two Join nodes. Notice how the nodes are connected by a line and how there is a dot on each end of the line. The dot at the top of a node represents the output of that node. The dot on the bottom of each node represents the input to that node. To connect nodes, draw a line from one node to another. All nodes need to be connected so that the model ends at the semantics node.

Semantics Node Set the final output for the dimension in the Semantics Node In this node you can: Mark attributes and measures Rename or change labels for columns Create filters Hide columns Create hierarchies Set variables or parameters Define key attributes The final node is always the Semantics Node. Here is where you set the final output for the model. In this node, you can: Mark attributes and measures Rename columns or change column labels Create filters Hide columns Create hierarchies Set variables or parameters Define key attributes

Save and activate Saving the view: the view is not visible to reporting tools until activated. Activating the view: makes the view visible to reporting tools Remember, if you change the view after activation, save and reactivate the view. Save and validate The final step is to save and activate the view. Saving the view saves the information model, the metadata of the view that has just been defined. The view is not visible to the reporting tools until it is activated. A model that is inactive has a gray diamond on the model’s icon in the package. Activating the view makes the view visible to reporting tools. When you save and activate the model, the job log will show that the activation is successful and the gray diamond on the model’s icon disappears. Remember if you change the view after activation, you must reactivate the view. Save and activate

Preview Data Preview data to confirm the model works. Three ways to preview data: Raw Data Distinct Values Analysis The data preview functionality is useful for confirming that one has modeled data the way you have intended. To preview data, select your model in the Navigator and then choose the option Preview Data from the context menu. You can also choose the Preview icon. There are three ways to preview data. The Raw Data tab gives you the table format of data. The Distinct Values tab displays unique values for each field in both text and graphic. So for example, if we are looking at an analytic view that includes customers and countries, we could see the count for the total number of countries in the data as well as a graph with those unique values. The Analysis tab allows you to select attributes and measures to display query results in either a graphical or table format. In the case of our dimension, we only have attributes to select. This tab will be more useful to us when we create an analytic view.

Case Study – Create a Business Partner Dimension Physical tables: OCRD, OCRG, OCRY Output: BP Code BP Name BP Type BP Group Name BP Country Name In this example, we create a business partner dimension in the SAP HANA Studio modeler. We will use a schema of our SAP Business One database that contains the Business One tables. We will choose the tables OCRD, OCRG and OCRY. The output from this view will be BP code, BP Name, BP Type, BP group name and BP Country.

Summary Key points about dimensions: Dimensions give us the ability to join related tables of master data. Dimensions are used in transactional cubes to give additional context to the transactional data. The best practice is to copy existing views and modify them. To create a reuse view for a dimension, use a calculation view with Dimension as the subtype. A newly created dimension contains a projection node and a semantics node. When you join tables, you need to define the join conditions, such as the join type and cardinality. Use Left Outer Joins when facts with missing attributes are allowed. Set the cardinality N:1. Select the attributes you want in your view. Set final output in Semantics node. You need to choose at least one key attribute. Save and activate then preview data for accuracy. Here are some key points on creating dimensions: Dimensions give us the ability to join related tables of master data. Dimensions are used in transactional cubes to give additional context to what is found in a fact table. The best practice is to copy existing views and modify them rather than creating a new view. To create a reuse view for a dimension, use a calculation view with Dimension as the subtype. A newly created dimension contains a projection node and a semantics node. When you join tables, you need to define the join conditions, such as the join type and cardinality. Use Left Outer Joins when facts with missing attributes are allowed. Set the cardinality to N:1. Select the attributes you want in your view. Set the final output in the Semantics node. You need to choose at least one key attribute for your view. Save and activate your view then preview the data for accuracy.

This concludes the topic on modeling master data dimensions. Thank you This concludes the topic on modeling master data dimensions. Thank you for your time. This concludes the topic on modeling reuse views for master data dimensions for SAP Business One.