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

RESB-Fetching

Former Member
0 Likes
893

How to improve the performance while fetching data from RESB table

7 REPLIES 7
Read only

Former Member
0 Likes
835

hi,

1. Use all the primary key fields in the where condition of your select statement.

2. Do not use joins.

3. Select only the required entries ... rather than selecting all the entries ...

4. Make use of secondary indexes explicitly when using non key fields in your select statements..

Regards,

Santosh

Read only

0 Likes
835

hi santose,

thank u for ur response.

i have tried but till it takes long time....

Read only

0 Likes
835

Hi Friend,

Can you Give me the Select Statement That u r using.

Regards,

Suresh Linga.

Read only

0 Likes
835

hi,

s_matnr ,s_werks are Select-option variables.

IT_RESB is the intermediate table.

SELECT MATNR WERKS BDTER

INTO TABLE IT_RESB

FROM RESB

WHERE matnr IN s_matnr AND

werks IN s_werks .

please give me the correct solution...

Regards

Nihtiyanandam.S

Edited by: Nithiyanandam Somasundaram on May 1, 2008 12:43 PM

Read only

0 Likes
835

hi,

few suggestions:

1) Check if there is a secondary index on matnr and werks. Probably it will be there.

2) Use the following code to fetch data.

DATA: s_cursor TYPE cursor.

OPEN CURSOR WITH HOLD s_cursor FOR

SELECT MATNR WERKS BDTER

FROM RESB

WHERE matnr IN s_matnr AND

werks IN s_werks .

DO.

FETCH NEXT CURSOR s_cursor

APPENDING

TABLE IT_RESB

PACKAGE SIZE '2000'.

IF sy-subrc <> 0.

CLOSE CURSOR s_cursor.

EXIT.

ENDIF.

ENDDO.

Read only

0 Likes
835

Hi,

can u tell me

what is the maximum package size .because in resb table having lot of data....

Read only

0 Likes
835

Hi ~

One small addition - You might be already checking it in the code but just wanted to double check with you.

Check the range s_matnr is not initial before the RESB select query. Otherwise it fecthes all the data from RESB table.

Thanks,

- Srikanth.