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: 

Performance issue .. very long time

Former Member
0 Kudos

Hi,

This select statement is bee running since more than a day.. please help.

select matnr

BDTER

BDMNG

ebeln

ebelp

from resb

into table i_resb

for all entries in i_ekpo

where ebeln = i_ekpo-ebeln

and ebelp = i_ekpo-ebelp.

i_ekpo has all subcon orders (pstyp = 3)

Help to correct the stmnt.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

first get RSNUM of PO from EKET then go for RESB.

Regards

Prabhu

14 REPLIES 14

Former Member
0 Kudos

this code is looking ok...i thinkproblem is anywhere else....

<b>if not i_ekpo[] is initial</b>. 
select matnr
BDTER
BDMNG
ebeln
ebelp
from resb
into table i_resb
for all entries in i_ekpo
where ebeln = i_ekpo-ebeln
and ebelp = i_ekpo-ebelp.
endif.

0 Kudos

I have included that and also i_ekpo has values

0 Kudos

Hi...Kantheri..

Try to use primary keys (RSNUM,RSPOS,RSART) in your SELECT query and then run it.

Thank You

0 Kudos

Don't use for all entries. For tables like RESB:

sort i_ekpo by ebeln ebelp.

delete adjacent duplicates from i_ekpo comparing ebeln ebelp.

loop at i_ekpo.

  • your select statement

  • without "for all entries" clause

endloop.

0 Kudos

Subhash, how do i get those fields.

RSDB is empty.

Former Member
0 Kudos

<b>IF <b>i_ekpo[]</b> IS NOT INITIAL.

select matnr

BDTER

BDMNG

ebeln

ebelp

from resb

into table i_resb

for all entries in <b>i_ekpo</b>

where ebeln = i_ekpo-ebeln

and ebelp = i_ekpo-ebelp.

ENDIF.</b>

Former Member
0 Kudos

Hellom

Before going the for all entires

are you doing all the checks..

IF not i_ekpo[] is initial.

sort i_ekpo.

Delete adjacent duplicates from i_ekpo comparing <field name>.

select matnr

BDTER

BDMNG

ebeln

ebelp

from resb

into table i_resb

for all entries in i_ekpo

where ebeln = i_ekpo-ebeln

and ebelp = i_ekpo-ebelp.

Endif.

Create and index for ebelp in resb.

Thanks,

Krishnakumar

Message was edited by: Krishnakumar

0 Kudos

how to create an index?

Former Member
0 Kudos

Hi,

Use all the primary keys of RESB in your where condition, further how many entries are there in ur internal table i_ekpo.

If you can restrict the entries in i_ekpo, if you can narrow down on ur selection criteria for values from EKPO --- it should help you a lot.

Reward if helpful.

Regards

Former Member
0 Kudos

Hi,

Did u try my suggestion...

Regards

0 Kudos

Hi Zapper,

How do i get all the primary keys.

Ekpo doesnot have it.

and RSDB is not updated for subcon po's.

Please help

0 Kudos

Thanks for all your help.

Could anyone help me create an index in RESB for ebelen and ebelp. The steps involved.

I hope this would help.

0 Kudos

Hallo, this is how to create an index:

Transaction SE11.

select database table RESB --> show it.

goto indizes (Strg + F5) and create a new one with the name you want (like Z01)

type in short description and the needed fields (ebelen and ebelp) and select "non-unique-index" and "index on all database systems" if this is right for you.

then aktivate the index.

afterwards goto SE14 and select the Table RESB in edit mode.

goto indizes and select the created index (Z01)

then choose "create database index" and perform it in background modus (!?!) to avoid short dumps.

after it is created on the database you can check the database in SE14 by choosing "check" --> if everything is ok --> then your finished.

i how this helps.

sorry for my english but translating the technical expressions is somehow hard...

bye from lake constance, germany

m.lindenmayer

Former Member
0 Kudos

first get RSNUM of PO from EKET then go for RESB.

Regards

Prabhu