Dump Created while fetching data TSV_TNEW_PAGE_ALLOC_FAILED

Hi.

I am fetching data from below code.
While fetching from CDPOS ..Dump is created. 
As per my analysis ..What i understood is ..It is having memory issue. 
Table CDHDR is nearly having 27 Lakhs records. Due to this Dump is created.

My Question is without using Hana In Program itself is there any possible way to solve the issue. 
Some logic I am thinking.
1)First need to count total records from CDHDR.
2)Then while fetching CDHDR table i need to split, it into batches like up to 1 lakh records then remaining process like Fetching data from CDPOS and other remaining process need to complete, then remaining records again from CDHDR Need to process it.. until total records over.

But how to implement I would like to know?

SELECT objectclas,objectid, changenr, username, udate, utime, tcode FROM cdhdr INTO TABLE @DATA(lt_cdhdr)
WHERE objectclas IN @LR_objectclas AND username IN @s_user AND udate IN @LR_daterange.

IF lt_cdhdr IS NOT INITIAL.
SELECT objectclas, objectid, changenr, tabname, tabkey, fname, chngind, value_new, value_old FROM cdpos INTO TABLE @DATA(lt_cdpos)
FOR ALL ENTRIES IN @LT_cdhdr
WHERE changenr = @LT_cdhdr-changenr.

Scroll to Top