Skip to Content

Fetch Cursor giving dump


Hi All,,


My fetch Cursor statement in the below code gives dump DBIF_RSQL_INVALID_RSQL for unknown reason.

Please help me rectify it.

The structure of my internal table is

TYPES:BEGIN OF gty_ekpo,

ebeln TYPE ekpo-ebeln,

ebelp TYPE ekpo-ebelp,

txz01 TYPE ekpo-txz01,

afnam TYPE ekpo-afnam,

netpr TYPE ekpo-netpr,

menge TYPE ekpo-menge,

netwr TYPE ekpo-netwr,

loekz TYPE ekpo-loekz,

erekz TYPE ekpo-erekz,

END OF gty_ekpo.

So there is not data type mismatch as well



OPEN CURSOR gv_cursor FOR

SELECT ebeln

ebelp

txz01

afnam

netpr

menge

netwr

loekz

erekz

FROM EKPO

FOR ALL ENTRIES IN lt_ekko

WHERE ebeln = lt_ekko-ebeln

AND loekz eq space

AND erekz eq gc_blank.

IF sy-subrc = 0.

lv_return = abap_true.

ENDIF.

WHILE lv_return = abap_true.

FETCH NEXT CURSOR gv_cursor

APPENDING TABLE lt_ekpo

PACKAGE SIZE 10001.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Sep 17, 2014 at 02:40 PM

    Package Size 10001 is not a variable, so shouldn't it be in single quotes?

    pk

    EDIT: Looks like you can indeed define package size without the single quotes(tried in my system). So whats the error you are getting?

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 17, 2014 at 03:20 PM

    Post the dump you are getting.

    Regards,

    Philip.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 17, 2014 at 06:02 PM

    Hi Faizur,

    Seems you are in infinite loop. Clear LV_RETURN when sy-subrc fails.

    WHILE lv_return = abap_true.

    FETCH NEXT CURSOR gv_cursor

    APPENDING TABLE lt_ekpo

    PACKAGE SIZE 10001.

    if sy-subrc ne 0.

    clear lv_return.

    endif.

    Cheers!!

    Raju Shrestha.

    Add comment
    10|10000 characters needed characters exceeded