Power BISAP S/4HANA Agent view

How to connect Power BI to SAP S/4HANA

Short answer

Connect Power BI to S/4HANA through CDS-based OData or analytical queries, the SAP HANA connector with released CDS views, or a replicated warehouse such as Datasphere, Fabric or Synapse. Use the on-premises data gateway for on-prem systems, and avoid direct reads of raw tables unless your licence allows it.

Power BI is often the first reporting tool a finance or operations team reaches for, and SAP data is usually the first thing they want in it: sales, open orders, inventory, production variances, on-time delivery. The difficulty is not the connector. It is choosing a path that stays licensed, performs well and keeps SAP authorizations meaningful.

S/4HANA has an embedded analytics layer built on ABAP CDS views with analytical annotations. Those views are the supported source for reporting because they carry business logic, currency conversion and authorization checks. Reading raw tables such as MATDOC or ACDOCA directly can be fast, but it bypasses that logic and may conflict with licence terms.

For larger models or history, most manufacturers replicate data to a warehouse and point Power BI there. The choice between live query, import and a warehouse depends on volume, freshness and how much load the production system can take.

What teams use it for

Sales and order backlog

Open sales orders by customer, plant and requested date, with delivery performance against confirmed dates.

Inventory and stock coverage

Stock by plant and storage location, slow-moving and obsolete analysis, and days of coverage against forecast demand.

Production performance

Order completion against plan, scrap and rework quantities, and WIP value from production order data.

Purchasing and supplier delivery

On-time-in-full by supplier, price variance, and open commitments by buyer and material group.

Financial close views

Cost center and profit center reporting from the universal journal, with plan versus actual and drill-through to line items.

Quality trends

Inspection lot results, defect codes by vendor and material, and notification aging.

SAP S/4HANA integration surface

  • OData services published from analytical CDS views (annotated for analytics), consumed by Power BI's OData feed connector. Good for moderate volumes, with limits on paging and filters.
  • The SAP HANA database connector in Power BI Desktop, with import or DirectQuery, reading calculation or CDS-based views. Direct reading of application tables may be restricted by licence terms, so confirm with SAP.
  • Warehouse routes: SAP Datasphere, SAP BW/4HANA, SLT or ODP-based replication to Azure Synapse, Fabric or another store, then Power BI over that. Tool names and ODP support depend on release and licence.
  • On-premises data gateway (standard mode) installed inside the network to reach an on-prem SAP or HANA host from the Power BI service, with credentials stored in the gateway.
  • SAP Analytics Cloud as an alternative front end when you want SAP-native planning and live connections, which may be better for some finance use cases.

How it works

  1. 1

    Pick the source layer

    Prefer released analytical CDS views or a curated warehouse over raw tables. List the exact entities for each dashboard before connecting anything.

  2. 2

    Decide on live versus import

    DirectQuery gives fresh data but loads HANA and can be slow. Import with scheduled refresh is faster for users and gentler on production. Hybrid tables can combine both.

  3. 3

    Install and secure the gateway

    Install the on-premises data gateway on a server near SAP, create a data source with a dedicated read user, and set refresh schedules outside business peaks.

  4. 4

    Model the data

    Build a star schema with conformed dimensions for material, plant, customer and calendar. Handle currency and unit conversion once, in the view or the model.

  5. 5

    Apply row-level security

    Map plants and company codes to Power BI roles through the model, matched to your SAP authorization design. Test with representative users.

  6. 6

    Add natural-language Q&A

    Enable Power BI Q&A or Copilot features where licensed, or add a separate assistant that queries a governed semantic layer. Curate synonyms such as 'WERKS' to 'plant'.

Example flows

Nightly import for the order backlog

Trigger: A scheduled refresh runs at 02:00.

  1. The gateway connects to the OData endpoint for the sales order analytical view.
  2. It pulls changed records using a date filter and appends them to the model.
  3. The model recalculates delivery performance measures.
  4. Plant managers see updated tiles at start of shift.

Result: Fresh backlog reporting without load on SAP during the day.

Warehouse-backed inventory model

Trigger: Replication lands stock changes into a warehouse every 15 minutes.

  1. Replication publishes material document changes to a staging area.
  2. A transformation computes current stock by plant and location.
  3. Power BI queries the warehouse, not SAP.
  4. Users ask a question in Q&A about slow-moving stock and drill into the item.

Result: Quick dashboards with history and no query load on the production system.

Keeping data on-prem

For an on-prem S/4HANA, the gateway is the bridge between the Power BI service and your network, and it only makes outbound connections to Azure. If policy forbids any cloud service, use Power BI Report Server with an on-prem refresh, or a different on-prem BI tool, and run any natural-language layer on a self-hosted model that queries your semantic model locally. In regulated sites, keep the warehouse on-prem as well, and expose only aggregates to anything outside the enclave. Plan HANA resource use carefully, because analytical queries on a production S/4 can compete with transactions.

Security checklist

  • Use a dedicated read-only database or service user, with access limited to the views Power BI needs.
  • Implement row-level security in the model and verify it against SAP authorizations for each role.
  • Keep gateway credentials in the gateway, patch it regularly and restrict who can administer it.
  • Avoid exporting sensitive tables to personal workspaces. Use certified datasets and workspace governance.
  • Confirm licence terms for third-party access to HANA data and for replication tools before building at scale.

Ways to get it done

Native connectors to CDS views or OData

Effort: Days per dashboard once authorizations are set.

Good for a few departmental dashboards and moderate volumes.

Warehouse or Datasphere with Power BI on top

Effort: Weeks to months, mostly data modelling and replication.

Good for history, many users and cross-system reporting.

Dashboards plus natural-language layer with a partner such as Netray

Effort: Weeks, built on top of an existing semantic model.

Good when you also want users to ask questions in plain language, on-prem if needed.

Pitfalls

  • !Pointing DirectQuery at raw tables on a production HANA and slowing down postings.
  • !Ignoring SAP's licence rules on direct database access and third-party replication.
  • !Skipping currency and unit conversion, so totals do not match SAP reports.
  • !Using one shared SAP user in the gateway and exposing every plant to everyone.
  • !Building from technical field names. Business users need labeled, curated models.

Frequently asked questions

Does Power BI have a connector for S/4HANA?

There are connectors for the SAP HANA database, SAP BW and generic OData, which are the usual routes. Which is best depends on whether you read CDS views, a warehouse or a BW layer. There is no single universal S/4HANA connector, so choose by volume and licence.

Can I read tables like MATDOC and ACDOCA directly?

Technically it may be possible, but it skips business logic and authorizations, and SAP licence terms can restrict direct access to the application database. Prefer released CDS views or a replicated warehouse, and confirm with your SAP account team.

Do I need the on-premises data gateway?

For an on-prem S/4HANA or HANA host reached from the Power BI service, yes. Cloud-hosted sources with public endpoints may not need it. Install the gateway close to SAP, in a clustered setup if reliability matters.

DirectQuery or import?

Import is usually better for performance and for protecting production. DirectQuery suits small, fresh views with tight filters. Many teams use import for history and a small DirectQuery or hybrid slice for today's data.

Can users ask questions in plain language?

Power BI offers Q&A and Copilot in some licences, and they work best on clean, well-named models. For SAP-specific vocabulary or on-prem requirements, a separate assistant over your semantic layer with a local model is another route.

Want Power BI working on your SAP S/4HANA?

A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.

Get a free assessment