Skip to Content
0
Former Member
Apr 08, 2008 at 04:26 PM

Advice about a select *

23 Views

Hi Guys , I´m using a open cursor statement, what happened about the following code : LOOP AT ti_referencias.

OPEN CURSOR WITH HOLD cursor1 FOR

SELECT * FROM zpf_cob_doc_ext

WHERE referencia = ti_referencias-ref

ORDER BY referencia ASCENDING.

DO.

FETCH NEXT CURSOR cursor1

INTO CORRESPONDING FIELDS OF TABLE it_zpf_cob_doc_ext

PACKAGE SIZE p_commit.

IF sy-subrc NE 0.

EXIT.

ENDIF.

ENDDO.

CLOSE CURSOR cursor1.

ENDLOOP.

it_zpf_cob_doc_ext

only keeps the last register , why ?