2022 Feb 05 3:42 PM
Hello Friends,
I am receiving runtime error as " Cursor already closed or not open yet." for the below piece of code.
So, can anyone please help me how to solve it?
I have tried DB_COMMIT FM for commit work and also without it, still the same dump occurs.
data: gv_cursor TYPE cursor.
OPEN CURSOR WITH HOLD gv_cursor
FOR SELECT
erdk~opbel
fkkvkp~ktokl
FROM erdk AS erdk
INNER JOIN fkkvkp AS fkkvkp
ON fkkvkp~vkont = erdk~vkont
WHERE erdk~opbel IN s_prtdoc.
DO.
FETCH NEXT CURSOR gv_cursor
INTO TABLE gt_input
PACKAGE SIZE 1000.
IF sy-subrc IS INITIAL.
SORT gt_input BY opbel.
ELSE.
CLOSE CURSOR gv_cursor.
EXIT.
ENDIF.
****Some other logics is implemented below.
ENDDO.
Hello Friends,
I am receiving runtime error as " Cursor already closed or not open yet." for the below piece of code.
So, can anyone please help me how to solve it?
I have tried DB_COMMIT FM for commit work and also without it, still the same dump occurs.
data: gv_cursor TYPE cursor.
OPEN CURSOR WITH HOLD gv_cursor
FOR SELECT
erdk~opbel
fkkvkp~ktokl
FROM erdk AS erdk
INNER JOIN fkkvkp AS fkkvkp
ON fkkvkp~vkont = erdk~vkont
WHERE erdk~opbel IN s_prtdoc.
DO.
FETCH NEXT CURSOR gv_cursor
INTO TABLE gt_input
PACKAGE SIZE 1000.
IF sy-subrc IS INITIAL.
SORT gt_input BY opbel.
ELSE.
CLOSE CURSOR gv_cursor.
EXIT.
ENDIF.
****Some other logics is implemented below.
ENDDO.
2022 Feb 05 4:19 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |