on 07-28-2016 10:11 AM
Hello guys,
I've got to translate some applications VBA using BO XIR2 to BO BI4.
We use an WinHttpRequest object for BI4. I know how it works with documents and reports, but I didn't find any information for queries (or dataproviders on BI4).
So I need to translate this code :
docBOUnitaire.dataproviders(sProvider).Load
Do While docBOUnitaire.dataproviders(sProvider).Queries(1).Conditions.Count > 1
docBOUnitaire.dataproviders(sProvider).Queries(1).Conditions.Remove (2)
Loop
...
docBOUnitaire.dataproviders(sProvider).Queries(1).Conditions.Add sDim, sProvider, "In list", s, "Constant"
docBOUnitaire.dataproviders(sProvider).Unload
....
docBOUnitaire.dataproviders(sProvider).Refresh
How can I do theses functions on conditions: count - remove - add ?
How can I do theses functions on dataproviders : load - unload - refresh ?
I've got this code to get result from dataproviders, it works :
Obj_AppBO.Open "GET", Str_Server & "/raylight/v1/documents/" & Lng_DocId & "/dataproviders/DP" & Lng_DpNum & "/flows/0"
Obj_AppBO.SetRequestHeader "X-SAP-LogonToken", """" + Str_Token + """"
Obj_AppBO.SetRequestHeader "Accept", "text/plain; charset=""UTF-8"""
Obj_AppBO.SetRequestHeader "Content-Type", "text/xml"
Obj_AppBO.SetRequestHeader "Accept-Language", "fr-FR"
Obj_AppBO.Send
Obj_AppBO.WaitForResponse
If IsAppSendStatus(Obj_AppBO.Status) Then
Exit Function
End If
Str_Result = Obj_AppBO.ResponseText
Thanks for helping me
Hello Stéphane,
Using Webi RESTful API, you're able to get the XML "Query Specification" of a dataprovider. In the XML output, especially in the <conditionPart> section, you should be able to discover the conditions.
[GET] <url>/dataproviders/<dpid>/specification
(using Accept: text/xml)
In the official documentation of the RESTful API, you will read more about calls allowing to refresh a dataprovider, or how to purge it.
Regards,
Anthony
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.