Skip to Content
0
Former Member
May 27, 2008 at 09:37 PM

CURSOR - FETCH Error

20 Views

Hi All,

I am new to ABAP and I have a situation and don't know why it is erroring out. Could anyone point it out for me.

DATA: BEGIN OF allper,

mbegda TYPE hrp1001-begda,

mendda TYPE hrp1001-endda,

mpos TYPE hrp1001-objid,

morg TYPE hrp1001-sobid,

mper TYPE hrp1001-sobid,

mmgr_id TYPE hrp1008-btrtl,

END OF allper.

DATA: itab_allper1 LIKE TABLE OF allper.

OPEN CURSOR WITH HOLD S_CURSOR FOR

SELECT DISTINCT abegda aendda aobjid asobid bsobid cbtrtl

FROM HRP1001 AS a

LEFT OUTER JOIN HRP1001 AS b ON aobjid = bobjid AND

b~subty = 'A008' AND

b~sclas = 'P'

LEFT OUTER JOIN HRP1008 AS c ON aobjid = cobjid

WHERE a~subty = 'A003' AND

a~sclas = 'O'.

FETCH NEXT CURSOR S_CURSOR

APPENDING CORRESPONDING FIELDS

OF TABLE itab_allper

PACKAGE SIZE 1000.

I get a shohrt dump in the FETCH statment. Looks to me some fields don't match? any clues?

Thx,

Alex.