Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Checking of SQL Query Result

Former Member
0 Likes
1,338

Hi All,

How can i view result of SQL query in SAP-ABAP. Actually I want to see result of following query :

select * from ZMSTKCALC where werks_d <> werks_main.

I am new to SAP territory.

Thanks in advance for your help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
993

Hi,

Put a Break point there, or write a statment before that query BREAK-POINT, and execute that, you will go into the Debugging mode, there double click that tabel ZMSTKCALC , you will see the result

Regards

Sudheer

Hi All,

How can i view result of SQL query in SAP-ABAP. Actually I want to see result of following query :

select * from ZMSTKCALC where werks_d <> werks_main.

I am new to SAP territory.

Thanks in advance for your help.

5 REPLIES 5
Read only

Former Member
0 Likes
994

Hi,

Put a Break point there, or write a statment before that query BREAK-POINT, and execute that, you will go into the Debugging mode, there double click that tabel ZMSTKCALC , you will see the result

Regards

Sudheer

Read only

0 Likes
993

Thanks Sudhir for Reply...

Is there any other way? I mean the way one can execute Query on ORACLE - SQL Prompt.

Using Transaction - SQ01 or SQvi or zx02.

Thanks

Read only

Former Member
0 Likes
993

hi yogesh ,

welcome to SDN.

for this

data : begin of itab occurs 0,

include structure ZMSTKCALC .

end of itab.

select * from ZMSTKCALC into table itab where werks_d <> werks_main.

loop at itab.

write:/ itab. "--for outout

endloop.

collect the data into itab .

regards,

vijay

Read only

venkata_ramisetti
Active Contributor
0 Likes
993

Hi Yogesh,

Welcome to the SDN world!!!

You have to use WRITE statement to see the result of the SQL query.

The result of the SQL query need to be stored in a work area.

For example:

data: T_ZMSTKCALC LIKE ZMSTKCALC occurs 0 with header line.

select * from ZMSTKCALC into table T_ZMSTKCALC where werks <> werks_main.

loop at T_ZMSTKCALC.

write:/ T_ZMSTKCALC-FIELD1,

T_ZMSTKCALC-FIELD2.

endloop.

Thanks

Ramakrishna

Read only

0 Likes
993

Thanks for Reply...

Is there any other way? I mean the way one can execute Query on ORACLE - SQL Prompt.

Using Transaction - SQ01 or SQvi or zx02.

Please note that i can not write program in Production environment. I mean not alllowed.

Thanks