‎2006 Jul 25 12:17 PM
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
‎2006 Jul 25 12:20 PM
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.
"
‎2006 Jul 25 12:25 PM
one tip :
REPLACE SELECT * WITH the fields what you exactly need
regards
srikanth
‎2006 Jul 25 12:47 PM
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
‎2006 Jul 25 12:58 PM
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