Part of our Data Analytics & BI series
Read the complete guideConnecting Power BI to SAP: HANA, BW, and S/4HANA
SAP systems hold the most business-critical data in enterprise organizations — yet getting that data into dashboards has historically required expensive SAP BusinessObjects licenses, complex BEx queries, or custom ABAP programs. Power BI's native SAP connectors change this equation significantly. Organizations are now routing SAP HANA views, BW queries, and S/4HANA CDS views directly into Power BI dashboards without middleware or data replication.
This guide covers every SAP connector available in Power BI, when to use each, and how to configure secure, performant connections in production.
Key Takeaways
- Power BI offers four SAP connectors: SAP HANA, SAP BW (MDX), SAP BW (BAPI), SAP OData
- DirectQuery on SAP HANA leverages HANA's in-memory engine — queries return in milliseconds
- Import mode loads SAP data into Power BI's VertiPaq — enables rich DAX calculations
- S/4HANA CDS views expose clean, pre-modeled data ideal for DirectQuery
- SAP HANA SSO requires Kerberos delegation or SAP SSO setup — critical for user-level audit trails
- BW variables and prompts can be surfaced as Power BI parameters for interactive filtering
- On-premises data gateway is required for all on-premises SAP connections
- SAP BW OpenHub is the highest-performance path for large-scale data extraction
SAP Connector Overview
Power BI provides four distinct connectors for SAP systems:
| Connector | SAP System | Protocol | Best For |
|---|---|---|---|
| SAP HANA | SAP HANA (on-prem or cloud) | ODBC/JDBC | HANA views, calculation views, real-time dashboards |
| SAP Business Warehouse (MDX) | SAP BW 7.x, BW/4HANA | MDX over XMLA | BEx queries, InfoCubes, MultiProviders |
| SAP Business Warehouse (BAPI) | SAP BW 7.x, BW/4HANA | RFC/BAPI | Flat data extraction, better performance than MDX |
| SAP OData | SAP Gateway, S/4HANA | OData v2/v4 | Fiori-exposed data, CDS annotations |
Each connector has different performance characteristics, feature support, and setup complexity. Understanding which SAP data is available through which connector is the foundation of a successful integration.
Connector 1: SAP HANA
The SAP HANA connector is the most powerful option for organizations running HANA as their primary database (including S/4HANA on HANA).
Prerequisites
- On-premises data gateway: Install on a Windows server with network access to HANA
- SAP HANA ODBC driver: Install
SAP HANA Client(includes ODBC driver) on the gateway server - HANA user account: Create a dedicated Power BI user in HANA with SELECT privileges on required views
- SSL certificate: Export the HANA server's SSL certificate for secure connections
Connection Setup
In Power BI Desktop:
- Get Data → SAP HANA Database
- Enter server:
hana-host:30015(port = 3 + instance number + 15, e.g., 30015 for instance 00) - Select Data Connectivity mode: Import or DirectQuery
- Navigate the catalog: Schemas → Views → Calculation Views
DirectQuery on SAP HANA
DirectQuery on HANA is Power BI's most powerful integration mode for real-time SAP data:
User opens dashboard
↓
Power BI generates SQL for each visual
↓
Query sent to HANA via ODBC
↓
HANA executes using in-memory engine (sub-second)
↓
Results returned to Power BI visual
Performance tip: HANA calculation views with Analytic Privilege-based access control align perfectly with Power BI's RLS requirements. Define data access in HANA, and Power BI passes the user context via SSO.
HANA Calculation Views
HANA Calculation Views are the recommended data access layer for Power BI. They provide:
- Pre-aggregated data: Reduce query complexity
- Joined tables: Hide HANA's column-store internals from Power BI
- Currency conversion: Built-in with HANA's currency conversion engine
- Analytic Privileges: Row-level access control at the HANA level
Connect to calculation views by navigating: Schema → _SYS_BIC → Calculation Views. Views prefixed with sap.xxx are SAP-delivered standard content.
Import Mode on SAP HANA
For complex DAX calculations and offline analytics, import mode loads HANA data into VertiPaq:
- Build Power Query transformations on top of HANA views
- Schedule incremental refresh (requires Power BI Premium or PPU) to load only new/changed rows
- Define DAX measures for time intelligence that go beyond HANA's native capabilities
Incremental refresh configuration:
- Add
RangeStartandRangeEndparameters (Date/Time type) to your Power Query - Filter the HANA query using these parameters
- Configure incremental refresh policy in the dataset settings (e.g., refresh last 2 days, keep 3 years)
Connector 2: SAP Business Warehouse (BW)
SAP BW stores decades of enterprise data in InfoCubes, DSOs, and BEx queries. Power BI's BW connector can expose this data directly to dashboards.
SAP BW MDX Connector
The MDX connector queries BW using MDX (Multidimensional Expressions) protocol — the same protocol used by SAP BusinessObjects Analysis for Office.
Setup:
- Install
SAP BW Frontend Clienton the gateway server - Connect to BW system: Application Server + System Number + Client
- Browse BEx queries, InfoCubes, and MultiProviders
- BW variables surface as Power BI query parameters
BW Variables in Power BI:
BEx queries with mandatory variables (selection screens) can be configured in Power BI as parameters. For example, a BW query requiring Fiscal Year selection shows a parameter dialog in Power BI. This is critical for queries that would time out without appropriate date filters.
Limitation: MDX connector reads BW's OLAP layer — performance is constrained by BW's MDX server. Very large InfoCubes can be slow.
SAP BW BAPI Connector (Recommended)
The BAPI connector uses SAP's RFC (Remote Function Call) protocol directly, bypassing the MDX layer. It delivers:
- Higher throughput for large data volumes
- Better performance for flat extractions
- Access to BEx query results via BAPI calls
For large-scale data extraction from BW, the recommended architecture is:
SAP BW OpenHub → Azure Data Lake / Blob Storage → Power BI
BW OpenHub allows scheduled delta extractions of InfoProvider data to flat files or database tables, which Power BI then loads via Import mode. This pattern handles billions of rows without impacting BW performance.
Connector 3: S/4HANA via OData and CDS Views
SAP S/4HANA exposes data through two key mechanisms for Power BI integration:
SAP OData Connector
S/4HANA's SAP Gateway exposes OData v2 services for every Fiori application. Power BI's OData connector can consume these services directly:
- Get Data → OData Feed
- URL:
https://s4hana-host:443/sap/opu/odata/sap/API_SALES_ORDER_SRV/ - Authentication: Basic or Windows (Kerberos) with SAP system credentials
Available S/4HANA OData APIs (most relevant for Power BI):
| API | Service | Key Entities |
|---|---|---|
API_SALES_ORDER_SRV | Sales Orders | SalesOrder, SalesOrderItem |
API_FINANCIAL_DOCUMENT_SRV | FI Documents | FinancialDocumentHeader, FinancialDocumentItem |
API_PURCHASEORDER_PROCESS_SRV | Purchase Orders | PurchaseOrder, PurchaseOrderItem |
API_EQUIPMENT_SRV | Plant Maintenance | Equipment, FunctionalLocation |
API_PRODUCT_SRV | Material Master | Product, ProductDescription |
API_GL_ACCOUNT_IN_CHART_OF_ACCTS_SRV | GL Accounts | GLAccountInChartOfAccts |
CDS Views for Power BI
Core Data Services (CDS) views in S/4HANA provide pre-modeled, semantically rich data access. The recommended approach for Power BI + S/4HANA:
- Identify standard analytical CDS views: SAP provides 1,000+ analytical CDS views with embedded annotations
- Expose via VDM (Virtual Data Model): Use CDS views with
@Analytics.dataCategory: #CUBEannotation - Access via HANA DirectQuery: Connect Power BI to HANA, navigate to the CDS view schema
Example CDS view for sales analytics: C_SalesOrderItemCube — provides sales order item data with dimensions (customer, material, plant, time) and measures (quantity, value, discount).
Security: SSO and Row-Level Access
SAP HANA Single Sign-On
For user-level audit trails (who queried what in HANA), configure SSO between Power BI and HANA:
Kerberos SSO setup:
- Configure constrained delegation on the gateway server's Active Directory account
- Map Windows AD users to HANA database users (SPS 10+ required)
- Enable "Use SSO via Kerberos for DirectQuery queries" in the gateway data source settings
With SSO active, Power BI queries execute in HANA under the authenticated end user's identity — not the gateway service account. HANA's analytic privilege system then controls exactly which calculation views each user can access.
SAP SSO (Kerberos + RFC):
For BW connections, SAP SSO 3.0 with Kerberos token exchange is the standard. The gateway server requires the gsskrb5.dll library from SAP and Kerberos SPN configuration.
Row-Level Security Architecture
There are two places to implement RLS for SAP data in Power BI:
Option 1: RLS in HANA (Recommended):
- Define Analytic Privileges in HANA that restrict which rows users can read
- Power BI queries are executed under the user's HANA identity via SSO
- Security enforcement happens at the database level — cannot be bypassed from Power BI
Option 2: RLS in Power BI:
- Import SAP data into Power BI dataset
- Define RLS roles using DAX filter expressions
- Map Azure AD users/groups to RLS roles
- Suitable when SSO is not available or when security requirements allow dataset-level enforcement
Performance Optimization
HANA DirectQuery Optimization
- Use Calculation Views, not Column Tables directly: Calculation Views with aggregation nodes pre-summarize data at the HANA level
- Enable query-level time-out: Set
QueryTimeoutin Power BI's data source settings to avoid hanging queries - Limit visual count: Each visual on a DirectQuery page generates a HANA query — keep pages under 20 visuals
- Use HANA's aggregation behavior: Calculation Views with
SUM,COUNTaggregations execute in parallel across HANA nodes
BW Import Performance
- OpenHub extraction: Use SAP BW OpenHub to extract to Azure Data Lake, then import into Power BI via ADLS connector — much faster than MDX for large volumes
- Query folding in Power Query: Ensure transformations fold to the BW/HANA level (avoid operations that break query folding)
- Incremental refresh: For daily BW loads, configure incremental refresh to extract only delta records
Frequently Asked Questions
Do I need SAP licensing to connect Power BI to SAP systems?
Power BI's SAP connectors use standard interfaces (ODBC, RFC, OData) available in all SAP system licenses. However, SAP's licensing terms may require appropriate Named User licenses for the SAP accounts used by Power BI. Specifically, if Power BI queries read SAP data that would normally require an SAP Business Intelligence license (like BW BEx queries), SAP may argue those licenses apply. Consult with your SAP license manager before broad deployment.
What is the maximum data volume Power BI can handle from SAP HANA?
In DirectQuery mode, there is no theoretical limit — Power BI queries HANA for aggregated results, so even HANA tables with billions of rows return quickly if the query is optimized. In Import mode, Power BI Premium supports datasets up to 400GB (compressed VertiPaq format, equivalent to several TB of raw data). SAP HANA calculation views should be designed to return pre-aggregated results to keep response times under 2 seconds for dashboard visuals.
Can Power BI connect to SAP S/4HANA Cloud?
Yes — SAP S/4HANA Cloud exposes OData APIs and CDS views accessible to Power BI. The SAP HANA connector (via HANA Cloud) and SAP OData connector both work with cloud deployments. SAP recently introduced SAP Analytics Cloud integration with S/4HANA Cloud as the preferred embedded analytics path, but Power BI remains fully compatible through the OData and HANA Cloud interfaces.
How do I handle SAP BW variables in Power BI reports?
SAP BW variables that require user input (mandatory variables) surface as Power BI query parameters. Report authors configure default values for these parameters. For reports shared with end users, the parameters appear as filter controls. For fixed parameters (e.g., fiscal year always current year), use Power Query M expressions to generate the variable value dynamically based on today's date.
Is it better to use SAP HANA or SAP OData for Power BI integration?
SAP HANA connector (DirectQuery or Import) is generally superior for analytical workloads — it leverages HANA's in-memory engine and exposes rich calculation views. SAP OData is better for transactional data access (individual orders, customer records) where you need specific API-exposed business objects with built-in SAP authorization checks. For finance and operations dashboards, use HANA views. For application-specific data with SAP standard API coverage, OData is appropriate.
What happens if SAP HANA goes down — do Power BI dashboards break?
In DirectQuery mode, yes — Power BI visuals show an error if HANA is unavailable. This is the fundamental trade-off of DirectQuery: real-time data but no offline resilience. To mitigate this, use Import mode for critical executive dashboards (data refreshes on schedule, remains accessible during HANA outages) and reserve DirectQuery for operational dashboards where real-time accuracy is essential. You can also combine modes in a Composite Model.
Next Steps
Connecting Power BI to SAP is technically achievable but requires careful planning around connector selection, security architecture, and performance optimization. Organizations that get this integration right unlock real-time insights from their most business-critical data — without the cost of SAP BusinessObjects or custom ABAP development.
ECOSIRE's Power BI ERP integration practice specializes in SAP + Power BI deployments. We handle connector configuration, HANA view design, BW OpenHub setup, SSO security, and dashboard development as an end-to-end engagement.
Explore our Power BI ERP integration services or contact our team to discuss your specific SAP landscape and analytics requirements.
Written by
ECOSIRE Research and Development Team
Building enterprise-grade digital products at ECOSIRE. Sharing insights on Odoo integrations, e-commerce automation, and AI-powered business solutions.
Related Articles
Building Financial Dashboards with Power BI
Step-by-step guide to building financial dashboards in Power BI covering data connections to accounting systems, DAX measures for KPIs, P&L visualisations, and best practices.
Case Study: Power BI Analytics for Multi-Location Retail
How a 14-location retail chain unified their reporting in Power BI connected to Odoo, replacing 40 spreadsheets with one dashboard and cutting reporting time by 78%.
GoHighLevel + Power BI: Advanced Reporting and Analytics
Connect GoHighLevel to Power BI for advanced marketing analytics. Build executive dashboards, track multi-channel ROI, and create automated reports that go beyond GHL's native reporting.
More from Data Analytics & BI
Building Financial Dashboards with Power BI
Step-by-step guide to building financial dashboards in Power BI covering data connections to accounting systems, DAX measures for KPIs, P&L visualisations, and best practices.
Case Study: Power BI Analytics for Multi-Location Retail
How a 14-location retail chain unified their reporting in Power BI connected to Odoo, replacing 40 spreadsheets with one dashboard and cutting reporting time by 78%.
GoHighLevel + Power BI: Advanced Reporting and Analytics
Connect GoHighLevel to Power BI for advanced marketing analytics. Build executive dashboards, track multi-channel ROI, and create automated reports that go beyond GHL's native reporting.
GoHighLevel Reporting and Analytics: Measuring What Matters
Master GoHighLevel reporting and analytics. Learn to build custom dashboards, track ROI across channels, measure funnel conversion, and make data-driven marketing decisions.
Odoo Events Module: Planning, Registration, and Analytics
Complete guide to Odoo 19 Events: create events, manage registrations, sell tickets, track attendance, and analyze event ROI with native ERP integration.
Odoo + Power BI: Complete Analytics Integration Guide
Connect Odoo 19 to Power BI for enterprise analytics. Covers DirectQuery, Import mode, data modeling, DAX measures, live dashboards, and deployment architecture.