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

bad performance

Former Member
0 Likes
567

hi,

am getting very very bad performance with the below select..plz suggest better one

SELECT SINGLE KUNNR FROM BSAD INTO FKUNNR

WHERE BUKRS = FBUKRS

AND KUNNR NE SPACE

AND GJAHR = FGJAHR

AND BELNR = FBELNR

AND BUDAT IN BUDAT.

4 REPLIES 4
Read only

Former Member
0 Likes
542

Hi,

There is not much you can do with this query.

But can't you use another table as BSAD has very huge amount of data.

Regards,

Atish

Read only

Former Member
0 Likes
542

Hi

Instead of using BSAD table you can use another table BSEG since you

know the field BUKRS, BELNR and GJAHR.

SELECT SINGLE KUNNR FROM BSEG INTO FKUNNR

WHERE BUKRS = FBUKRS

AND BELNR = FBELNR

AND GJAHR = FGJAHR

AND KOART EQ 'D'. "D IS CUSTOMER ENTRY

Regards

Harish

Read only

Former Member
0 Likes
542

Hello Tuborg,

It is also important to know which all values do u know among the 4 passed to select because if FBUKRS,FGJAHR & FBELNR is know then u can directly access BSEG and get the value. However they are not know then u will have to access the BSAD table.

Read only

Former Member
0 Likes
542

Hi Tuborg,

If you have all the key fields before the selection, then add those key fields also, which can improve performance.

Thanks and regards

Antony thomas