I have a requirement to do an extract program for material determination from tables KOTD001, KONDD, and KONDPP. I need to download the records to an internal table and write it to a text file. The catch here is to check if the records in this internal table are good by cross checking them against table KOTG927. e.g. If the material number in KOTD001 is listed in KOTG927, then it should not be extracted. Another condition is to check whether if the material has been marked for deletion and not extract it. Can anyone help me with how to achieve this with some skeleton code.