Can you give us some more details? Where are you doing this? In a procedure or in km? whats is your source and target? ..
What I am doing basically I am customization a KM.In KM I am I have added a details drop constraint and write the below piece of code
ALTER TABLE <%=odiRef.getTable("L", "TARG_NAME", "A")%> DROP CONSTRAINT
<% odiRef.dropReferringFKs(); %>
After execution of the job it is showing the error.