Oracle's program fnd_message code contents is blank until I comment out the lines in the purge procedure as shown below. If I paste the procedure in a blank package without the lines commented, the code contents is blank as well. I took out most of the code trying to make the example simpler.
Code:
procedure PURGE is
L_TO_DATE date;
cursor del_curs(l_till_date date) is
select rowid from FND_LOG_MESSAGES WHERE TIMESTAMP <= l_till_date;
begin
open del_curs(L_TO_DATE);
LOOP
FETCH del_curs BULK COLLECT INTO L_ROWID LIMIT 1000;
IF L_ROWID.COUNT > 0 THEN
-- FORALL i IN 1 .. L_ROWID.COUNT
-- EXECUTE IMMEDIATE 'delete /*+ PARALLEL(T) ROWID(T) */ FND_LOG_MESSAGES T where T.ROWID = :x' USING L_ROWID(i);
END IF;
EXIT WHEN del_curs%NOTFOUND;
END LOOP;
CLOSE del_curs;
end PURGE;