on 05-18-2017 12:34 AM
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..?
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();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.