Return SQL query BOXI R3 Webi using Rebean API
Has anyone figured out how to return the SQL for an object that is in Webi using the Rebean API? I have got the ReportExpression of the column but, from 开发者_C百科there I am having a difficult time retrieving the SQL of the object.
Thanks
I believe you have gone to far into the structure. To get the SQL that is generated you should go through the DataProvider of the rebean. I have not attempted this to see what values I got, but looking at the API methods the getQuery().getSQL() methods of the DataProvider appear to be what you are looking for.
For better clarity:
DocumentInstance docInst; // get your DocumentInstance object via preferred route
DataProvider dp = docInst.getDataProviders().getItem(0); // retrieve the DataProvider that youw ould like the SQL for
String sql = dp.getQuery().getSQL(); // the SQL out of the DataProvider
getSQL() is deprecated so it may disappear in the next version
精彩评论