Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

generating error - memory to low

Former Member
0 Likes
479

Hi all

plz check the followig code this i m using for finding the trial balance in FI module..

but this code is generating error - memory to low ,

and generating short dump at run time with msg the memory space is not enough for an internal table

we have 1 GB RAM ...

can anyone suggest some tips for fine tuning of this code

"

start-of-selection.

select * from bkpf into table itab_bkpf

where bukrs = p_bukrs

and gjahr = p_gjahr

and budat in s_budat.

if sy-subrc = 0.

select * from bseg into table itab_bseg

for all entries in itab_bkpf

where bukrs = p_bukrs

and belnr = itab_bkpf-belnr

and gjahr = p_gjahr

and gsber = p_gsber

and hkont in s_hkont.

"

thanks and regards

jitendra

4 REPLIES 4
Read only

Former Member
0 Likes
435

u used a bseg table( cluster table) it has huge amount of data......

declare internal table as <b>occurs 0</b>.

only selet those field which are required.

start-of-selection.

select <b>*</b> from bkpf into table itab_bkpf

where bukrs = p_bukrs

and gjahr = p_gjahr

and budat in s_budat.

<b>if not itab_bkpf[] is initial.</b>

select<b> *</b> from bseg into table itab_bseg

for all entries in itab_bkpf

where bukrs = p_bukrs

and belnr = itab_bkpf-belnr

and gjahr = p_gjahr

and gsber = p_gsber

and hkont in s_hkont.

endif.

"

Read only

Former Member
0 Likes
435

one tip :

REPLACE SELECT * WITH the fields what you exactly need

regards

srikanth

Read only

Former Member
0 Likes
435

hii Jitendra ,

You get this warning whenever your program consumes more memory. Try to reduce the memory by removing unnecessary fields form internal tables and selecting only required fields .

So one way would be trying to reduce memory consumption.

Also after execution the task is not freed on application server, the memory stays reserved for your GUI-session

Other users can't use this process any longer and memory is in use .

A simple commit work before displaying the list can help .

Regards

Naresh

Read only

Former Member
0 Likes
435

Hi nema ,

trial balance report should @ G/L Account or Business Level not @ Account Document level.

try to make use of this table GLPC*

Regards

prabhu