1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
SET SERVEROUT ON
Declare
Cursor C1 is
select d.product_code,b.responsibility_key from FND_USER_RESP_GROUPS_ALL a,fnd_responsibility b,fnd_user c,fnd_application d
where a.user_id = c.user_id
and a.responsibility_id = b.responsibility_id
and b.application_id = d.application_id
and d.product_code !='OE'
and b.end_date > sysdate
and c.user_name ='SYSADMIN'; -- user you want to copy
v c1%rowtype;
BEGIN
for v in c1 loop
DBMS_OUTPUT.ENABLE(1000000);
DBMS_OUTPUT.PUT(' ' || 'Produit=' || v.product_code);
DBMS_OUTPUT.PUT(' ' || 'responsibilité=' ||v.responsibility_key);
DBMS_OUTPUT.NEW_LINE ;
end loop;
END ;
/ |