Application Development 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: 

ERROR IN ORACLE DATABASE LINK WHEN READING DATA

Former Member
0 Kudos

Hello Masters!

I'm using database link in order to connect SAP with an external database. I set up the connection correctly through DBCO transaction and the program is connecting fine. The error arises when using the select statement, it's giving a ORA-00919: invalid function# error. Here is the code that I'm currently using, please help me find the issue if there is a syntax problem. Thanks in advance.

EXEC SQL.

CONNECT TO 'S2M'

ENDEXEC.

IF sy-subrc EQ 0.

EXEC SQL.

SELECT parent_part,

component_part,

ref_designator,

component_type,

component_quantity

FROM material_list@MTSIIQA_PRMO.US.ORACLE.COM

INTO :t_material_list

WHERE parent_part = :p_matnr.

ENDEXEC.

2 REPLIES 2

Former Member
0 Kudos

Hi,

i used quotations in my sql code like this:


  EXEC SQL PERFORMING append_line_tab_dmimemmodule.

    select
        "EMP1"."MEMMODULE"."ID",
        "EMP1"."MEMMODULE"."CLIENT_ID"
        into :lin_dmimemmodule
        from "EMP1"."DMIMEMMODULE"@"EMP1"
  ENDEXEC.
where EMP1 is the name of db link, MEMMODULE is name of table and ID is the name of the table field. I dont know if solves, but may be you try this.

Regards,

Christian

Former Member
0 Kudos

Hi,

Look at the below link

http://www.s001.org/ABAP-Hlp/abapexec.htm

Regards

Sudheer