on 04-06-2007 11:27 AM
Hi, i have a report and
User is trying to run report and she runs this every month, when she goes into sm37 and then it cancels, and then she tries to run it in foreground and now she is getting an error message that the system memory is too low.
Basis consultant looked at the report and explained the error in this way
The reason for the job cancellation is, because the ABAP report is trying to execute is fetching all the of data at once from these two tables .
COBRB, ANLC ( Asset Tables)
The amount of data these two tables contains is as below :
Table Name Amount of Data
COBRB 2,388,963
ANLC 6,239,012
The Statement of the ABAP report where this selection is performed in shown below
SELECT * FROM COBRB
INTO TABLE L_COBRB
WHERE OBJNR = F_OBJNR
AND PERBZ = C_SETLEMENT_ANNUAL.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
and the other select statement is
LOOP AT L_COBRB.
CLEAR: F_H_COST.
SELECT SINGLE * FROM ANLC
INTO L_ANLC
WHERE BUKRS = F_BUKRS AND
ANLN1 = L_COBRB-ANLN1 AND
ANLN2 = L_COBRB-ANLN2 AND
GJAHR = SY-DATUM(4) AND
AFABE = C_DEP_AREA_STD AND
ZUJHR = '0000' AND
ZUCOD = '0000'.
IF SY-SUBRC = 0.
CALL FUNCTION 'FI_AA_VALUES_CALCULATE'
EXPORTING
I_ANLC = L_ANLC
IMPORTING
E_ANLCV = L_ANLCV.
F_H_COST = L_ANLCV-BCHWRT_LFD.
ENDIF.
So while it is trying to select all the data's from these two tables,
the system is not able to allocate enough buffer memory to allocate all the table data's.
The system parameter is already configured to hold more data in its buffer,
but the selection data is much more than what is allocated to the system.
So you need to fine tune your SQL Code in the ABAP report ZAROP028 in order
to avoid this error.
SO, CAN ANYONE PLZ TELL ,,HOW I CAN TUNE THOSE TWO SELECT STATEMENTS ?
Its expensive call from what I see from your select statent and loop
Specify the fields needed in the select statement into a table.
As for the loop.
select anlc for all entries in the internal tables/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if we look at query, it too expensive as u have put * for selection. which will select everything in the tables.
So better u got for specifying the to and from date in the query, so that with in that p[period of time u can select all from the required tables. If u select the to and from date then u may need to run the report twice, depending on the data it fetches.
Orelse u can also go for selection in the Alphabetical order say from A* to L* in 1st run and M* to Z* in 2nd run for the tables.
Whichever logic u want u apply, But make sure u collect the data in small chunks.
Regards,
Ravi
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.