I recently came across the following which allows you to get ddl without a schema name.
This looks a lot simpler than any other method I've seen so far, although it is not included in any Oracle documentation. I found this in the SQL Developer statement log, which generates ddl without a schema name.
DBMS_METADATA.SET_TRANSFORM_PARAM(dbms_metadata.SESSION_TRANSFORM, 'EMIT_SCHEMA', false);
You do not need to access descriptors or anything nasty just EXEC above before calling DBMS_METADATA.GET_DDL
David Norris-Hill
source share