在 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 Software Download Center (SAP 軟體下載中心) 取得 SAP NetweaverYou can get the SAP Netweaver library from your SAP administrator, or directly from the SAP Software Download Center. 由於 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 Note #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 伺服器 Cube 匯入資料。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. 您必須指定「伺服器」、「系統名稱」與「用戶端識別碼」以建立連線。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 陳述式,您會看到 [導覽] 視窗,其中顯示伺服器中可用的 Cube 清單,以及從可用 Cube 向下鑽研並選取項目 (包括維度和量值) 的選項。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 Open Analysis Interface OLAP BAPI 所公開的查詢和 Cube。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 支援 Cube 內物件的「技術名稱」概念。Technical Names: SAP BW supports the notion of technical names for objects within a cube. 技術名稱可讓 Cube 擁有者公開 Cube 物件的「使用者易記」名稱,而不只是公開 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 Cube 匯入資料之外,請記住,您也可以從 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: