02-20-2007 5:53 PM
Hi Everyone,
I have sql script which gives certain output from the data base files, is it possible to execute this script in ABAP, I want to embed this sql script in ABAP and get the output into an internal table how is it possible.
Can anyone suggest me on this, it will be of great use to me.
Thanks,
Prashant.
02-20-2007 5:59 PM
Hi
SAP uses Open SQL for accessing data from any of the databases.
Incase you want to find more details. Also look for Open SQL or Use Native SQL language in ABAP to accomplish the job.
<b> Open SQL
http://help.sap.com/saphelp_46c/helpdata/en/c9/5472f9787f11d194c90000e8353423/frameset.htm
Native SQL
http://help.sap.com/saphelp_46c/helpdata/en/c9/5472f9787f11d194c90000e8353423/frameset.htm</b>;
Hope this will help.
Please reward suitable points.
Regards
- Atul
02-20-2007 5:59 PM
Hi
SAP uses Open SQL for accessing data from any of the databases.
Incase you want to find more details. Also look for Open SQL or Use Native SQL language in ABAP to accomplish the job.
<b> Open SQL
http://help.sap.com/saphelp_46c/helpdata/en/c9/5472f9787f11d194c90000e8353423/frameset.htm
Native SQL
http://help.sap.com/saphelp_46c/helpdata/en/c9/5472f9787f11d194c90000e8353423/frameset.htm</b>;
Hope this will help.
Please reward suitable points.
Regards
- Atul
02-20-2007 6:12 PM
Hi Atul,
Thanks for the links, but my sql script reads the data from the data dictionary views and tables. All the information which is related to database size, like the tablespace size from database segments, extent size etc.
Thanks,
Prashant.
02-20-2007 6:16 PM
Hi
I guess without any changes it will work.
Try writing the queries as it is in SAP ABAP Editor.
Incase, there are any issue, then use Native SQL.
Hope this will help.
Please reward suitable points.
Regards
- Atul
02-20-2007 6:23 PM
Hi,
My main intention in that script is to get the overall database size and tablespace size, how do I achieve this in ABAP.
The flow is in my selection screen program I have checkbox for database size, if the user checks this box, it has to display the entire database size in MB of KB.
I know that we can get this information through DB02, but my task is to get this information in a program and display it as a list.
Please suggest me with some ideas.
Thanks,
Prashant.
02-20-2007 6:10 PM
02-20-2007 6:27 PM
Hi,
To check the table space we have a program .....
RSORAT01 - Check Table Space
RSORATC5 - Check Table Extent
http://www.saptechies.com/sap-table-space-daily-check-list/
same like you will find the Program name for entire database also.. i do not know about the program, but Basis people will definetly helpyou out in this one
Regards
Sudheer