Skip to Content
1
Former Member
Jul 01, 2007 at 05:02 AM

Urgent - Check data exist

44 Views

Hi Everyone,

I having an upload file which contains following fields in internal table. I wanna to check the Functional Location in upload file whether is exist in system database. If that record does not exist......i want to display the name of functional location which does not found.

Below are the code....but i still not manage to check the existance of it. Please help to correct the code as i require it urgently. Appreciate ur help. Thanks.

<u><b>Internal Table:</b></u>

DATA : BEGIN OF i_input OCCURS 0,

tplnr LIKE iflo-tplnr, "Functional Location

dokar LIKE draw-dokar, "Document Type

doknr LIKE draw-doknr, "Document

doktl LIKE draw-doktl, "Document Part

dokvr LIKE draw-dokvr, "Document Version

END OF i_input.

data: lwa_input like i_input,

lv_tplnr like iflot-tplnr.

loop at i_input into lwa_input.

select single

tplnr

into lv_tplnr

from iflot

where tplnr = lwa_input-tplnr.

if sy-subrc <> 0 and lv_tplnr is initial.

write :/ 'Functional Location', lwa_input-tplnr, 'Does Not exist'.

else.

write:/ 'records found'.

endif.

clear: lwa_input, lv_tplnr.

endloop.