Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.