cancel
Showing results for 
Search instead for 
Did you mean: 

how to call an oracle procedure that returns a cursor in ABAP

former_member505565
Discoverer
0 Kudos

Hi all,

Currently we encounter a problem.we try to execute a oracle procedure to get a list of stock material information stored in another system. but we don't know the correct way to call a procedure that return a cursor. can anyone help out?

Thanks and best regards!

Accepted Solutions (0)

Answers (2)

Answers (2)

jrodriguezferna
Participant

Hi,

you can use the standard framework ADBC (package SDB_ADBC) to do that. Youy can call procedures from the DB (CL_SQL_STATEMENT->EXECUTE_PROCEDURE), and process the reuslt using the class CL_SQL_RESULT_SET that support the use of cursors (mthods NEXT, NEXT_PACKAGE, CLOSE......)

You have an example in report ADBC_DEMO_PROC_CALLS_HDB:

former_member505565
Discoverer
0 Kudos

Hi,Juan Carlos Rodriguez

Thanks for your answer! I still wonder whether the ADBC support oracle procdure,as the demo you offer is designed for Hana Database.

jrodriguezferna
Participant
0 Kudos

Hi Tong Li,

ADBC support Oracle procedures. ADBC is an agnostic framework that support all DB supported by SAP.

The example is written for a HANA procedure, but can be use in similar way to use an Oracle procedure.

former_member505565
Discoverer
0 Kudos

Hi,Juan Carlos Rodriguez

Thanks for your answer! I still wonder whether the ADBC support oracle procdure,as the demo you offer is designed for Hana Database.

Sandra_Rossi
Active Contributor
0 Kudos

Please use the COMMENT button (as SAP says: "Before answering You should only submit an answer when you are proposing a solution to the poster's problem.")