Skip to Content
0

Get data from oracle procedure using native sql

Feb 27, 2017 at 11:56 AM

49

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Aneel Munawar Feb 27, 2017 at 12:01 PM
0

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),

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi
Feb 27, 2017 at 12:37 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Horst Keller
Feb 27, 2017 at 04:41 PM
0
Share
10 |10000 characters needed characters left characters exceeded
Aneel Munawar Feb 28, 2017 at 05:36 AM
0

Dear Raymond,

I am using this program. File is attached.

Regards,

Aneel

ztest.txt


ztest.txt (1.7 kB)
Share
10 |10000 characters needed characters left characters exceeded
Aneel Munawar Feb 28, 2017 at 05:47 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded