Application Development and Automation 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: 
Read only

Get data from oracle procedure using native sql

aneel_munawar
Participant
0 Likes
1,321

Dear Abappers,

How can I get data from oracle procedure using cursor using native sql in abap.?

I have different codes but no success.

Regards,

Aneel

5 REPLIES 5
Read only

aneel_munawar
Participant
0 Likes
1,165

procedure has one cursor out and two parameters as in as date type.

The cursor will return following fields.

SBS_NO(100),
STORE_NO(100),
DOC_NO(100),
DOCUMENT_DATE(100),
POSTING_DATE(100),
LOC_DNAME(100),
TENDER_NAME(100),
CRD_NAME(100),
AMOUNT(100),
SALE_DISCOUNT(100),
TAX_AMOUNT(100),
TAX_RATE(100),
REFERENCE_TXT(100),
LINE_ITEM_TEXT(100),

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,165

Could you post code of any of your try, also be sure to read EXEC SQL - EXECUTE.

Read only

retired_member
Product and Topic Expert
Product and Topic Expert
Read only

aneel_munawar
Participant
0 Likes
1,165

Dear Raymond,

I am using this program. File is attached.

Regards,

Aneel

ztest.txt

Read only

aneel_munawar
Participant
0 Likes
1,165

Dear Horst Keller,

I am using external oracle Database but not current sap oracle DB. I have connected the external DB using DBCOCKPIT option.

I have attached the text file. You can see the file above. I can get the data from table but I am facing issue when I get data from oracle procedure.

The procedure takes two date parameters and returns the dataset of columns as given in text file. But I am unable to print that returned data.

Need your help.

Thanks,

Aneel