Skip to Content
0
Former Member
May 30, 2005 at 09:41 AM

GET & Open Cursor

73 Views

Hello All,

Currently i am using LDBs KDF and following is the code :

OPEN CURSOR WITH HOLD DB_CURSOR FOR <----


GET BKPF FIELDS

BUKRS "Company code

BELNR "Document No.

GJAHR "FY

BLDAT "DocumentDate

BUDAT "PostingDate

MONAT "FiscalPeriod

XBLNR. "Reference Document No.

CHECK ( BKPF-MONAT IN S_MONAT AND BKPF-BLDAT IN S_BLDAT ).

DO.

FETCH NEXT CURSOR DB_CURSOR

APPENDING TABLE T_BKPF PACKAGE SIZE 10000.

IF SY-SUBRC NE 0.

CLOSE CURSOR DB_CURSOR.

EXIT.

ENDIF.

ENDDO.

COMMIT WORK.

I receive the message that SELECT is required for OPEN CURSOR.

I cannot use the SELECT as for Accessing the Archived data LDB had to be used and GET statements are used.

Can you please correct/propose new code for the above.

Thankyou,

- PSK