‎2008 Aug 25 6:16 AM
Hi experts plz help me soon iam working on performance issue, i hav 2 queries consuming much time. so i used package in that queries but when i execute in devlopment system they r executing but testing system they are giving error.these r the queries i wrote
DATA: i_chgbom_t LIKE STANDARD TABLE OF i_chgbom.
SELECT objectclas objectid changenr
username udate utime tcode
INTO TABLE i_chgbom_t
PACKAGE SIZE 10000 FROM cdhdr
WHERE objectclas = 'STUE'
AND tcode = 'CS02'
AND udate IN s_aedat.
APPEND LINES OF i_chgbom_t TO i_chgbom.
REFRESH i_chgbom_t.
ENDSELECT.
IF sy-subrc = 0.
SORT i_chgbom BY objectid ASCENDING udate DESCENDING utime DESCENDING.
ENDIF.
DATA: i_chgbom1_t LIKE STANDARD TABLE OF i_chgbom1.
IF NOT i_chgbom[] IS INITIAL.
SELECT * FROM cdpos INTO TABLE i_chgbom1_t
PACKAGE SIZE 10000
FOR ALL ENTRIES IN i_chgbom
WHERE objectclas EQ i_chgbom-objectclas
AND objectid EQ i_chgbom-objectid
AND changenr EQ i_chgbom-changenr.
APPEND LINES OF i_chgbom1_t TO i_chgbom1.
REFRESH i_chgbom1_t.
ENDSELECT.
ENDIF.
IF sy-subrc = 0.
SORT i_chgbom1 BY objectid ASCENDING tabkey ASCENDING changenr DESCENDING.
ENDIF.
error is no storage space available to extend internal table
‎2008 Aug 25 6:31 AM
Hi,
Here you are using 2 nested select queries.
Instead use internal table for the first and FOR ALL ENTRIES of the 1st table in the 2nd query.
Regards,
Anirban
‎2008 Aug 25 6:37 AM
can u plz tell me how can i use internal table for those queries.
i think i used internal table there i_chgbom
‎2008 Aug 25 6:52 AM
Storage location: "Session memory"
Row width: 1548
Number of rows: 1150000
Allocated rows: 1150000
Newly requested rows: 10000 (in 1250 blocks)
this is the error iam getting there
‎2008 Aug 25 6:54 AM
hi,
try this
DATA: i_chgbom_t LIKE STANDARD TABLE OF i_chgbom.
SELECT objectclas
objectid
changenr
username
udate
utime
tcode
INTO TABLE i_chgbom
PACKAGE SIZE 10000 FROM cdhdr
WHERE objectclas = 'STUE'
AND tcode = 'CS02'
AND udate IN s_aedat.
REFRESH i_chgbom_t.
IF sy-subrc = 0.
SORT i_chgbom BY objectid ASCENDING udate DESCENDING utime DESCENDING.
ENDIF.
IF NOT i_chgbom[] IS INITIAL.
SELECT * FROM cdpos
INTO TABLE i_chgbom1
PACKAGE SIZE 10000
FOR ALL ENTRIES IN i_chgbom
WHERE objectclas EQ i_chgbom-objectclas
AND objectid EQ i_chgbom-objectid
AND changenr EQ i_chgbom-changenr.
ENDIF.
‎2008 Aug 25 7:06 AM
‎2008 Aug 25 7:09 AM
‎2008 Aug 25 7:15 AM
these queries are consuming much time. i need to increase the performance.
they r having nearly 3 lakhs records.
to increase the performance i used package.
but iam getting the error in test system.
this is the error in test system.
Storage location: "Session memory"
Row width: 1548
Number of rows: 1150000
Allocated rows: 1150000
Newly requested rows: 10000 (in 1250 blocks)
‎2008 Aug 25 7:23 AM
check it
DATA: i_chgbom_t LIKE STANDARD TABLE OF i_chgbom.
SELECT objectclas <--- put debugger and check cotain of i_chgbom
objectid
changenr
username
udate
utime
tcode
FROM cdhdr
INTO TABLE i_chgbom
WHERE objectclas = 'STUE'
AND tcode = 'CS02'
AND udate IN s_aedat.
IF sy-subrc = 0.
SORT i_chgbom BY objectid ASCENDING udate DESCENDING utime DESCENDING.
ENDIF.
IF NOT i_chgbom[] IS INITIAL.
SELECT * FROM cdpos <--- instead of * use only the spefic fields you required
INTO TABLE i_chgbom1
FOR ALL ENTRIES IN i_chgbom
WHERE objectclas EQ i_chgbom-objectclas
AND objectid EQ i_chgbom-objectid
AND changenr EQ i_chgbom-changenr.
‎2008 Aug 25 7:32 AM
are there any alternative tables other than cdhdr and cdpos
to get the same data.
‎2008 Aug 25 7:33 AM
‎2008 Aug 25 7:34 AM
if i use the same query u sent it is not giving output
‎2008 Aug 25 9:25 AM
> are there any alternative tables other than cdhdr and cdpos
What information is in these tables? What are the keys of both tables,
how many records are in the tables in your system.
Why don't you use a JOIN? Are you looking for the slowest solution or the fastest?
Siegfried
‎2008 Aug 25 9:41 AM
i need the query to be executed fastly, how can i use join in that queries, it contains objclass, objid, tabkey,udate,utime and old value
‎2008 Aug 25 4:46 PM
>
> i need ...
You need to read "the rules" at the top of the forum page before you do anything else here...
Your various other threads on the same topic will be locked / deleted.
‎2008 Aug 25 9:32 AM
This is now the third time you are asking essentially the same stuff without closing older threads, also still not using a meaningful subject. Did you ever evaluate the previous answers given?
/thread/1004737 [original link is broken]
(includes link to first thread)
I can only warn everybody from investing any more time in trying to help you.
Thomas