Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

FM Based generic extractor return all blank records in RSA3

Hi ,

I have written a fm based extractor based BIW_GET_DATA_SIMPLE. Now extractor is not giving any error . Its returning number of records fine but all records are blank in rsa3. I have commented out the cursor and tried to put internal table , found that records are there in internet table but not sure why it is picking all blank records if I use cursor.

Sample Code

LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'ZVBELN'.

         MOVE-CORRESPONDING L_S_SELECT TO SDNO.

         APPEND SDNO.

       ENDLOOP.

*Determine number of database records to be read per FETCH statement

* from input parameter I_MAXSIZE. If there is a one to one relation

* between DataSource table lines and database entries, this is trivial.

* In other cases, it may be impossible and some estimated value has to

* be determined.

      OPEN CURSOR WITH HOLD S_CURSOR FOR

     select  VBAk~VBELN vbak~ERDAT  vbap~POSNR vbap~MATNR

        from VBAK

        INNER JOIN VBAP on VBAK~VBELN = VBAP~VBELN

       WHERE VBAK~VBELN IN SDNO.

       ENDIF.

* Fetch records into interface table.

*   named E_T_'Name of extract structure'.

     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.

     S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.

   ENDIF.              "Initialization mode or data extraction ?

ENDFUNCTION.



Thanks

Snehasish

Former Member
Not what you were looking for? View more on this topic or Ask a question