FM Based generic extractor return all blank records in RSA3
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.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'ZVBELN'.
MOVE-CORRESPONDING L_S_SELECT TO SDNO.
*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
INNER JOIN VBAP on VBAK~VBELN = VBAP~VBELN
WHERE VBAK~VBELN IN SDNO.
* 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.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF. "Initialization mode or data extraction ?