OW Views Query

daywalker

Member
Would anybody know programatically how to retrieve the SQL SELECT statements of OW XE or 89 views?

Calling the OW Foundation API JDBRS_GetBOBSpecs() returns a structure with the column and join information and also has a string for the SQL SELECT statement but it always returns an empty string. Most frustrating!

Also, does OW XE or 89 support WHERE statements in its views? I cannot find in OW where these can be manipulated and there is no reference to them in the structure that GetBOBSpecs() returns.

Thanks in advance,

DayWalker
[cool]
 
Try the handy attached file developed by a CNC who's in Australia. I turns on JDEDEBUG on the fly.
 

Attachments

  • 75162-OWDLC.zip
    415.5 KB · Views: 129
Hello,

My understanding of the way business views work is that the SELECT statement is generated at runtime by the JDEBase middleware layer. You can derive what the select statement would be by walking the column and join information in the BOBSpec structure. I am sorry that I don't have a code sample but it is definitely possible. The OWExport tool which you will find referenced on the list does output view information.

Regarding WHERE clauses in views, EnterpriseOne views do not support WHERE clauses. Normally you would apply the desired data selection programatically or in the case of a UBE you have the option of adding data selection criteria to the version. Can you explain why you need the WHERE clause on the view?

Regards,
 
Hi Justin,

Thanks for your reply. This seems a little lame and loosing many benefits that database views have to offer. Im sure JDE had their reasons though.

I already have the column and join information and a manually generated sql statement as you rightly suggested. I simply thought there would be a more efficient way of doing this as JDE obvoiusly has to do the same thing themselves at runtime.

Regarding the WHERE statements, I wanted those simply because of the filters that the business view creator could have applied if WHERE's were supported. If they are not supported then that makes things much easier for me, thank you. Would this also be the same for ORDER BY statements and DISTINCTS?

Thanks again,

DayWalker
 
Hi kcsimo,

Thanks for your reply. Although I was unable to use the debugging tool to locate exactly what I am looking for, it is a really handy utility to have!

DayWalker
 
Back
Top