Skip to Content

SAP native sql and oracle

Hi,

I have strange problem with native SQL and calling of stored procedures. SAP is running on MSSQL Server and we are in need to update another database which is on oracle. Everything was fine until we upgrade SAP from EHP 6 to EHP 7.

Stored procedures on oracle server has 3 parameters and its purpose is to maintain table on oracle. Parameters:

  1. Action CHAR2(SAP) VARCHAR2(Oracle)
  2. ID INT4(SAP) NUMBER(Oracle)
  3. Name CHAR50(SAP) VARCHAR2(Oracle)

Action can have values I, U, D.

Problem is that values received by procedure are empty for values I wrote. When I send IU, II, IF, IR parameter value inside procedure is I(first letter). ID is correct and name is empty to.

EXEC SQL.
   execute procedure change_tab_values( IN :l_action, IN :l_id, IN :l_name)
ENDEXEC.

I also tried with ADBC approach.

Can someone help with this problem?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 31, 2017 at 11:59 AM

    Hi Vladimir, ABAP Native SQL Statement are not 'translated' by the Database Shared Library (DBSL), these are just executed. This is why SAP recommends and suggests to use OPEN SQL Statements, which is Database-Independent.
    I am affraid, you have to rewrite the Native SQL Statement and adapt this to Oracle.

    Regards,

    János

    Add comment
    10|10000 characters needed characters exceeded