Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Native SQL, Usefull or not?!

$
0
0

Hi folks !

 

This is my first blog post, I confess I am little nervous when i write it, first impressions are everything, right?

 

Well, let's talk of one of my favorite theme, the statement "EXEC SQL" (Native SQL).

 

Native SQL allows you to use database-specific SQL statements in an ABAP program. This means that you can use database tables that are not managed by the ABAP Dictionary, Its usefull when integrate another system through SAP.

 

Example 1 (Selecting one field) in Oracle:

 

TYPES: BEGIN OF wa_dual,

                txt TYPE string,

             END OF wa_dual.

 

CONSTANTS: c_conn TYPE char20 VALUE 'db_con'.

 

EXEC SQL.

   CONNECT TO :c_conn

ENDEXEC.

 

EXEC SQL PERFORMING F_SINGLE_LINE_PRINT.

   SELECT 'I LIKE WRITE SQL'

      FROM dual

      INTO :wa_dual

ENDEXEC.

 

FORM F_SINGLE_LINE_PRINT.

 

   WRITE: / wa_dual-txt.

 

ENDFORM.

 

 

But, its a good pratice use it, knowing that there arevarious forms ofintegration (RFC, Webservice, etc)?!

 

 

I particularlylike to usethis statement, but only becausethe system ofextractionthatusesinterfaces(lie,I like to writeSQLcommands )
Folks, write theirconsiderations ofthis statementand their experiences

Thanks for all.

 

 


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>