‎2009 Mar 18 9:39 AM
Hi All,
What is the exact purpose of OPEN CURSOR & FETCH NEXT CURSOR?
What should happen for below code.
IF NOT l_use_fae IS INITIAL.
OPEN CURSOR WITH HOLD viqmelst_cursor FOR
SELECT * FROM viqmelst
WHERE qmnum IN r_qmnum
AND qmart IN r_qmart
AND herkz IN r_herkz
AND equnr IN r_equnr
AND tplnr IN r_tplnr
AND aufnr IN r_aufnr
AND matnr IN r_matnr
AND mawerk IN r_mawerk
AND kunum IN r_kunum
AND AUSWIRK IN R_AUSWIRK
AND iloai EQ iwoa_c_x
AND qmdab NE '00000000' "n759927
AND qmdab LE x_qmdab
AND stat EQ p_status
ORDER BY qmnum.
FETCH NEXT CURSOR viqmelst_cursor
INTO CORRESPONDING FIELDS OF TABLE iselc
PACKAGE SIZE xpackage_size.
When im trying to execute the above code, fetch statement sy-subrc is 4.
Pls let me know why..? As per the above select, I have a data in the database table.
Puppy.
‎2009 Mar 18 9:49 AM
Hi,
I have small experiance in this area.
So as of my knowledge this FETCH CURSOR will not you give result with debugging mode.
It will throughs dump, if you try to debugg that..loop(Hope you know that fetch cursor works like a loop).
--Naveen Inuganti
‎2009 Mar 18 9:44 AM
‎2009 Mar 18 9:45 AM
check the following link:
http://help.sap.com/abapdocu/en/ABAPINTO_CLAUSE.htm
http://help.sap.com/abapdocu/en/ABENOPEN_CURSOR_ABEXA.htm
Regards.
Sarbajit
Edited by: Sarbajit Majumdar on Mar 18, 2009 3:16 PM
Edited by: Sarbajit Majumdar on Mar 18, 2009 3:31 PM
Edited by: Sarbajit Majumdar on Mar 18, 2009 3:36 PM
Edited by: Sarbajit Majumdar on Mar 18, 2009 3:36 PM
‎2009 Mar 18 9:49 AM
Hi,
I have small experiance in this area.
So as of my knowledge this FETCH CURSOR will not you give result with debugging mode.
It will throughs dump, if you try to debugg that..loop(Hope you know that fetch cursor works like a loop).
--Naveen Inuganti