Last active
December 30, 2015 04:59
-
-
Save dantesco/7779592 to your computer and use it in GitHub Desktop.
Obten informacion de tablas por paquetes para no sobrecagar la memoria disponible de itabs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OPEN DATASET <file name> FOR OUTPUT IN TEXT MODE ENCODING DEFAULT. | |
OPEN CURSOR l_c1 FOR SELECT * FROM <table NAME>. | |
WHILE l_c1 IS NOT INITIAL. | |
FETCH NEXT CURSOR l_c1 INTO TABLE <internal table> PACKAGE SIZE p_pkg. | |
* p_pkg is the maximum number of records to be fetched every time. | |
IF sy-subrc EQ 0. | |
LOOP AT <internal table> INTO <work area>. | |
TRANSFER <work area> TO <file name>. | |
ENDLOOP. | |
ELSE. | |
CLOSE CURSOR l_c1. | |
ENDIF. | |
ENDWHILE. | |
CLOSE DATASET <file name>. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment