‎2006 Oct 12 8:57 PM
Hi,
I have developed a report which brings doc's from table BKPF based on CC, posting date , period and fiscal year. i am storing them in an internal table, for those doc's I am getting the item details from BSEG and doing some calculations and downloading the items to a text file.
The report is working fine for CC having less data but for CC which have large amount of data it is not working. the report is terminated with error, Trying to extend Internal memory.
for this particular company code, for a period there may be millions of records.
it takes lot of time for selection, to reduce time I am using Logical data base BRM.
Please advice how to proceed on this.
Thanks
‎2006 Oct 12 9:02 PM
You can reduce the amount of data being retrieved, by specifying fewer accounting periods or posting dates.
Rob
‎2006 Oct 12 9:12 PM
hi Rob
If the user gives for this CC just for one month or period, it terminates, they are saying they want atleast for 1 period if not range of periods.I cant restrict selection criteria. is there I can do technically.
please advice.
Thanks
‎2006 Oct 12 9:17 PM
Well, you can remove the posting date from the selection screen and make the fiscal period a parameter instead of a select-option. (Make it mandatory.) This should help.
Rob
‎2006 Oct 12 9:19 PM
Also - if you SELECT * FROM BSEG, you should create an internal table with just the fields you need and select only those fields.
rob
‎2006 Oct 12 9:32 PM
Yes, I am selecting some fields from BSEG and same fields are present in internal table,
the problem is for just 1 period it is terminating, not able to proceed.
please let me know
thanks
‎2006 Oct 12 9:40 PM
OK - you can specify something on the selection screen like WHICH_GROUP (an integer). Then in the SELECT, You use the package size option.
If the user specifies group 1, just return the first package and exit; if group 2, select the first package and ignore it, then select the second package and exit; and so on.
Make the package size large enough so that it returns a reasonable amount of data, but not so large that you get this error.
Rob
‎2006 Oct 12 10:03 PM
can you explain in more detail, you mean that number corresponds to some selection criteria,
please explain.
Thanks
‎2006 Oct 13 11:38 PM
Can anyone let me know how to solve the problem.
Thanks
‎2006 Oct 14 2:54 PM
For any internal reference table that you know the number of rows, use the INITIAL SIZE (OCCURS N) option instead of OCCURS 0. This will stop SAP grabbing 8KB (16KB) of memory for the table when it only uses memory measured in Bytes.
If you are using embeded tables, (table within a line of another table) the above is VERY VERY important. Otherwise each row of the main table will be over 8KB in size.
If you use any tempory internal tables, that once used are never referenced again, use FREE to regain the memory. Data declared within a form is FREEd when the form is exited.
Make sure that the data that you are storing is all used. Do not declare the internal table of your stored BSEG data as "it_bseg type standard table of BSEG". declare a local type that has the fields that you use.
As you are using a logical DB, the technique of using a DO - ENDDO loop around the SELECT with Select upto N (1000) rows, is not going to be of much help. But you should know that it exists.
As a final suggestion look at EXTRACT datasets.
MattG.