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

query

Former Member
0 Likes
704

What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it?

1 ACCEPTED SOLUTION
Read only

Former Member
6 REPLIES 6
Read only

Former Member
0 Likes
664

Hi,

To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it

with the ENDEXEC statement as follows:

EXEC SQL [PERFORMING <form>].

<Native SQL statement>

ENDEXEC.

Dis advantage of using native sql is its is database specific.

Read only

Former Member
0 Likes
664

Hi Vennila,

All native SQL commands cann be written in between......

EXEC SQL [PERFORMING form].

................

Native SQL stetements.......

...........

ENDEXEC.

<b>One important point is, these NATIVE SQL statements are directly executed in the underlying database.</b>

Go through the following link for complete details:

http://help.sap.com/saphelp_nw04s/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm

<b>

Reward all helpful answers</b>

Regards,

V.Raghavender.

http://help.sap.com/saphelp_nw04s/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm

Read only

Former Member
Read only

Former Member
0 Likes
664

answered

Read only

Former Member
0 Likes
664
Read only

Former Member
0 Likes
664

Hi Vennila,

Using EXEC and ENDEXEC you can communicate with the external databases using native sql commands. There is no disadvantage of using them as far as i know.

The meaning of abap editor being integrated into ABAP data dictionary can be understood using the following.

if you declare a variable in abap editor like this:

data: v_matnr type mara-matnr.

The compiler would first check the existence of the table mara and the field matnr in the abap data dictionary.

It it does exist, then it will not give a syntax error.

Reward points if helpful.

Regards,

Hemant