2008 May 06 4:32 PM
Hi..
I have the following select query.
SELECT matnr werks lgort labst insme einme speme
FROM mard
bypassing buffer
into table it_collect_ln
FOR ALL ENTRIES IN it_data
WHERE matnr = it_data-matnr
AND werks = it_data-werks
AND lgort IN s_lgort
AND ( labst GT 0
OR insme GT 0
OR einme GT 0
OR speme GT 0 ).it_data consists of records from MARA and MARC innerjoin.
The internal it_data which is sorted by Matnr and werks and has about 80 000 records in Dev System.
But in Quality and Production there may be more than 100 000 records.
When I run the report in the selection process I just run for 2000 to 4000 plants.
It comes out of the program and gives me a message Maximum Time Exceeded.
There is no much difference by using bypassing buffer.
Should I create a secondary index in MARD table on labst insme einme speme
Any suggestions would be appreciated.
Thanks,
Chaithanya
Points will be rewarded
2008 May 06 4:43 PM
hi,
Yes ask him to increase the SAP memory ....
Regards,
Santosh
Hi..
I have the following select query.
SELECT matnr werks lgort labst insme einme speme
FROM mard
bypassing buffer
into table it_collect_ln
FOR ALL ENTRIES IN it_data
WHERE matnr = it_data-matnr
AND werks = it_data-werks
AND lgort IN s_lgort
AND ( labst GT 0
OR insme GT 0
OR einme GT 0
OR speme GT 0 ).it_data consists of records from MARA and MARC innerjoin.
The internal it_data which is sorted by Matnr and werks and has about 80 000 records in Dev System.
But in Quality and Production there may be more than 100 000 records.
When I run the report in the selection process I just run for 2000 to 4000 plants.
It comes out of the program and gives me a message Maximum Time Exceeded.
There is no much difference by using bypassing buffer.
Should I create a secondary index in MARD table on labst insme einme speme
Any suggestions would be appreciated.
Thanks,
Chaithanya
Points will be rewarded
2008 May 06 4:34 PM
hi Chaitanya,
Contact your basis guy in increasing the memory. He can assist you on that.
Regards,
Santosh
2008 May 06 4:39 PM
Hi Santosh,
Thanks for your reply.
But when I use an inner join for MARC and MARA it gives those 80,000 records may be in 10 sec.
I have checked the total no of records in MARD it is 80,911
Why does it time out??
What should I mention exactly to the basis guy?? (increase in SAP Memory)
Thanks,
Chaithanya
2008 May 06 4:42 PM
hi,
In some cases, Join is better than for all entries...why dont u add MARD to ur first select.
if not, this is a hunch. try removing the OR conditions, and see if theres any improvement in the performance.
regards,
madhumitha
2008 May 06 4:50 PM
madhumitha's suggestion would be the first way to go, before talking to your basis administrator.
BTW: Don't think this has anything to do with memory, selection of the data just takes more time than allowed. You can however extend this maximum time, also via your basis administrator. However, most of the times they will tell you to change your selection, or change to whole report or whatever. Since changing this parameter will affect all reports, which in turn can have quite some impact on system.
Try removing the OR's the begin with, and maybe even the first AND ... GT 0. Later on, when data is in internal table, you can still remove these records.
Other option would be be to limit the number or plants, since 2000 - 4000 plants is quite a lot. This will take time one way or the other.
Good luck.
2008 May 06 5:56 PM
Hi Madhumitha,
Thanks for your reply. I have removed the OR Conditions. It started working out. Thanks.
Hi Micky Oestreich,
Thanks for your suggestions too. It worked out.
regards,
chaithanya,
Points have been awarded.
2008 May 06 4:43 PM
hi,
Yes ask him to increase the SAP memory ....
Regards,
Santosh
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |