SlideShare una empresa de Scribd logo
1 de 9
Descargar para leer sin conexión
3 - Creating Modeled Views in SAP HANA Studio
ABAP for HANA Developer Best Practice
Image
Best
Practice
3 - Creating Modeled Views in SAP HANA Studio
Summary Simple Reporting using Modeled Views (Attribtue View, Analytic View) in SAP HANA: In this exercise a simple
reporting model is created using the SAP HANA Studio. The reporting model is used to display the aggregated
gross revenues (field GROSS_AMOUNT from sales order item) per country (from business partner address) and
currency (from sales order item)
Author(s) Ingo Bräuninger, Bertram Ganz
Level Intermediate
Applies to
SAP
NetWeaver
AS ABAP
not applied
Applies to
SAP
HANA DB
SQLScript V2.0, SAP HANA Appliance Software SPS 04
Last
Update
Aug 16, 2012 10:37
Labels -,a4hdevbestpractice puma add label ...
Tiny URL https://wiki.wdf.sap.corp/wiki/x/_geORg
PDF
Export
Export this 'A4H Dev Best-Practice' to PDF
Internal Use Only
The ABAP For HANA Developer Best-Practice and How-to Guides were created as a team effort between the ABAP for HANA
and TIP Core ABAP Development in TIP Core ABAP Platform, SAP HANA Development and theReference Scenarion team
SAP TIP Core Product Management teams. Please do not distribute directly to customers or partners without the express
permission of the SAP TIP Core ABAP Platform Product Management team. These guides are for internal use only at this time!
Future revisions of selected how-to guides will be made publically available via SDN. For additional information contact: Bertram
or .Ganz Jens Weiler
Table of Contents
Overview
Procedure Details
Task 1: Create a new attribute view for customer master data
Task 2: Create a new analytic view, which reads the gross revenues from sales or item
Task 3: Check the result in the data preview
Overview
In this exercise a simple reporting model is created using the SAP HANA Studio. The reporting model is used to display the aggregated gross
revenues (field GROSS_AMOUNT from sales order item) per country (from business partner address) and currency (from sales order item).
Create a new attribute view for customer master data
Create a new analytic view, which reads the gross revenues from the sales order item
Check the result in data preview
For simplicity reasons we do not do a currency conversion in this exercise. Therefore we need to include the currency in the output.
Procedure Details
The exercise comprises of the following steps (which are explained below step by step):
Task 1: Create a new attribute view for customer master data
Task 2: Create a new analytic view, which reads the gross revenues from sales or item
Task 3: Check the result in the data preview
Task 1: Create a new attribute view for customer master data
Go to the Modeler perspective in Eclipse. If the Modeler perspective is not available via the toolbar, press the ‘Open perspective’ button.
If you are not yet connected to the database server (i.e. the Navigator is empty), add the workshop system via right mouse click (then
choose ‘Add System’).
Find your package test.oia.<W00>.<Wxx> in the Navigator. Hint: path is Content ? test ? oia ? <W00> ? <Wxx>
Create a new attribute view AT_BUYER to display customer master data in your package (hint: view type is ‘Standard’).
The attribute view needs to read data from tables <SAPSID>.SNWD_BPA (business partner) as well as <SAPSID>.SNWD_AD
(addresses). Enter filter strings SNWD_BPA and SNWD_AD to find and then add the two tables to the attribute view.
The following screenshot displays the relationship between the tables as well as the necessary attributes.
Create the referential join condition of type 1:1 between the tables by pressing the mouse button and drawing a line from attribute
SNWD_BPA.ADDRESS_GUID to SNWD_AD.NODE_KEY. Repeat this for SNWD_BPA.CLIENT to SNWD_AD.CLIENT.
Add the needed attributes (highlighted in the screenshot). Hint: you need to define at least one key attribute using context menu item
‘Add as Key Attribute’. In the example the key attributes should be CLIENT and NODE_KEY from SNWD_BPA. The other attributes can
be easily added via double mouse clicks.
Validate and activate attribute view AT_BUYER. Afterwards check the result in data preview.
Task 2: Create a new analytic view, which reads the gross revenues from sales or item
The analytic view is supposed to display the aggregated gross revenues per country and currency.
Find your package test.oia.<W00>.<Wxx> in the Navigator.
Create a new analytic view AN_GROSS_REVENUES.
The analytic view needs to read data from the tables for sales order header and sales order item. Therefore add the two tables
<SAPSID>.SNWD_SO and <SAPSID>.SNWD_SO_I to the analytic view.
On the next screen add the attribute view AT_BUYER to the view.
In the Data Foundation join the tables for sales order header and sales order item.
The join should be a referential join. The left table of the join should be sales order item.
Add the following fields from SNWD_SO as attributes: CLIENT, BUYER_GUID
Add the following fields from SNWD_SO_I as attributes: CURRENCY_CODE
Add the following fields from SNWD_SO_I as measures: GROSS_AMOUNT, NET_AMOUNT, TAX_AMOUNT via context menu item
‘Add as Measure’
The analytic view should now look like this:
Maintain also the Logical View. In the logical view you maintain the join conditions between the Data Foundation and attribute view
AT_BUYER.
Validate and activate attribute view AN_GROSS_REVENUES. Afterwards check the result in data preview.
Task 3: Check the result in the data preview
Use the data preview to create a simple report (it should look like the above screenshot). Therefore drag and drop the corresponding
fields to the label axis and value axis.
Back to top
Tag this page with matching labels.
Key Topic
Development Aspect
Content Category
Content Level
Workflow Status

Más contenido relacionado

Similar a Creating modeled views

Tech ed 2012 eim260 modeling in sap hana-exercise
Tech ed 2012 eim260   modeling in sap hana-exerciseTech ed 2012 eim260   modeling in sap hana-exercise
Tech ed 2012 eim260 modeling in sap hana-exercise
Luc Vanrobays
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
Kranthi Kumar
 
BND_S4CLD2302_Master_Data_EN_XX.docx
BND_S4CLD2302_Master_Data_EN_XX.docxBND_S4CLD2302_Master_Data_EN_XX.docx
BND_S4CLD2302_Master_Data_EN_XX.docx
RashidKhan809524
 
SAP BW Reports - Copy
SAP BW Reports - CopySAP BW Reports - Copy
SAP BW Reports - Copy
Aby m
 
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docxCIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
clarebernice
 
SAP CPM-BW Solution Overview
SAP CPM-BW Solution OverviewSAP CPM-BW Solution Overview
SAP CPM-BW Solution Overview
Naresh Raghavan
 

Similar a Creating modeled views (20)

Tech ed 2012 eim260 modeling in sap hana-exercise
Tech ed 2012 eim260   modeling in sap hana-exerciseTech ed 2012 eim260   modeling in sap hana-exercise
Tech ed 2012 eim260 modeling in sap hana-exercise
 
Bo explorer
Bo explorerBo explorer
Bo explorer
 
SAP SD Training in Chennai
SAP SD Training in Chennai SAP SD Training in Chennai
SAP SD Training in Chennai
 
EA261_2015_Exercises
EA261_2015_ExercisesEA261_2015_Exercises
EA261_2015_Exercises
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
 
Calculated Columns and Measures in Power BI.pptx
Calculated Columns and Measures in Power BI.pptxCalculated Columns and Measures in Power BI.pptx
Calculated Columns and Measures in Power BI.pptx
 
DataTables
DataTablesDataTables
DataTables
 
BND_S4CLD2302_Master_Data_EN_XX.docx
BND_S4CLD2302_Master_Data_EN_XX.docxBND_S4CLD2302_Master_Data_EN_XX.docx
BND_S4CLD2302_Master_Data_EN_XX.docx
 
SAP BW Reports - Copy
SAP BW Reports - CopySAP BW Reports - Copy
SAP BW Reports - Copy
 
Creating new unit of measure in sap bw
Creating new unit of measure in sap bwCreating new unit of measure in sap bw
Creating new unit of measure in sap bw
 
Copa realignment
Copa realignmentCopa realignment
Copa realignment
 
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docxCIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
CIS 310 ACCESS AssignmentObjective of this assignment is to pr.docx
 
Sap query creation &amp; transcation code creation for sap query
Sap query creation &amp; transcation code creation for sap querySap query creation &amp; transcation code creation for sap query
Sap query creation &amp; transcation code creation for sap query
 
Analytics with Power BI and R
Analytics with Power BI and RAnalytics with Power BI and R
Analytics with Power BI and R
 
Business objects activities web intelligence
Business objects activities web intelligenceBusiness objects activities web intelligence
Business objects activities web intelligence
 
Cube remodelling
Cube remodellingCube remodelling
Cube remodelling
 
Retail configuration guide openbravo
Retail configuration guide   openbravoRetail configuration guide   openbravo
Retail configuration guide openbravo
 
Report building tips and tricks mis v8.0
Report building tips and tricks mis v8.0Report building tips and tricks mis v8.0
Report building tips and tricks mis v8.0
 
SAP CPM-BW Solution Overview
SAP CPM-BW Solution OverviewSAP CPM-BW Solution Overview
SAP CPM-BW Solution Overview
 

Último

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Último (20)

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 

Creating modeled views

  • 1. 3 - Creating Modeled Views in SAP HANA Studio ABAP for HANA Developer Best Practice Image Best Practice 3 - Creating Modeled Views in SAP HANA Studio Summary Simple Reporting using Modeled Views (Attribtue View, Analytic View) in SAP HANA: In this exercise a simple reporting model is created using the SAP HANA Studio. The reporting model is used to display the aggregated gross revenues (field GROSS_AMOUNT from sales order item) per country (from business partner address) and currency (from sales order item) Author(s) Ingo Bräuninger, Bertram Ganz Level Intermediate Applies to SAP NetWeaver AS ABAP not applied Applies to SAP HANA DB SQLScript V2.0, SAP HANA Appliance Software SPS 04 Last Update Aug 16, 2012 10:37 Labels -,a4hdevbestpractice puma add label ... Tiny URL https://wiki.wdf.sap.corp/wiki/x/_geORg PDF Export Export this 'A4H Dev Best-Practice' to PDF Internal Use Only The ABAP For HANA Developer Best-Practice and How-to Guides were created as a team effort between the ABAP for HANA and TIP Core ABAP Development in TIP Core ABAP Platform, SAP HANA Development and theReference Scenarion team SAP TIP Core Product Management teams. Please do not distribute directly to customers or partners without the express permission of the SAP TIP Core ABAP Platform Product Management team. These guides are for internal use only at this time! Future revisions of selected how-to guides will be made publically available via SDN. For additional information contact: Bertram or .Ganz Jens Weiler Table of Contents
  • 2. Overview Procedure Details Task 1: Create a new attribute view for customer master data Task 2: Create a new analytic view, which reads the gross revenues from sales or item Task 3: Check the result in the data preview Overview In this exercise a simple reporting model is created using the SAP HANA Studio. The reporting model is used to display the aggregated gross revenues (field GROSS_AMOUNT from sales order item) per country (from business partner address) and currency (from sales order item). Create a new attribute view for customer master data Create a new analytic view, which reads the gross revenues from the sales order item Check the result in data preview For simplicity reasons we do not do a currency conversion in this exercise. Therefore we need to include the currency in the output. Procedure Details The exercise comprises of the following steps (which are explained below step by step): Task 1: Create a new attribute view for customer master data Task 2: Create a new analytic view, which reads the gross revenues from sales or item Task 3: Check the result in the data preview Task 1: Create a new attribute view for customer master data Go to the Modeler perspective in Eclipse. If the Modeler perspective is not available via the toolbar, press the ‘Open perspective’ button.
  • 3. If you are not yet connected to the database server (i.e. the Navigator is empty), add the workshop system via right mouse click (then choose ‘Add System’). Find your package test.oia.<W00>.<Wxx> in the Navigator. Hint: path is Content ? test ? oia ? <W00> ? <Wxx> Create a new attribute view AT_BUYER to display customer master data in your package (hint: view type is ‘Standard’). The attribute view needs to read data from tables <SAPSID>.SNWD_BPA (business partner) as well as <SAPSID>.SNWD_AD (addresses). Enter filter strings SNWD_BPA and SNWD_AD to find and then add the two tables to the attribute view. The following screenshot displays the relationship between the tables as well as the necessary attributes.
  • 4. Create the referential join condition of type 1:1 between the tables by pressing the mouse button and drawing a line from attribute SNWD_BPA.ADDRESS_GUID to SNWD_AD.NODE_KEY. Repeat this for SNWD_BPA.CLIENT to SNWD_AD.CLIENT. Add the needed attributes (highlighted in the screenshot). Hint: you need to define at least one key attribute using context menu item ‘Add as Key Attribute’. In the example the key attributes should be CLIENT and NODE_KEY from SNWD_BPA. The other attributes can be easily added via double mouse clicks. Validate and activate attribute view AT_BUYER. Afterwards check the result in data preview.
  • 5. Task 2: Create a new analytic view, which reads the gross revenues from sales or item The analytic view is supposed to display the aggregated gross revenues per country and currency. Find your package test.oia.<W00>.<Wxx> in the Navigator. Create a new analytic view AN_GROSS_REVENUES. The analytic view needs to read data from the tables for sales order header and sales order item. Therefore add the two tables <SAPSID>.SNWD_SO and <SAPSID>.SNWD_SO_I to the analytic view. On the next screen add the attribute view AT_BUYER to the view. In the Data Foundation join the tables for sales order header and sales order item.
  • 6. The join should be a referential join. The left table of the join should be sales order item. Add the following fields from SNWD_SO as attributes: CLIENT, BUYER_GUID Add the following fields from SNWD_SO_I as attributes: CURRENCY_CODE Add the following fields from SNWD_SO_I as measures: GROSS_AMOUNT, NET_AMOUNT, TAX_AMOUNT via context menu item ‘Add as Measure’ The analytic view should now look like this:
  • 7. Maintain also the Logical View. In the logical view you maintain the join conditions between the Data Foundation and attribute view AT_BUYER. Validate and activate attribute view AN_GROSS_REVENUES. Afterwards check the result in data preview.
  • 8. Task 3: Check the result in the data preview Use the data preview to create a simple report (it should look like the above screenshot). Therefore drag and drop the corresponding fields to the label axis and value axis. Back to top Tag this page with matching labels.
  • 9. Key Topic Development Aspect Content Category Content Level Workflow Status