cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Calling store procedure using class cl_sql_statement not running

Former Member
0 Likes
940

Hello together

i want to call a stored procedure that has an input and an output parameter but when i using my coding i m getting the following error

ORA-06550: line 1, column 7:#PLS-00201: identifier 'STORED_PROC_NAME' must be declared#ORA-06550: line 1, column 7:#PL/SQL: Statement ignored


    GET REFERENCE OF lv_input  IN lr_dref."in

    lr_cl_sql_statement->set_param( data_ref = lr_dref
                        inout    = cl_sql_statement=>C_PARAM_IN ).
   GET REFERENCE OF lv_out INTO lr_dref. "out
    lr_cl_sql_statement->set_param( data_ref = lr_dref
                        inout    = cl_sql_statement=>C_PARAM_OUT ).

    TRY.
      data lv_ROWS_PROCESSED type i.

    CALL METHOD LR_CL_SQL_STATEMENT->EXECUTE_PROCEDURE
      EXPORTING
        PROC_NAME      ='Stored_Proc_Name'
      RECEIVING
        ROWS_PROCESSED = lv_ROWS_PROCESSED

-


i my oppinion there could be an error in setting the parameters. Has anyone an running solution for calling a stored procedure with in and out parameter. I already tested the ADBC Programs and even had a sight in the class documentation but there is no example with in and output parameter.

Thank your for your help!

View Entire Topic
volker_borowski2
Active Contributor
0 Likes

Well,

do not know if it helps, but there is a function module DB_EXECUTE_SQL or similar (do not have system

available right now). Works i.e. to do "exec DBMS_STATS...." calls.

It takes SQL as a string, but is not able to return output.

But may be you can peek into the code to learn something.

Volker