cancel
Showing results for 
Search instead for 
Did you mean: 

FM Based generic extractor return all blank records in RSA3

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186399
Active Contributor
0 Kudos

Dear Snehasish,

Have you maintained the extract structure in the Tables tab against E_T_DATA.

Regards

Gajesh

Former Member
0 Kudos

Hi Gajesh,

Yeah. I have maintained E_T_DATA like extract structure in the tables tab of FM. Activated fm and function group too.

Thanks

Snehasish