Application Development 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: 

Report occupying 2 GB memory space

Former Member
0 Kudos

Hi All,

I am running a custom report,( Book Journal)displays all journal entries for given range of company codes, depending on the FY, there are different selection criteria, like BA range , posting date range, etc, the issue is

when i run this report for a particular company code, the report is terminating and going to dump, the error is TSV_TNEW_PAGE_ALLOC_FAILED which means the report has used up the total allowable 2 GIG of memory availible to SAP R/3 application, the reason it is happening is because of huge amount of data is collected. if selection criteria is utilized to maximum extent, there would be no issue,data would be reduced.

the isssue is only when company code and FY and Fiscal period are given in Selection criteria,

Is there anything we could make changes in the report?

Is anyone familiar with this kind of error and has solved it, please advice me on how to proceed further.

Thanks

Chary

10 REPLIES 10

Former Member
0 Kudos

Hi Phani,

A temporoary solution will be to allocate more memory in the application server. You can contact your BASIS people for this. There is a parameter to increase the memory allcation.

Since the issue is wid the amount of data, in most of the cases we simply suggest the user to restrict the search criteria becasue it may not be feasible to increase memory allocation.

regards,

Sumeet Mishra

Former Member
0 Kudos

Hi Phani,

1. Common sense suggests

that

if the data / information

is so HUGE,

there is no point in display such VAST

informatino to the user

even which,

he won't be able to make sense of in one shot.

2. BETTER to RESTRICT THE

FILTER CRITERIA to MORE Fields !

regards,

amit m.

Former Member
0 Kudos

Hi Sumeet and Amit,

Thanks for your suggestions,

I Have contacted Basis people , they have already increased the allowable space from 1 GB to 2GB , there is no way there are going to increase again, because data keeps on increasing in future and can't increase everytime they get this kind of issue.

User is not at all cared about common sense,

Is there anything we can do in code, so that report occupies less space, and put an end to this issue.

Thanks

Chary

Former Member
0 Kudos

Hi,

Select data in form of packets size or use

extracts .

Regards

Amole

Former Member
0 Kudos

Can U please paste the code.(might not be the whole code)

Just look at the SQL trace for the program , U'll get

which select's are taking max. time ,then U can optimize

the coding based on your requirement.

Former Member
0 Kudos

Hi ,

For extracts you can use following logic

INSERT ZCOXPRIHST-BUKRS

ZCOXPRIHST-BUDAT

ZCOXPRIHST-COUNTER

ZCOXPRIHST-LINNO

INTO HEADER.

SELECT * FROM ZCOXPRIHST

WHERE BUKRS IN S_BUKRS

AND BUDAT IN S_BUDAT.

EXTRACT HEADER.

ENDSELECT.

loop.

write ZCOXPRIHST-BUKRS

ZCOXPRIHST-BUDAT

ZCOXPRIHST-COUNTER

ZCOXPRIHST-LINNO

endloop.

Former Member
0 Kudos

Hi All,

Thanks again!.

I am looking at the Extract statement just got a hint from seniors and so from you guys also,

Can you please let me know how to use Extract statement depending on the following code

Here is the code:

start-of-selection.

  • BKPF EVENT ********************************************************

get bkpf.

check bkpf-monat in s_monat.

  • BSEG EVENT ********************************************************

get bseg.

if not s_gsber is initial.

check bseg-gsber in s_gsber.

endif.

  • generate_table_selected_data

clear found_document.

move-corresponding bseg to found_document.

move-corresponding bkpf to found_document.

  • check bkpf-stblg is initial.

if bkpf-stblg is initial.

found_document-storno = '+' .

else.

found_document-storno = '-' .

endif.

if bseg-koart = 'D'

or bseg-koart = 'K' .

perform determine_ruc_number using bseg

changing found_document.

endif.

  • determine wether the amount has been posted on the *credit or debit area

if bseg-shkzg = 'S'.

found_document-amount_s = bseg-dmbtr.

else.

found_document-amount_h = bseg-dmbtr.

endif.

  • determine business area description

perform determine_business_area_info using bseg

changing found_document.

*refresh output_table_temp.

  • determine textsegment of the G/L account

read table textsegment_hkont

with key hkont = bseg-hkont into wa_text.

if sy-subrc >= 4.

read table company_codes with key

bukrs = bseg-bukrs into wa_cc.

select single * from skat where spras = wa_cc-spras

and ktopl = wa_cc-ktopl

and saknr = bseg-hkont.

wa_text-hkont = bseg-hkont.

wa_text-txt20 = skat-txt20.

append wa_text to textsegment_hkont.

endif.

found_document-txt20 = wa_text-txt20.

& Add Text for alternative account

if not bseg-lokkt is initial.

clear wa_text.

perform get_acct_text using bseg-lokkt

changing wa_text.

found_document-lokkt_txt = wa_text-txt20.

endif.

append found_document to output_table_temp.

  • append found_document to output_table.

*********************************************************************

  • END OF SELECTION **************************************************

*********************************************************************

end-of-selection.

  • sort output_table by budat belnr

  • gsber

  • hkont.

sort output_table_temp by budat

belnr

gsber

hkont.

loop at output_table_temp.

clear vzaehl_c.

at new belnr.

vzaehl = vzaehl + 1.

unpack vzaehl to vzaehl_c.

output_table-znummu = vzaehl_c.

endat.

move-corresponding output_table_temp to output_table.

*delete output_table_temp .

append output_table.

clear output_table.

endloop.

Logical database is used, Data is transfered to structure found_document after some validations it is transfered to output_table_temp after adding sequence no for all with same document no, it is transfered ot final internal table output_table, which is sent o ALV.

please suggest.

Thanks

Chary

Former Member
0 Kudos

Hi ALL,

Please suggest your opinions

Thanks

Chary

Former Member
0 Kudos

just to bring my issue on top of the list.

Thanks

Chary.

0 Kudos

Hi Phani,

1. from your program, i

could not make out

WHAT ACTUALLY is printed out

and what DATA is ur fetching

2. Anyway,

the problem may be because

MUCH data is fetched

in one shot.

3. In such cases,

if possible,

use the concept

of detail list

ie. Basic List then on double clicking,

related detail list.

regards,

amit m.