Creating a Semantic Layer with SAP Business Objects Universe – (Enterprise version) MOTIVATION LEARNING METHOD This material is an introduction to how to develop a SAP Business Objects Universe. It is aimed at students at universities, universities and other educational institutions with limited experience with Business Intelligence. The learning method used is “guided learning.” The benefit of this method is that knowledge is imparted quickly. Students also acquire practical skills and competencies. As with an exercise, this method explains a process or procedure in detail. It can be used in the classroom or for self-study. On completion of the course, students will be able to understand the basic concepts of a universe and how to design and develop a universe.. Exercises at the end enable students to put their knowledge into practice. The material also serves as a reference for occasional users of SAP systems. This version of the notes is designed for the SAP BOBJ Enterprise version Product SAP Business Objects Universe Design Tool Level Beginner Focus Semantic Layer Author Paul Hawking Paul Hawking 1 March 2015 Version 1 SAP Business Intelligence provides a broad range of reporting tools to facilitate decision making of the different end users. These tools can interact with data from different data sources. SAP Business Objects provides a semantic layer (universe) which facilitates the interaction with data sources and the extraction of data. This tutorial provided you with a step by step explanation of how to construct a universe which will be utilised in later reporting exercises. . Scenario Global Bike International (GBI) is a world class bicycle company serving both professional and amateur cyclists. The company sells bicycles and accessories. In the touring bike category, GBI’s handcrafted bicycles have won numerous design awards and are sold in over 10 countries. GBI’s signature composite frames are world-renowned for their strength, low weight and easy maintenance. GBI bikes are consistently ridden in the Tour de France and other major international road races. GBI produces two models of their signature road bikes, a deluxe and professional model. The key difference between the two models is the type of wheels used, aluminium for the basic model and carbon composite for the professional model. GBI’s off-road bikes are also recognized as incredibly tough and easy to maintain. GBI off-road bikes are the preferred choice of world champion off road racers and have become synonymous with performance and strength in one of the most gruelling sports in the world. GBI produces two types of off-road bike, a men’s and women’s model. The basic difference between the two models is the smaller size and ergonomic shaping of the women’s frame. GBI also sells an Accessories product line comprised of helmets, t-shirts and other riding accessories. GBI partners with only the highest quality suppliers of accessories which will help enhance riders’ performance and comfort while riding GBI bikes. Figure 1 displays the GBI range of products. Paul Hawking 2 March 2015 GBI BIKE Bicycles TOUR Touring DXTR Deluxe touring bike ACCR Accessories ORBK Off Road PRTR Professional touring bike DXTR 1000 Black PRTR 1000 Black DXTR 2000 Silver PRTR 2000 Silver DXTR 3000 Red PRTR 3000 Red PROT Protective ORMN 1000 Men’s standard PADS Pads ORWM 1000 Women’s standard UTIL Utilities HLMT Helmets SHRT 1000 T-shirt EPAD 1000 Elbow pads OHMT 1000 Of f road helmet RKIT 1000 Repair kit KPAD 1000 Knee pads RHMT 1000 Road helmets PUMP 1000 Air pump CAGE 1000 Water bottle cage BOTL 1000 Water bottle FAID 1000 First aid kit Traditionally GBI was a wholesaler who sold their bikes to retailers who then resold the bikes to the end consumers. Recently GBI has decided to sell their bike to the end consumer via the internet. Organisational Structure GBI’s headquarters are located in Dallas and the European subsidiary company (GBI Europe) is based in Heidelberg, Germany. In regards to the GBI sales process there are two sales organisations for America (Eastern US and Western US) and two for Germany (Northern Germany and Southern Germany). All sales organisations have a wholesale distribution channel responsible for delivering the products to the customers. However only one sales organisation is required in each country to support internet sales. The diagram below displays the GBI organisation to support the sales process. Paul Hawking 3 March 2015 Requirements GBI management currently SAP ECC to manage and automate their business processes. They have discovered that one of their departments are using a Microsoft Access database to record sales data. The Department Heads have indicated that they would like the information provided in a user friendly format. This will facilitate them to gain greater insight to their sales data to understand the trends and sales performance. In response to these concerns, it was decided to build a number of reports using SAP Business Objects Interactive Analysis. To provide the connection between the data source (Microsoft Access) and the reporting tool a universe needs to be created.. Paul Hawking 4 March 2015 SAP Business Objects Universe What is a Semantic Layer? A semantic layer is a business representation of corporate data that helps end users access data using common business terms. Often when database developers build databases their main objectives involve the efficient creation, updating and deletion of data. They are not usually concerned about whether non database people understand the complexities of the underlying structures. While business users want to create reports based on the data contained in the database to facilitate decision making. The semantic layer insulates the business users from the underlying data complexity while ensuring the business is accessing the correct data sources and using consistent terminology. The semantic layer enables users to use common business terms rather than the technical database language to access, manipulate, and organise information, it simplifies the complexity of the business data. The following diagram displays the various components of the semantic layer. Paul Hawking 5 March 2015 SAP Business Objects Universe A Universe is a semantic layer tool used in Business Objects to map the data in your data source using everyday terms. The Universe enables the user to create a query to extract the data from a data source, describe it using common business terms and then analyse the data using different reporting tools. The Universe is used to run queries against the data source to extract data. . Paul Hawking 6 March 2015 Below is an example of a Universe based on the GBI data. The Universe structure contains: Connection details to a data source SQL structures (called Objects) to map the database structures (columns, tables, and database functions) A schema of the tables and joins used in the database On the right of the screen is the schema of the database. While on the left are Universe objects that are required for reporting. A Universe can be used to connect to a variety of data sources (Databases, Excel, XML, Text, Web Services. The release of SAP Business Objects 4.0 provided functionality to connect directly with SAP solutions and thus a universe is no longer required to connect to SAP. Paul Hawking 7 March 2015 Building a Universe You use the Business Objects Universe Designer (also referred to as Universe Design Tool) to create a Universe. However before you create a universe you need to create a database connection. Creating a database connection A data access driver is the software that connects the Universe to your middleware. Data access drivers provided with Business Objects include: IBM DB2, Informix, Microsoft SQL Server, Oracle, Sybase, Teradata, Hyperion, Generic OBDC. For this exercise you are going to use OBDC connection drivers. OBDC (Open Database Connectivity) is Microsoft’s interface for accessing data in a heterogeneous environment of relational and non-relational databases. 1. Choose Start Settings Control Panel Administrative Tools This is dependent on your operating system. An alternative might be: Choose Start Programs Administrative Tools 2. Double-Click 3. Click 4. Click Data Sources (OBDC). to move to this screen. to display the Create New Data Source screen. You now need to select the appropriate driver for your data source. For this exercise you will be using a Microsoft Access database. Paul Hawking 8 March 2015 5. Click 6. Click Microsoft Access Driver (*.mdb) – need to scroll down. to proceed to the next step in the process. The OBDC Microsoft Access Setup screen appears. You will now need to name your data source and link it to the GBI database. 7. Type <your name>GBI in the Data Source Name: field. 8. Press <TAB> to move to the next field. 9. Type GBI Data Source in the Description: field. 10. Click 11. Locate the GBI (GBI.mdb) database. Refer to workshop leader for the location 12. Click GBI.mdb to select it. 13. Click 14. Click Paul Hawking to link to the GBI database. . 9 March 2015 You will notice that your new Data Source connection is listed. 15. Click Paul Hawking to complete the process. 10 March 2015 Creating a Universe You create a Universe using the Universe Designer. To access the Universe Designer: 16. Choose Start Programs Interactive Analysis Universe Designer. The Universe Designer path maybe different depending on which version of Business Objects you are using. An alternative path is: Choose Start Programs SAP Business Intelligence SAP Business Objects BI Platform Client Tools Universe Design Tool. A logon dialog screen appears. This screen enables you to provide the logon details and user credentials to logon to a data source. For the purpose of this exercise you will be suing a Microsoft Access database (GBI.mdb) which is stored on your PC. Therefore there is no need for authentication. 17. Click 18. Click 19. Click Paul Hawking in the Authentication field to display the available options. Standalone (No CMS) to select this option. You may have to scroll down. to complete the process. 11 March 2015 After a short time the Universe Designer Wizard appears. This wizard walks the user through the steps in creating a basic Universe. For the purpose of this exercise you will initially us the wizard. You can see that there are four steps in the process. 20. Click to begin the process. Step 1: Define the universe parameters This step involves linking your new universe to the database connection you created previously. 21, Type <name> GBI Universe in the Enter the universe name field. Although you have created a ODBC connection you have not created a connection to your universe. 22. Click to create this connection. You will select a target database middleware, then configure the data access driver that you use to access the middleware. You can also set certain parameters to optimize your connection. 23. Type 24. Click Paul Hawking GBI Connection in the Connection name field. to move to the next step in the process. 12 March 2015 The Database Middleware Selection screen appears. You will now need to select the OBDC driver for Microsoft Access 2010. 25. Scroll down till OBDC Drivers 26. Click this driver to select it. 27. Click MS Access 2010 appears. to move to the next step in the process. You now need to specify the logon details to your data source. You are going to accept the default credentials. 28. Click in the Data Source name: field to display the available options. Notice that your previously defined data source (<your name>GBI) appears. 29. Click <your name>GBI to select it. Before you continue any further you should test the data source connection. 30. Click Paul Hawking 13 March 2015 The following message should appear: If not contact your workshop leader. 31. Click 32. Click . to move to the next step in the process. The Configuration Parameters determine how the universe interacts with the data source. 33. Click process. to accept the defaults and to move to the next step in the 34. Click to complete the connection. Note more details about settings for the data source connection can be found in Help. You can access Help by pressing <F1>. You have now defined the Universe Connection Parameters. 35. Click . Step 2: Create Classes and Objects A Universe uses classes and objects to represent the database’s structures. An object represents a column (data element), calculation or function in a data source. It represents a meaningful entity, fact, or calculation used in business environment. Objects are selected to construct a query. Once the query is performed, the objects are returned with values. A class is a logical collection of objects. Most classes in Business Objects correspond to a table in the database. But this may not be user friendly for a business user. Paul Hawking 14 March 2015 The Create Initial Classes and Objects dialog screen lists the tables in the data source. . Your data source may require many tables or columns that are not required in your query for analysis. This screen gives you the options of only selecting objects you require. 36. Scroll down 37. Click to display table. to select it. You can view the contents of the table to check that it is the table you require for the query. 38. Click Some of the Material table values appear. 39. Click to close the screen. You have determined that the Material table is required for analysis and therefore should be included in your Universe. 40. Click Paul Hawking to include the table in the universe. 15 March 2015 Notice how the table now appears in the classes and objects area. 41. Click next to to expand the class and display the objects. 42. Click to close the Material class. You now need to add the remaining tables to your Universe. 43. Add Paul Hawking the following tables to your universe. 16 March 2015 Your screen should appear similar to below: 44. Click to move to the next step in the process. Step 3: Create Measure Objects Measure objects retrieve numeric data, or calculated data based on data in the database. A Measure objects usually reflects the value of a transactions such as amount, quantity etc. Measure objects are usually aggregated (sum, min, max, count etc) in some way. For the purpose of this exercise you will create Measure Objects using the wizard and manually. Currently the Create Measure Objects dialog screen appears. Notice that the tables that were previously were selected for classes and objects appear on the left of the screen. Also notice that there are different aggregation functions options (count, sum, minimum, maximum). You will define the Quantity field in the GBI Transactions table as a Measure Object and use the Sum aggregation function. Paul Hawking 17 March 2015 45. Click next to 46. Click 47. Click Measure Object. to display the fields. Quantity to select it. to select this aggregation function and define the Notice that Quantity now appears on the right of the screen. 48. Click to move to the next step in the process. Step 4: Generate the Universe Your Universe has now been generated and can be further enhanced manually. Your screen should appear similar to below. 49. Click Paul Hawking to view your newly created universe. 18 March 2015 Universe Design Tool The Universe Designer appears on screen with the Objects and Classes that you previously defined. Screen components The screen contains a number of areas which you will be using in this tutorial. Structure Pane This contains a graphical representation of the underlying target database of the Universe. It includes the tables and joins to which you map objects that end users use to run their queries Universe Pane This contains the Classes and objects defined in the universe. These are the components of the Universe that users see and use to create their queries. Paul Hawking 19 March 2015 Adding a Table Previously you used the wizard to add the necessary tables to your Universe. An alternate method is to add the tables manually using the Table Browser. You have realised that you require the Material Group table data for future reports and will need to be added to the Universe. To add another table: 50. Click on the Editing toolbar to display the Table Browser. Joins 51. Click 52. Click 53. Click to select this table. to insert the selected table to the Universe. the dialog screen. Notice the new table appears in the Universe. 54. Drag Paul Hawking the Material Group table to re-position it near the Product Category table. 20 March 2015 Defining Table Joins You will notice that many of the tables in the Structure Pane are related to each other through the use of joins. These have been determined by the wizard based on the name of fields. You need to check these carefully as they can often be incorrect and will impact the data extracted from the data source. You will also notice that some of the tables (Sales Organisation, Material Group) are not related to any other tables. You will need to create a join. You can do this manually by using the mouse to drag a line from a column in one table to a matching column in another table. 55. Drag the Sales Org field in the Sales Organisation table to the Sales Organisation field in the GBI Transactions table. Notice that a line appears between the two fields to indicate a relationship (join). 56. Drag the Material Group field in the Material Group table to the Material Group field in the Product Category table. Paul Hawking 21 March 2015 Setting Cardinalities Setting cardinality is a critical step in a universe design. Cardinality refers to relationship between two tables based on the join. It indicates how many rows in one table will match those in the other. You can detect cardinalities automatically or create them manually. You will notice that the joins between many of the tables looks differently to the joins you just created. This indicates that the cardinality has been automatically determined. To automatically detect cardinality: 57. Click 58. Click 59. Click 60. Click the Material Group join to select it if it is not already selected. on the Editing toolbar to detect cardinalities. the Sales Org join to select it. on the Editing toolbar to detect cardinalities. Notice that the join graphics have changed. To better understand join characteristics: 61. Double-click the Sales Org join to display the Edit Join dialog screen Notice the screen explains the type of join and displays the corresponding SQL statement. You could have created the join cardinality manually using this dialog screen 62. Click Paul Hawking to close the dialog screen. 22 March 2015 Describing Classes and Objects Using the wizard you defined a number of classes and objects. A class was used to group related objects. 63. Click objects. next to to expand the class and display its corresponding In a Universe you can define three different types of objects. Measure objects are the key metrics contained in a query. For example, sales amount, quantity, result. They are usually aggregated. Dimension objects are used to analyse and provide meaning to a Measure object. For example, product and customer Dimensions objects provide a better understanding of a quantity measure object. Lastly a Detail object provides a description to a Dimension object. For example the Distribution Channel Dimension object has the Distribution Channel Description Detail object. ie “IN” > “Internet” Defining A Class A class is a logical grouping of objects in a Universe. The naming of a class should indicate to the user the type of objects it may contain. Currently the classes contained in the universe reflect the database design. You need to change these classes to make them appear more logical to the end user and query developer. The proposed design is: Class Material GBI GBI Sales Paul Hawking Objects Material Group Material Group Description Product Category Product Category Description Material Material Description Standard Price Unit Cost Sales Organisation Location Distribution Channel Distribution Channel Description Date (Year of Date, Quarter of Date, Month of Date) Quantity Revenue Cost 23 March 2015 You currently don’t have the GBI or GBI Sales classes. You can either create a new class or rename and existing class. 64. Right-Click <your name> GBI Universe Measures class to display the context menu. 65. Choose Class Properties to display the dialog screen. 66. Type GBI Sales as the new Class name. 67. Click to accept the change. Notice that the class has been re-named. To create a new class: 68. Click on the Editing toolbar. The Class Properties dialog screen. 69. Type 70. Click GBI. to accept the change. You can move objects between classes using drag and drop. 71. Click next to each class to display the contained objects. According to the proposed design the Material Group object should be part of the Material class. To achieve this: 72. Drag to . Notice that the Material Group object now appears in the Material Class. The Material Group Description should also appear in the Material class. This object does not currently appear in the Universe Pane. You can create an object by dragging a field from the Structure Pane to the Universe Pane. 73. Drag Material Group Description from the Material Group table to . Notice that the Material Group Description object now appears in the Material class. Paul Hawking 24 March 2015 74. Drag the following objects to corresponding classes: Class Material Objects Product Category Description GBI Sales Organisation Location Distribution Channel Distribution Channel Description Notice that some Dimensions appear twice in the Universe. You will need to delete these to prevent any future confusion. 75. Right-click to display the context menu. 76. Choose Clear 77. Press <ENTER> to accept the deletion 78. Delete and . Defining A Detail Object A Detail object provides descriptive data about a Dimension and is always attached to a Dimension. After an analysis of requirements the following Detail objects have been determined Dimension Material Sales Organisation Detail Material Description Standard Price Unit Cost Location Distribution Channel Distribution Channel Description Material Group Material Group Description Product Category Product Category Description Currently many of the proposed Detail objects appear as Dimension objects. These can be changed through the Object Properties. 75. Right-Click Material Group Description dimension to display the context menu. 76. Choose Object Properties to display the dialog screen. 77. Click Paul Hawking to display these options. 25 March 2015 Notice that you can define the type of object on this screen. 78. Click to select this option. Notice that options appear to indicate which Dimension this Detail object is associated with. 79. Click 80. Click 81. Click to display the Dimensions. Material Group to select it. to accept the change. Notice that Material Group Description appears as a Detail object associated with the Material Group dimension. 82. Define the following Detail objects: Paul Hawking 26 March 2015 Creating Measure Objects In addition to Dimension and Detail objects you can define Measure objects. From the analysis it has been determined that 3 Measure objects are required: Quantity, Revenue, Cost. Using the wizard you created the Quantity measure already. You will now create the other measures: 83. Right-Click Revenue dimension to display the context menu. 84. Choose Object Properties to display the dialog screen. 85. Click 86. Click to display these options. to select this option. Notice that the aggregation function appears (Sum). 87. Click to accept the change. Notice that the Revenue object now appears as a measure. 88. Repeat the process for the Cost measure. One or the purposes of a universe is to make it easy for the query designer to understand the business requirements and hide the technical aspects of the underlying data source. To prevent any confusion: 89. Drag to 90. Drag 91. Delete . 92. Rename to Quantity 93. Rename and to to Sales Organisation Description Currently end users will be able to analyse the data by the Purchase Date dimension. In other words they can analyse the date by day. However they would like to be able to also analyse sales by month, year and quarter to get a better understanding. This can be achieved by using a time hierarchy. 94. Right-Click Purchase date dimension to display the context menu. 95. Choose Object Properties to display the dialog screen. Paul Hawking 27 March 2015 96. Type Date to change the dimension name Notice that the Universe Design Tool has determined that this dimension is a date type. 97. Click to display these options. As it has been determined that this is a date data type a new option appears. 98. Click The following screen appears with different date options: 99. Click 100. Click to accept the changes. 101. Click to accept the changes. Notice that a 102. Click Paul Hawking each date option to select it. next to the Date dimension. next to to display the date variables. 28 March 2015 You have completed your Universe which will be used as a basis for reporting using SAP Business Objects Web Intelligence (Interactive Analysis). Your Universe should look similar to below: You need to save your Universe. 103. Click 104. Click on the Standard toolbar to display the save dialog screen. to accept the default name and save the Universe. The Universe you have created can be used as a basis for the Reporting With SAP Business Objects Interactive Analysis workshop. Paul Hawking 29 March 2015