1. Export Batch Size Evaluation

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:

  1. cdat <= '19991231'
  2. cdat >= '20000101' AND cdat <= '20031231'
  3. cdat >= '20040101'

Checking size of the export:

<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 ( 
        'U00', 'U01', 'U02', 'U03', 'U04', 'U05', 'U06', 'U07', 'U08', 'U09',
        'U10', 'U11', 'U12', 'U13', 'U14', 'U15', 'U16', 'U17', 'U18', 'U19',
        'U20', 'U21', 'U22', 'U23', 'U24', 'U25', 'U26', 'U27', 'U28', 'U29',
        'U30', 'U31', 'U32', 'U33', 'U34', 'U35', 'U36', 'U37', 'U38', 'U39',
        'U40', 'U41', 'U42', 'U43', 'U44', 'U45', 'U46', 'U47', 'U48', 'U49',
        'U50', 'U51', 'U52', 'U53', 'U54', 'U55', 'U56', 'U57', 'U58', 'U59',
        'U60', 'U61', 'U62', 'U63', 'U64', 'U65', 'U66', 'U67', 'U68', 'U69',
        'U70', 'U71', 'U72', 'U73', 'U74', 'U75', 'U76', 'U77', 'U78', 'U79',
        'U80', 'U81', 'U82', 'U83', 'U84', 'U85', 'U86', 'U87', 'U88', 'U89',
        'U90', 'U91', 'U92', 'U93', 'U94', 'U95', 'U96', 'U97', 'U98', 'U99'
    )
    AND cdat >= '19800101' AND cdat <= '20501231'

2. Actual Export

image.png