/scripts/ahub.form.attachments.js
0

Unable to save the SAP BO 4.2 document using REST.

May 17, 2017 at 11:34 PM

29

avatar image

How to run the query in SAP Business Object creation process by using REST.

Following below steps : -

1. Creating the document ("http://ServerAddress../biprws/raylight/v1/documents")

2. Creating a Report (... "/biprws/raylight/v1/documents/" + docID + "/reports";)

3. Adding DataProvider to Document (... "/biprws/raylight/v1/documents/" + docID + "/dataproviders";)

4. Creating Query Specification (.."/biprws/raylight/v1/documents/" + DocId + "/dataproviders/" + DataProvId + "/specification")

5. Trying to run the query ..

Is the above sequence proper.. or I am missing any thing..?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Dev C Jun 13, 2017 at 04:08 PM
0

I am able to save document.(Just sharing the details)

The steps missing was Refresh and Save the document and no need to run the query.

Steps to follow

1. Create New Document using REST

2. Add Update Report To Doc

3. Add Update Data Provider

4. Add Report Specification

5. Save document

string SaveDocUrl = "http://" + Session.IP + ":" + Session.port + "/biprws/raylight/v1/documents/" + DocId;

6. Refresh document

string RefreshDocUrl = "http://" + Session.IP + ":" + Session.port + "/biprws/raylight/v1/documents/" + DocId + "/parameters?refresh=true";

7. Export to Excel

string GetReportUrl = "http://" + Utilities.Session.IP + ":" + Utilities.Session.port + Utilities.Session.version + "/documents/" + DocId + "/reports/" + RptId; HttpWebRequest GetRequest = (HttpWebRequest)WebRequest.Create(GetReportUrl); GetRequest.Method = "GET"; //GetRequest.Timeout = 1200; GetRequest.Accept = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; GetRequest.Headers.Set("X-SAP-LogonToken", Utilities.Session.LoginToken); WebResponse GETResponse = GetRequest.GetResponse();

Share
10 |10000 characters needed characters left characters exceeded
Skip to Content