‎2010 Feb 25 1:23 PM
Hi Experts,
I have a single record that should come after the execution of below code. The select statement is already setting the value of dbcur. But in this DO statment after the execution of FETCH statement sy-subrc gets set to 4 and thus no records come to it_dfkkop. But one record should come. here iv_ss is of type numc10.
Please help.
DO.
FETCH next CURSOR dbcur
APPENDING TABLE it_dfkkop
PACKAGE SIZE iv_ss.
IF sy-subrc <> 0.
CLOSE CURSOR dbcur.
EXIT.
ENDIF.
ENDDO.Edited by: abhishek ranjan on Feb 25, 2010 2:23 PM
Moderator message - Moved to the correct forum. Please use code tags to format your code.
Edited by: Rob Burbank on Feb 25, 2010 9:06 AM
‎2010 Feb 25 2:29 PM
HI,
Are you open your cursor ?
OPEN CURSOR [WITH HOLD] dbcur FOR
SELECT result
FROM source
[[FOR ALL ENTRIES IN itab] WHERE sql_cond]
[GROUP BY group] [HAVING group_cond]
[ORDER BY sort_key].
Rgds