Exporting the source code from the SAP BW system is quite an intensive operation which requires a lot of memory. That is why we need to export the source code of functions and includes in smaller batches.
<aside> ‼️
Based on our experience, each batch size should NOT exceed 30,000 rows
</aside>
Use the SQL queries below to test the size of the export by adjusting the date ranges (cdat column).
Example of batches:
cdat <= '19991231'cdat >= '20000101' AND cdat <= '20031231'cdat >= '20040101'<aside> 💡
Adjust the cdat >= '19800101' AND cdat <= '20501231' condition to return < 30,000 rows
</aside>
SELECT
COUNT(*)
FROM
reposrc
WHERE
progname LIKE 'L%'
AND RIGHT( progname, 3 ) IN (
'F00', 'F01', 'F02', 'F03', 'F04', 'F05', 'F06', 'F07', 'F08', 'F09',
'F10', 'F11', 'F12', 'F13', 'F14', 'F15', 'F16', 'F17', 'F18', 'F19',
'F20', 'F21', 'F22', 'F23', 'F24', 'F25', 'F26', 'F27', 'F28', 'F29',
'F30', 'F31', 'F32', 'F33', 'F34', 'F35', 'F36', 'F37', 'F38', 'F39',
'F40', 'F41', 'F42', 'F43', 'F44', 'F45', 'F46', 'F47', 'F48', 'F49',
'F50', 'F51', 'F52', 'F53', 'F54', 'F55', 'F56', 'F57', 'F58', 'F59',
'F60', 'F61', 'F62', 'F63', 'F64', 'F65', 'F66', 'F67', 'F68', 'F69',
'F70', 'F71', 'F72', 'F73', 'F74', 'F75', 'F76', 'F77', 'F78', 'F79',
'F80', 'F81', 'F82', 'F83', 'F84', 'F85', 'F86', 'F87', 'F88', 'F89',
'F90', 'F91', 'F92', 'F93', 'F94', 'F95', 'F96', 'F97', 'F98', 'F99'
)
AND cdat >= '19800101' AND cdat <= '20501231'
REPOSRC_L_F00-99_{batchIndex}.txt