Skip to Content
avatar image
Former Member

Get data from oracle procedure using native sql

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Feb 27, 2017 at 12:01 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 27, 2017 at 12:37 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 27, 2017 at 04:41 PM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 28, 2017 at 05:36 AM

    Dear Raymond,

    I am using this program. File is attached.

    Regards,

    Aneel

    ztest.txt

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 28, 2017 at 05:47 AM

    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

    Add comment
    10|10000 characters needed characters exceeded