‎2009 Jan 28 1:01 PM
Hello All,
i am using a select statement on table ADRS.
Since huge amount of data is fetched into the internal table the report is giving me a dump.
Other then declaring the internal table as Hash table is there any other way out.
Regards,
Vimal Khare
Use meaningful Title
Edited by: Vijay Babu Dudla on Jan 28, 2009 10:55 PM
‎2009 Jan 28 1:03 PM
Try to narrow your search by using 'WHERE' ..............
‎2009 Jan 28 1:06 PM
Hi,
I have narrowed the search as much as possible but still it gives me a dump.
Regards,
Vimal Khare
‎2009 Jan 28 1:08 PM
HI,
Y do u want to get all the data using select.
Better serch for function module to get data from ADRS.
It will solve u r problem otherwise use where condition.It is not good to get all the data from the table using select.Go with FM then u wont get any pblm.
Thanks
‎2009 Jan 28 1:15 PM
Hi,
I think the problem here is with the internal table.
This program runs in the background. So even if i use the select statement ideally there should not be any problem.
I believe the error is due to the overflow of the internal table.
So without changing my internal table as Hash table is there any other way out.
Regards,
Vimal Khare
‎2009 Jan 28 4:58 PM
Hi Vimal,
Use SELECT .. ENDSELECT. Do the processing between SELECT .. ENDSELECT.
Otherwise check with your BASIS team, if they can increase your session memory.
Mubeen
‎2009 Jan 28 1:14 PM
hi,
yes u can use CURSOR statements (open cursor and close cursor)
sample code attached below
OPEN CURSOR WITH HOLD d_cursor FOR
SELECT frdlt
srdlt
mrslofd
qmnum
vbeln
bukrs
werks
spart
vhvin
dbm_licext
vhcex
matnr
mcodecs
kunnr
frlsdt
srlsdt
frssdt
srssdt
fresdt
sresdt
mrslofd
vbeln_new
FROM zdm_mrs_mast
WHERE ( srdlt IN s_frdlt OR
frdlt IN s_frdlt ) AND
mrslofd IN it_searchcrit1 AND
spart IN s_spart AND
werks IN s_werks AND
mcodecs IN s_mcode.
ENDIF.
DO.
FETCH NEXT CURSOR d_cursor
INTO CORRESPONDING FIELDS OF TABLE it_final_c
PACKAGE SIZE 4000.
IF sy-subrc = 0.
SELECT vhvin
zzdrnam
zzusad1
zzusad2
zzuspob
zzuspoc
zzustel
zzusfax
zzemlid
zzusprs
zzusgsm
zzserdt
zzserdtp
zzserkms
zzvioem
iobjguid
FROM VLCVEHICLE
INTO CORRESPONDING FIELDS OF TABLE et_vlcdiavehi
for ALL ENTRIES IN it_final_c
WHERE vhvin = it_final_c-vhvin.
*MIN003-
APPEND LINES OF et_vlcdiavehi TO it_vlcdiavehi.
APPEND LINES OF it_final_c TO it_final.
CLEAR: wa_final_c,wa_searchcrit.
REFRESH: it_final_c,it_searchcrit,et_vlcdiavehi.
ELSE.
CLOSE CURSOR d_cursor.
EXIT.
ENDIF.
ENDDO.
‎2009 Jan 28 1:17 PM
Use SELECT/ENDSELECT. The performance difference is not large, and you save a lot of memory.
‎2009 Jan 28 1:20 PM
Hi
Restrict the select condition using where clause.Try to pass all the primary key in the where condition.If it is not possible to pass all the primary key try to pass the maxm primary key.
‎2009 Jan 28 1:25 PM
Hi,
Please try to pass the primary key.
If you are not in position to pass the primary key, please try to create an index with the fields you are passing in the input.
‎2009 Jan 28 1:26 PM
Hi Vimal,
Use Package size in select statement
Select * * *
from ADRC
into table I_ADRC
package size 10000 (may varies).
your processing code .................
endselect.
Kiran
‎2009 Jan 29 4:03 AM
Hi Vimal,
You should try narrowing your SELECT Query with WHERE Condition and
try to put all the primary keys in your SELECT clause it will help in the
SELECT Queries performance.
And after putting it into your internal table,then apply binary search on that internal table,
to manipulate with the data.
Hope it helps you
Regrds
Mansi