Domain
» See all 4209 related threads
Mar 10 16

ADBC calling a stored procedure and returning a table of data  

18:23 // Darren Bambrick

Hi All

I am trying to return a table of data from a  pl/sql stored procedure in oracle from abap using adbc.

The call is throwing a sql exception with no error message or error text.  it is definatly calling the procedure as I have other test procedures that return simple out values.

I am trying to retrieve a table with the following structure

  types: begin of ty_result,

         milk_supplier     type STRING

         collection_date   type STRING

         week_no           type STRING

         volume            type STRING

         butterfat_result  type STRING

         protein_result    type STRING

         lactose_result    type STRING

         tbc_result        type STRING

         scc_result        type STRING

         thermoduric_result type STRING

         end of ty_result.

Data io_output_table type table of ty_result.

  GET REFERENCE OF io_output_table INTO dref_out.

  lr_stmnt->SET_PARAM( data_ref = dref_out

                        inout    = cl_sql_statement=>c_param_out  ).

  lr_stmnt->EXECUTE_PROCEDURE( PROC_NAME ).

Anyone know how to get  a table of data back.

Many thanks

Darren

 
Mar 10 16

Re: ADBC calling a stored procedure and returning a table of data  

23:02 // Sandra Rossi

did you check sap notes?

You may try to simplify your code to find out where the issue comes from: define your internal table with only one field, and define it of type C + length, and change the procedure accordingly. If it works then try with 2 fields, etc. Maybe the issue is with STRING type?

Mar 10 18

Re: ADBC calling a stored procedure and returning a table of data  

11:10 // Darren Bambrick

Hi Sandra

I tried your approach without success.  I now have only 1 field on my oracle table which is varchar10.  In my abap I have a table with 1 field of length char10.

I am still getting an exception but there is no message.

I debugged the code in the statement  lr_stmnt->EXECUTE_PROCEDURE( PROC_NAME ).  It is returning a sy-subrc = 8 but no message.

Apr 10 08

Re: ADBC calling a stored procedure and returning a table of data  

15:04 // Darren Bambrick

Closed, not solved

Date Views Headline Answers
29.01.2013 108 attaching docs in workflow workitem 3
28.01.2013 125 how to dispaly businesspartner number in webui from ztable 7
28.01.2013 146 How I could sent specials characters as 'ñ' or 'á' to a server file? 6
28.01.2013 97 ABOUT PARAMETERS 1
25.01.2013 542 Sub-string in a variable length SAP/ABAP 5
23.01.2013 120 Upload file from mobile app 5
22.01.2013 94 Prevent uploading # character from a file 9

Feedback