Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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.

Not what you were looking for? View more on this topic or Ask a question