SAP BI Open Doc URL for retrieving pdf

邮差的信 提交于 2019-12-30 11:09:31

问题


In a reporting application we use, we were using BI 3.x API to produce Web reports. While doing the migration activity to 4.x version, we thought it is fine to go with open doc url rather than doing the report generation through API.

Many of the samples I have seen uses sIDType and iDocID parameters along with Token value to retrieve the document by constructing a URL like below http://server:port/BOE/OpenDocument/opendoc/openDocument.jsp?token=[LogonToken]&iDocID=[XXXX]&sIDType=CUID

But all those URLs get HTML page as response from BI 4.x SAP webservice, the java script in that HTML page does the task of retrieving the pdf file.

I am just wondering if there is any way I could retrieve the pdf report as response from the BI Webservice directly ? Please assist me on this. Thanks


回答1:


You can if you use the REST SDK to retrieve the document, refresh it and then export it to PDF.

In short, these are the steps:

  1. Logon: POST /biprws/logon/long
  2. Get the doc's prompts (if any) GET /biprws/raylight/v1/documents/5690743/parameters
  3. Pass the correct values for the prompts (if any) and refresh the document: PUT /biprws/raylight/v1/documents/5690743/parameters
  4. Export as PDF GET /biprws/raylight/v1/documents/5690743

That last step requires you to pass Accept: application/pdf in your HTTP headers to get the PDF version.

Detailed information on the REST SDK and the different steps listed above is available on help.sap.com (look for the manual SAP BusinessObjects RESTful Web Service SDK User Guide for Web Intelligence and the BI Semantic Layer).




回答2:


Use sOutputFormat=P to always retrieve the PDF of the report using open doc



来源:https://stackoverflow.com/questions/35310121/sap-bi-open-doc-url-for-retrieving-pdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!