I have 2 tables say
EMP_ID Table with fields ID and Name and i have EMP_PAY Table with 2 fields ID and Pay (In both the Tables my ID is Primary key)
In order to have entry with ID and Pay in EMP_PAY , i need to have an entry EMP_ID Table with ID and Name so i add check table EMP_ID to ID field in EMP_PAY table and it works fine when i try to create entries directly using SE 11
But i have written a small program using Modify Statement to insert a record in EMP_PAY with an ID that doesn't exist in EMP_ID ( From SE11 it gives me an error saying record doesn't exist in EMP_ID Table but with modify statement in abap program it creates and entry and returns SY-subrc eq 0 and SY-DBCNT = 1
I have 2 files that user uploads ,if he uploads the EMP_PAY file first it should update EMP_PAY table only if the the records exist in EMP_PAY and EMP_ID and do an insert if it ID exists in EMP_ID table and doesn't exist in EMP_PAY. To cover these 2 bases i have used Modify Statement but its not working as i intented.
I've an internal table that needs to Update EMP_PAY , is there any simple way to tell me what are rejected records because of no correponding entry in EMP_ID Table