avatar image
Former Member

Unable to save the SAP BO 4.2 document using REST.

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jun 13, 2017 at 04:08 PM

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

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content