10-17-2007 1:30 AM
Hi,
I have a dialog screen with an inputfield. The developer will key in SQL statement into this inputfield and the SQL statement will store in the database. When the developer click on execute button. The program will retrieve the SQL statement from the database and perform the SQL statement and retrieve the data.
Is it possible to do that? What are the things that i need to look into?
Regards,
Rayden
10-17-2007 1:33 AM
Hi Rayden,
I don't think it is possible. You may need to look at some other alternative.
Regards,
Atish
10-17-2007 1:33 AM
Hi Rayden,
I don't think it is possible. You may need to look at some other alternative.
Regards,
Atish
10-17-2007 2:11 AM
Hi,
Yes it is posible.
I made one program like you want. But it need very long code.
Here I explain the idea:
1. Create Screen with input TEXT EDIT CONTROL.
This is for input SQL Statement.
2. Get SQL Statement from Text Edit Control using method <b>get_text_as_r3table</b>.
3. Now we need to separate SQL Statement into different table.
We Separate SELECT, FROM, WHERE, GROUP, HAVING, ORDER, etc.
4. We need dynamic internal table to store the data.
5. Select the data according SQL statement.
SELECT (IT_SELECT)
into corresponding fields of table <dyn_table>
FROM (IT_FROM)
WHERE (IT_WHERE)
GROUP BY (IT_GROUP)
HAVING (IT_HAVING)
ORDER BY (IT_ORDER).
6. Display our data using ALV GRID
Hopefully it will help you.
Regards,
10-17-2007 3:23 AM
Hi Jatra,
That was great. Do you have any sample code to share?
Regards,
Rayden
10-17-2007 3:38 AM
Hi,
I am preparing my code. When it ready i will upload it.
Regards,
10-17-2007 3:47 AM
Hi Jatra,
Great. Looking forward for the sample.
Thanks
Regards,
Rayden