Toad World® Forums

trying to add responsibility thru script


#1

I’m trying to run the following but i keep getting error messages. A fellow co-worker is able to run it in Toad for Oracle with no issue and no modifications. I’m running this out of apps.

The error i get is:

ORA-06550: line 13, column 6:
PLS-00201: identifier ‘FND_USER_PKG.ADDRESP’ must be declared
ORA-06550: line 13, column 6:
PL/SQL: Statement ignored
ORA-06550: line 23, column 1:
PLS-00201: identifier ‘FND_USER_PKG.ADDRESP’ must be declared
ORA-06550: line 23, column 1:
PL/SQL: Statement ignored

Below is the code:

DECLARE
lc_user_name VARCHAR2(100) := ‘GDOUGLAS’;

lc_resp_appl_short_name2 VARCHAR2(100) := ‘SYSADMIN’;
lc_responsibility_key2 VARCHAR2(100) := ‘SYSTEM_ADMINISTRATOR’;

lc_security_group_key VARCHAR2(100) := ‘STANDARD’; – Valid Values = STANDARD, 81, 82
ld_resp_start_date DATE := sysdate-1;
ld_resp_end_date DATE := NULL;

BEGIN

fnd_user_pkg.addresp
( username => lc_user_name,
resp_app => lc_resp_appl_short_name2,
resp_key => lc_responsibility_key2,
security_group => lc_security_group_key,
description => NULL,
start_date => ld_resp_start_date,
end_date => ld_resp_end_date
);

fnd_user_pkg.addresp (username=> lc_user_name, resp_app => ‘SYSADMIN’, resp_key=> ‘SYSTEM_ADMINISTRATOR’,
security_group => ‘81’, description => NULL, start_date => sysdate-1, end_date => sysdate+9999);

–fnd_user_pkg.addresp (username=> lc_user_name, resp_app => ‘PER’, resp_key=> ‘STN_USD_HRMS_SUPER_USER’,
– security_group => ‘82’, description => NULL, start_date => sysdate-1, end_date => sysdate+9999);

–fnd_user_pkg.addresp (username=> lc_user_name, resp_app => ‘SQLAP’, resp_key=> ‘STN_US_OIE_EXPENSE_AUDITOR’,
– security_group => ‘STANDARD’, description => NULL, start_date => sysdate-1, end_date => sysdate+9999);

COMMIT;

EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
/

SHOW ERR;


#2

A couple of points here.

  1. We do not support SQL* Plus keywords in the TDP editor. We do support them in the external app bundled with TDP. But that should only apply to the ‘/’ and Show Errl

  2. When you run the block of code make sure the correct schema is selected in the drop down of the editor window itself. Your errors seem to be from not fully qualifying your packages. You could fully qualify them or use the drop down which executes an alter session set current_schema

  3. When you run the script use F5 and not F9 as F5 executes the whole block of code and F9 tries to parse it.

See if these items help.