Skip to Content
0
Former Member
Dec 06, 2006 at 04:42 PM

change in user exit for DP91

183 Views

hi all

i want to delet records from t_covp (internal table) where blenr does not exit in ADO1DLI, if it exist , need to check dlinr of AD01DLI and AD01DLI, if it doesnt match, delete it from T_covp, it it matches the records will stay in >T_covp.

can any body guide me how to write code for that

I have written it but there r performance issues...

loop at itab_covp.

select dlinr belnr from ad01dli INTO itab_AD01DLI where belnr <> itab_covp-belnr .

DELETE t_covp where belnr = itab_AD01DLI-belnr.

endselect.

SELECT Xdlinr Xbelnr Y~dopen

INTO (dlinr, belnr, dopen)

FROM AD01DLI as X INNER JOIN AD01DLIEF AS Y

ON XDLINR <> Ydlinr

WHERE X~belnr = itab_covp-belnr

and Y~dopen <> ''.

delete t_covp where belnr = belnr.

endselect.

endloop.

can we make it more specific using only one select query

rgds

anup