Quantcast
Channel: SCN: Message List - Data Warehousing
Viewing all articles
Browse latest Browse all 3366

Re: Function Module in BW returning unlimited records.

$
0
0

hi Junaid,

 

Your logic should be like below:

 

 

OPEN CURSOSR STATEMENT

 

WHILE  1 = 1. (INFINITE LOOP WHICH WILL EXIT WHENEVER SY-SUBRC NE 0)

 

FETCH CURSOR WITH PACKAGE SIZE I_MAXSIZE.

 

IF SY-SUBRC EQ 0.

     POPULATE DATA IN E_T_DATA

ELSE.

     RAISE NO_MORE_DATA.

ENDIF.    

 

ENDWHILE.

 

You have not used fetch cursor statement neither Raise No More data statement.

 

Note: The purpose of RAISE_NO_MORE_DATA is to specify that the load is complete. If you raise it without specifying the correct condition it will not fetch any records.

 

Thanks,

Puneet


Viewing all articles
Browse latest Browse all 3366

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>