Skip to Content
author's profile photo
Former Member

Data Transfer problem from cursor to table

Hi ,

I created one Extract FM to extract data through a Datasource by RAS3. When i run the FM directly the cursor value (S_CURSOR) is displayed as 3850 and when i try to transfer using FETCH NEXT to a internal table (E_T_DATA) 498 entries populated but if i open the table all lines are blank. Pls help me. i.e. E_T_DATA[] = 498

 OPEN CURSOR WITH HOLD S_CURSOR FOR
    SELECT MATNR
    FROM MARA AS A "INNER JOIN MARC AS C
    "ON A~MATNR = C~MATNR
    "INTO TABLE E_T_DATA
    WHERE MATNR IN L_R_MATNREAN
      AND MTART IN ('ZPLU','ZPAK',
                      'ZCOM','ZTIN',
                      'ZSCR','ZEXW',
                      'ZCOU','ZGVR')
      AND EAN11 = ''
      AND ATTYP = '00'.

FETCH NEXT CURSOR S_CURSOR
             APPENDING CORRESPONDING FIELDS
             OF TABLE E_T_DATA
             PACKAGE SIZE S_S_IF-MAXSIZE.

  IF SY-SUBRC <> 0.
    CLOSE CURSOR S_CURSOR.
    RAISE NO_MORE_DATA.
  ENDIF.


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Posted on May 05, 2011 at 01:10 PM

    first of all you have to put your FETCH into a DO ... ENDDO

    Add comment
    10|10000 characters needed characters exceeded