cancel
Showing results for 
Search instead for 
Did you mean: 

Accessinng Table using Native SQL in ABAP Program

Former Member
0 Kudos

Hi Experts,

I need to access a table that is created in Oracle.

But while writing a select query as below:

EXEC sql.

SELECT MAX(ID_EVENTO)

INTO :LV_ID_EVENTO

FROM ZTAB.

ENDEXEC.

I am getting a dump saying "ZTAB doesnot exist" or IF I use ZTAB@ifsap then it dumps saying "Database name is missing a component".

Do I need to add some suffix to the table name like @ifsap to ZTAB?

Also, can I use SY-SUBRC to check to the success and failure for SELECTION OR INSERTION Operation?

Thanks

Depesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks

Former Member
0 Kudos

Hello,

Try using SAP<SID>.ZTAB in your query.

For example SAPC05.ZTAB

Regards,

Yoganand.V