在 Power BI Desktop 中使用 SAP BW 连接器Use the SAP BW Connector in Power BI Desktop

使用 Power BI Desktop 可以访问 SAP BusinessWarehouse (BW) 数据。With Power BI Desktop, you can access SAP BusinessWarehouse (BW) data.

安装 SAP BW 连接器Installation of SAP BW Connector

若要使用 SAP BW 连接器,请完成以下安装步骤:To use the SAP BW Connector, go through the following installation steps:

  1. 在本地计算机上安装 SAP NetWeaver 库。Install the SAP NetWeaver library on your local machine. 你可以从 SAP 管理员处获取 SAP Netweaver 库,也可以直接从 SAP 软件下载中心下载。You can get the SAP Netweaver library from your SAP administrator, or directly from the SAP Software Download Center. 由于 SAP 软件下载中心的结构经常发生变化,因此没有有关站点导航的更多具体指导。Since the SAP Software Download Center changes its structure frequently, more specific guidance for navigating that site is not available. SAP NetWeaver 库通常还包括在 SAP 客户端工具安装中。The SAP NetWeaver library is usually included also in the SAP Client Tools installation.

    可以搜索 SAP 注释 #1025361,获取最新版本的下载位置。You may be able to search for SAP Note #1025361 to get the download location for the most recent version. 请确保 SAP NetWeaver 库(32 位或 64 位)的体系结构匹配 Power BI Desktop 安装,然后按照 SAP Note 安装 SAP NetWeaver RFC SDK 中包含的所有文件。Make sure the architecture for the SAP NetWeaver library (32-bit or 64-bit) matches your Power BI Desktop installation, then install all files included in the SAP NetWeaver RFC SDK according to the SAP Note.

  2. 获取数据”对话框在“数据库”类别中包含针对 SAP Business Warehouse 服务器的条目。The Get Data dialog includes an entry for SAP Business Warehouse Server in the Database category.

SAP BW 连接器功能SAP BW Connector features

Power BI Desktop 中的 SAP BW 连接器预览功能允许用户从他们的 SAP Business Warehouse 服务器多维数据集中导入数据。The SAP BW Connector preview in Power BI Desktop lets users import data from their SAP Business Warehouse Server cubes. 还可以将 DirectQuery 用于 SAP BW 连接器。You can also use DirectQuery with the SAP BW Connector. 必须指定服务器、系统编号和客户端 ID 才能建立连接。You must specify a Server, System Number and Client ID to establish the connection.

你还可以指定两个额外的“高级选项”:语言代码和针对指定服务器运行的自定义 MDX 语句。You can also specify two additional Advanced options: Language code, and a custom MDX statement to run against the specified server.

如果未指定任何 MDX 语句,则向你显示导航器窗口,其中将显示服务器上可用的多维数据集、向下钻取的选项,以及来自可用多维数据集的选择项的列表,包括维度和度量值。If no MDX statement was specified you are presented with the Navigator window, which displays the list of cubes available in the server, the option to drill down and select items from the available cubes, including dimensions and measures. Power BI 显示由 BW 开放分析接口 OLAP BAPI 公开的查询和多维数据集。Power BI exposes queries and cubes exposed by the BW Open Analysis Interface OLAP BAPIs.

当从服务器中选择一个或多个项时,将基于它们的选择创建输出表的预览。When you select one or more items from the server, a preview of the output table is created, based on their selection.

导航器窗口也提供了一些显示选项,允许你执行以下操作:The Navigator window also provides a few Display Options that allow you to do the following:

  • 显示仅选定项与所有项(默认视图):此选项在验证最后一组选定项时十分有用。Display Only Selected Items versus All Items (default view): This option is useful for verifying the final set of items selected. 查看此类容的另一种方法是选择预览区域中的列名称。An alternative approach to viewing this is to select the Column Names in the Preview area.
  • 启用数据预览(默认行为):还可以控制是否应在此对话框中显示数据预览。Enable Data Previews (default behavior): You can also control whether data previews should be displayed in this dialog. 禁用数据预览会减少服务器调用的数量,因其将不再请求数据以进行预览。Disabling data previews reduces the amount of server calls, since it no longer requests data for the previews.
  • 技术名称:对于多维数据集中的对象,SAP BW 支持技术名称的概念。Technical Names: SAP BW supports the notion of technical names for objects within a cube. 技术名称允许多维数据集所有者公开多维数据集对象的用户友好名称,而不是仅公开多维数据集中的那些对象的物理名称。Technical names allow a cube owner to expose user friendly names for cube objects, as opposed to only exposing the physical names for those objects in the cube.

导航器中选择所有必须的对象后,你可以通过选择导航器窗口底部的下列按钮之一,决定要执行的下一步操作。After selecting all necessary objects in the Navigator, you can decide what to do next, by selecting one of the following buttons on the bottom of the Navigator window:

  • 选择加载将会触发将输出表的整个行集加载到 Power BI Desktop 数据模型中,然后将你带到报表视图,在此你可以使用数据关系视图来开始对这些数据进行视觉化处理或进行进一步的修改。Selecting Load triggers loading the entire set of rows for the output table into the Power BI Desktop data model, then takes you to Report view where you can begin visualizing the data or making further modifications using the Data or Relationships views.
  • 选择编辑将打开查询编辑器,在整个列集引入到 Power BI Desktop 数据模型之前,你可以在其中执行其他数据转换和筛选步骤。Selecting Edit brings up Query Editor, where you can perform additional data transformation and filtering steps before the entire set of rows is brought into the Power BI Desktop data model.

除了从 SAP BW 多维数据集导入数据之外,请记住,你还可以从 Power BI Desktop 中的很多其他数据源导入数据,然后将它们合并到单一报表中。In addition to importing data from SAP BW cubes, remember that you can also import data from a wide range of other data sources in Power BI Desktop, and then you can combine them into a single report. 这将在 SAP BW 数据顶部将演示各种有趣的报表和分析方案。This presents all sorts of interesting scenarios for reporting and analytics on top of SAP BW data.


本部分内容提供有关使用此预览版的 SAP BW 连接器的故障排除(和解决方案)。This section provides troubleshooting situations (and solutions) for working with this preview version of the SAP BW connector.

  1. 来自 SAP BW 的数值数据返回小数点,而不是逗号。Numeric data from SAP BW returns decimal points instead of commas. 例如,1,000,000 的返回形式为 1.000.000。For example, 1,000,000 is returned as 1.000.000.

    SAP BW 返回以 ,(逗号)或 .SAP BW returns decimal data with either a , (comma) or a . (句点)作为十进制分隔符的十进制数据。(dot) as the decimal separator. 为指定哪些 SAP BW 可用于十进制分隔符,Power BI Desktop 使用的驱动程序会调用 BAPI_USER_GET_DETAIL。To specify which of those SAP BW should use for the decimal separator, the driver used by Power BI Desktop makes a call to BAPI_USER_GET_DETAIL. 该调用返回一个名为 DEFAULTS 的结构,它包含一个名为 DCPFM 的字段,用于存储十进制格式表示法。This call returns a structure called DEFAULTS, which has a field called DCPFM that stores Decimal Format Notation. 它采用以下三个值之一:It takes one of the following three values:

    ‘ ‘ (space) = Decimal point is comma: N.NNN,NN
    'X' = Decimal point is period: N,NNN.NN
    'Y' = Decimal point is N NNN NNN,NN

    报告此问题的客户发现,对于特定用户(显示不正确的数据的用户),对 BAPI_USER_GET_DETAIL 的调用失败,并显示类似于以下内容的错误消息:Customers who have reported this issue found that the call to BAPI_USER_GET_DETAIL is failing for a particular user (the user who is showing the incorrect data), with an error message similar to the following:

    You are not authorized to display users in group TI:
            <MESSAGE>You are not authorized to display users in group TI</MESSAGE>

    为了修复此错误,用户必须要求他们的 SAP 管理员授予在 Power BI 中使用的 SAPBW 用户执行 BAPI_USER_GET_DETAIL 的权限。To solve this error, users must ask their SAP admin to grant the SAPBW user being used in Power BI the right to execute BAPI_USER_GET_DETAIL. 需要确定的另一点是,用户是否具有必需的 DCPFM 值,如本故障排除解决方案前面的内容所述。It’s also worth verifying that the user has the required DCPFM value, as described earlier in this troubleshooting solution.

  2. SAP BEx 查询的连接Connectivity for SAP BEx queries

    你可以通过启用特定属性执行 Power BI Desktop 中的“BEx”查询,如下图所示:You can perform BEx queries in Power BI Desktop by enabling a specific property, as shown in the following image: