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

abap sql convert to native sql fuction

Former Member
0 Likes
628

hi expert!

exist a function can do follow things:

convert selection-screen's select-options which user key in

to oracle where condition expression

or exist one function can convert abap sql to oracle sql

thank you very much

1 REPLY 1
Read only

Former Member
0 Likes
345

example:

EXEC SQL.

CONNECT TO :'DATA BASE NAME'

ENDEXEC.

IF sy-subrc EQ 0 .

TRY.

EXEC SQL .

SELECT COUNT(*) FROM <TABLE NAME>

INTO :recount

WHERE code = :itab-<FIELD>

ENDEXEC .

CATCH cx_sy_native_sql_error INTO exc_ref.

error_text = exc_ref->get_text( ).

MESSAGE error_text TYPE 'I'.

ENDTRY.