Skip to Content
0
Former Member
Aug 03, 2009 at 07:29 AM

long time to fetch data from database view vbakuk

43 Views

All,

How can i optmize the below select statement?

r_vbeln-sign = 'I'.

r_vbeln-option = 'BT'.

r_vbeln-low = '0000000000'.

r_vbeln-high = '9999999999'.

APPEND r_vbeln.

IF NOT it_custmat[] IS INITIAL.

SELECT vbeln kunnr vkorg erdat vtweg spart

FROM vbakuk

INTO TABLE it_order

FOR ALL ENTRIES IN it_custmat

WHERE vbeln IN r_vbeln

AND erdat NOT IN s_date

AND vkorg = it_custmat-vkorg

AND vtweg = it_custmat-vtweg

AND spart = it_custmat-spart

AND kunnr = it_custmat-kunnr

AND gbstk EQ 'C'.

ENDIF.

Thanks,