Application Development and Automation 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: 
Read only

perff

Former Member
0 Likes
1,330

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

15 REPLIES 15
Read only

Former Member
0 Likes
1,295

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

Read only

0 Likes
1,295

can u plz tell me how can i use internal table for those queries.

i think i used internal table there i_chgbom

Read only

0 Likes
1,295

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

Read only

0 Likes
1,295

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.

Read only

0 Likes
1,295

hi

if i use that it is not reading any data.

Read only

0 Likes
1,295

Will you tell me ,what is your requirment?

Read only

0 Likes
1,295

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)

Read only

Former Member
0 Likes
1,295

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.

Read only

0 Likes
1,295

are there any alternative tables other than cdhdr and cdpos

to get the same data.

Read only

0 Likes
1,295

no

Read only

0 Likes
1,295

if i use the same query u sent it is not giving output

Read only

Former Member
0 Likes
1,295

> 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

Read only

0 Likes
1,295

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

Read only

0 Likes
1,295

>

> 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.

Read only

ThomasZloch
Active Contributor
0 Likes
1,295

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