Skip to Content
0
Former Member
May 10, 2010 at 07:33 AM

To improve the performence of SQL query

15 Views

Hai friends

I have a query in the customer program like this

SELECT VBELN BSTKD BSTDK FROM VBKD INTO TABLE IT_VBKD

FOR ALL ENTRIES IN IT_VBAK1

WHERE VBELN = IT_VBAK1-VBELN.

i thought that in above query "FOR ALL ENTRIES" is burden for the database i changed the query like this

SELECT VBELN

BSTKD

BSTDK

FROM VBKD CLIENT SPECIFIED INTO TABLE IT_VBKD

WHERE MANDT IN ( SELECT MANDT FROM T000 WHERE MANDT = SY-MANDT )

AND VBELN = IT_VBAK1-VBELN.

but while writing the above query i am not getting the data. Kindly correct my above ( 2nd one ) query or advise me in the (1st query) how to avoid "FOR ALL ENTIRES " by writeing subquery. Please help me.

regards

Sridhar.G