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

Regarding SQL Statment

Former Member
0 Likes
548

Hi Guriji,

What is the SQL statment we are using in ECC 6.0 in place of ECC 4.7.

The SQL Statment is.

EXEC SQL.

SET CONNECTION :con_name

ENDEXEC.

thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
503

Sachin,

You need to write

CONNECT TO :con_name.

Thanks

Bala Duvvuri

3 REPLIES 3
Read only

Former Member
0 Likes
503

Hi Sachin,

This is very basic. Check SAP help for more help on OPEN SQL and NATIVE SQL.

In case of NATIVE SQL all statements come under EXEC and these statement are database specific.

Thanks,

Augustin,

Read only

Former Member
0 Likes
504

Sachin,

You need to write

CONNECT TO :con_name.

Thanks

Bala Duvvuri

Read only

0 Likes
503

hi Guruji,

This statement show error .

EXEC SQL.

SET CONNECTION :con_name

ENDEXEC.

IF sy-subrc <> 0.

  • Connection not yet opened.

EXEC SQL.

CONNECT TO :con_name

ENDEXEC.

IF sy-subrc <> 0.

  • error handling

ENDIF.

Error analysis

An exception occurred that is explained in detail below. The exception, which is assigned to class 'CX_SY_NATIV

caught and therefore caused a runtime error. The reason for the exception is:

Triggering ABAP/4 statement: Connect to "ORCL"

In Place of this statment what code we are using..

Thanks