on 02-17-2011 4:15 PM
Hi All,
I need to fetch the table names from the SQL query in my irpt page
and my SQL query will look like..
SELECT * FROM EMPLOYEE.
I found there is a direct method in iCommand Applet to get the table names from that SQL Query
iCommand.getQueryObject().getTables();
but it is not returning me anything ..
is that the right way to get the table names from SQL query [ Fixed query mode ] or any other way to get the table names??
thanks in advance..
I think you should be working more closely with your TCS colleague (as Marcelo pointed out above):
Per the other thread you'll see that when using Query mode the portions of the select statement are kept separately and could be retrieved for simple queries. Columns, Tables, FilterExpr, SortExpr, and others would be available to you in the query object (http://help.sap.com/saphelp_mii121/helpdata/en/45/cca31a93696f74e10000000a1553f6/content.htm)
If you are using a FixedQuery you could consider using
[Param.1]
for the FROM clause and then you could simply request document.APPLETNAME.getQueryObject().getParam(1) to retrieve it at runtime, otherwise you will have to parse the Query property string yourself.
Try using
SELECT * FROM [Param.1]
and defaulting the value Employees in the Parameters tab of the Template, then you can easily retrieve this in javascript with the syntax above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.