With the following we can add multiple user name and multiple responsibilities through backend.

set define off;

declare

res_user_name           varchar2(100);

res_app_sn              varchar2(200);

res_respkey             varchar2(200);

res_sgkey               varchar2(200);

res_desc                varchar2(200);

res_name                varchar2(200);

cursor usrname is select user_name from fnd_user where user_name in

(‘DOYEN’);

cursor respname is

SELECT fa.application_short_name,fr.responsibility_key,frg.security_group_key,frt.description,frt.responsibility_name

FROM apps.fnd_responsibility fr,apps.fnd_application fa,apps.fnd_security_groups frg,apps.fnd_responsibility_tl frt

WHERE fr.application_id = fa.application_id

AND    fr.data_group_id = frg.security_group_id

AND    fr.responsibility_id = frt.responsibility_id

AND    frt.LANGUAGE = ‘US’

AND    frt.responsibility_name in

(SELECT frtl.responsibility_name

FROM apps.fnd_responsibility_tl frtl

WHERE 1=1

and frtl.LANGUAGE = ‘US’

and frtl.responsibility_name in

(‘IM AR AP AMS Inquiry’,

‘IM AR AP Inquiry and Reports’,

‘IM AR AR Manager’,

‘IM AR FA Inquiry and Reports’,

‘IM AR FA Manager’,

‘IM AR GL Usr Inq and Rep’,

‘IM AT AP Inquiry and Reports’,

‘IM NL IMDC AP Period End’,

‘IM NL IMDC AP Supervisor’,

‘IM NL IMDC AR Customer Entry’,

‘IM NL IMDC AR Manager’,

‘IM NL IMDC AR Supervisor’,

‘IM NL IMDC GL Manager’,

‘IM NL IMDC GL User’,

‘IM NO AR Inquiry and Reports’,

‘IM PE AP Invoice User’,

‘IM TH AP Clerk’,

‘IM US AP Inquiry & Reports’));

begin

open usrname;

loop

fetch usrname into res_user_name;

exit when usrname%notfound;

open respname;

loop

fetch respname into res_app_sn,res_respkey,res_sgkey,res_desc,res_name;

exit when respname%notfound;

fnd_user_pkg.addresp (username            => res_user_name,

resp_app           => res_app_sn,

resp_key              => res_respkey,

security_group            => res_sgkey,

description        => res_desc,

start_date                => SYSDATE,

end_date                  => NULL

);

commit;

end loop;

close respname;

end loop;

close usrname;

end;

/

Recent Posts

Start typing and press Enter to search