Answer
Replace #USER_ID# with a direct call to Fnd_Session_API.Get_Fnd_User() instead — event substitution variables like #USER_ID# work in simpler condition contexts, but once the logic gets more complex (for example, wrapped inside additional PL/SQL structure), the substitution can fail to resolve correctly and instead leaves behind a broken reference that the compiler can't resolve. Calling Fnd_Session_API.Get_Fnd_User() directly returns the current session's user ID reliably in PL/SQL, avoiding the substitution-related compilation error entirely.