Skip to Content
0
Former Member
Jan 11, 2008 at 07:48 AM

Performance tunning required..

30 Views

Hi all,

please do tell me what is the best alternative of writing the below select queries.

r_matnr is a range having 30,000 entries in it.

R_LGNUM is a range having 10,000 entries in it.

1) DELETE FROM s031 WHERE werks = p_werks AND matnr IN r_matnr.

2)TABLES: LTAP.

select distinct tanum from LTAP into ltap-tanum

WHERE LGNUM IN R_LGNUM AND

MATNR IN R_MATNR.

3)

select * from ekko where ekorg in r_ekorg.

select single * from ekpo where ebeln = ekko-ebeln

and matnr in r_matnr.

check sy-subrc eq 0.

add 1 to count_pu.

check p_test ne 'X'.

PERFORM DELETE_PURCHASING_DOCS.

PERFORM COMMIT_CHECK USING count_pu.

endselect.