Skip to Content
0
Former Member
Jun 16, 2006 at 01:53 PM

Performance issue

20 Views

Hi Guys,

Here are the two select statements one is sale order and other is purchase order.these two statements are taking lot of time to get execute.can any one suggest how to increase performance.

SELECT VBELN

AUDAT

AUART

VSBED

VDATU

BSTNK

KUNNR

INTO TABLE IT_VBAK

FROM VBAK

WHERE VBELN IN PVBELN

AND ERDAT IN PERDAT

AND AUART IN PLFART

AND VKORG IN PVKORG

AND KUNNR IN PKUNAG.

  • AND AUART <> 'AG'.

IF SY-SUBRC = 0.

SORT IT_VBAK BY VBELN.

DELETE IT_VBAK WHERE AUART = 'AG'.

ENDIF.

CLEAR IT_EKKO.

REFRESH IT_EKKO.

SELECT EBELN

RESWK

BEDAT

INTO TABLE IT_EKKO

FROM EKKO

WHERE EBELN IN PVBELN

AND BSTYP = 'F'

AND BSART = 'NB'

AND BEDAT IN PERDAT

AND RESWK IN PVSTEL.

IF NOT IT_EKKO[] IS INITIAL.

PERFORM M_GET_EKPO_DATA.

ENDIF.

Thanks

Vikranth Khimavath