cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to save the SAP BO 4.2 document using REST.

Former Member
0 Kudos

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..?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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();

Answers (0)