‎2005 Jul 07 5:20 AM
Hi,
Is there a Transaction Code that could be used to write your own SQL query and execute. The QuickViewer is a graphical query designer and is not flexible for advance query design. You could also write your query in a ABAP program and execute it but this take time.
Pls give me various methods that are available.
Thanks
Kishan
‎2005 Jul 07 6:53 AM
Hi Kishan,
Would you execute
- a SELECT-Statement, then see the answer from andrea (SQ01 and SQ02)
or
- a any Statement.
Then see
- EXEC SQL
or
- use the class CL CL_SQL_STATEMENT. An example is the abap ADBC_DEMO.
Sven
‎2005 Jul 07 5:26 AM
Hi Kishan,
As far as I know, there's no transaction that would let you do it directly.
You have these two options which may be somewhat helpful -
1. ST05 - There's an option to <i>Explain one SQL Request</i>. Through this option you can find out the number of records that will be retrieved and other details. You will not get the resut, however. This transaction will help you write better SQL queries in terma of performance.
2. If you are looking for data from only a single table, you can use the SE16 transaction. You specify the table name and give the conditions.
Regards,
Anand Mandalika.
‎2005 Jul 07 6:43 AM
Hi Kishan,
try sq01 resp. sq02 and have a look here:
http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb4138455611d189710000e8322d00/frameset.htm
regards Andreas
‎2005 Jul 07 6:53 AM
Hi Kishan,
Would you execute
- a SELECT-Statement, then see the answer from andrea (SQ01 and SQ02)
or
- a any Statement.
Then see
- EXEC SQL
or
- use the class CL CL_SQL_STATEMENT. An example is the abap ADBC_DEMO.
Sven
‎2005 Jul 07 7:06 AM
n order to create an ABAP query , one has to do the following.
1. Create an User group.
2. Create a Functional Area
3. Assign the User group to the Functional Area
4. Create the query based on the functional area created.
You can create or execute these, using the transactions below.
SQ01 for Query
SQ02 for Functional Area.
SQ03 for User Group.
First Step is to create a dictionary structure . Include all the fields in this structure that you want to output.
Then create a report program having the following structure .
Report XXX .
TABLES tab . Declare the already created dictionary structure also here.
Parameters x . Define parameters here
Select-Options: .
DATA : ..
DATA : BEGIN OF itab OCCURS xxx
END OF itab. Structure tab to hold the records to be evaluated.
*<Query_head> This comment must always appear after your data declarations
Code to define the table itab
Loop to retrieve each record and place it in itab.
SELECT,DO, LOOP , .
If necessary , code to format data
*<Query_body> This comment must always be the last statement in the loop.
End of loop
ENDSELECT , ENDDO, ENDLOOP ,
Get back to me if u need the document for doing so.
Thanks & Regards,
Judith.
‎2005 Jul 07 8:24 AM
‎2009 Jun 10 1:03 PM
‎2009 Jun 10 1:29 PM
You waited five years after registration in order to post your first reply to a four year old thread?
I'm puzzled
Thomas