You are html tracking Visitor

Saturday, August 2, 2008

General/AOL Module scripts

General/AOL Module scripts
----------------------------------

To know the Application version before upgrade and current version

Get Report With Parameters list

Know who all users are using the E-Business suite

Get the user’s status in the ICX_SESSIONS table

Get detail of Locks with Object Locked

Audit the changes in Profile Options in given number of days

To know the columns of given table
and status of the table or object given

Find out the Patch Level

How to Select the Nth highest / lowest value from a table

udump path

Compile all the objects in given schema

Concurrent program attached to which responsibility

Invoker or Definer of package

Check the version of the file

Display the Database Version and Server Operating System Name and version

Registering Executable, Concurrent Program etc from backend

Operating Unit name based on the Operating Unit ID

Concurrent program name based on the request ID

Flexfields avilable for your Oracle Application Version

Submit the Concurrent Program from Backend

Register the table in Application from backend

Write message in Log or Out file

Permission names for specific User

Query to get the Number of Seconds or Minutes or Hours between 2 given days

Initialize Apps

Credit Card Number (of different format) from specific column

Know Instance Name

Know license applications

2 comments:

govardhan said...

create or replace package xx_user_pkg
is
procedure xx_username(retcode out number,errbuff out varchar2);
end;

----i wrote a procedure to get username

create or replace package body xx_user_pkg
is
procedure xx_username(retcode out number,errbuff out varchar2)
is
USER varchar2(10);
begin
select USER_NAME INTO USER from fnd_user where USER_ID=1007919;
end;
end;

select USER_NAME from fnd_user where USER_ID=1007919




begin
fnd_program.executable('exeusername','Inventory','exeuser_s','Executable for username',
'PL/SQL Stored Procedure','xx_user_pkg.XX_USERNAME');
end;




begin
fnd_program.REGISTER('conusername','Inventory','Y','conusername_s','Executable for username',
'exeuser_s','Inventory', '' -- execution_options
, '' -- priority
, 'Y' -- save_output
, 'Y' -- print
, '' -- cols
, '' -- rows
, '' -- style
, 'N' -- style_required
, '' -- printer
, '' -- request_type
, '' -- request_type_application
, 'Y' -- use_in_srs
, 'N' -- allow_disabled_values
, 'N' -- run_alone
, 'TEXT' -- output_type
, 'N' -- enable_trace
, 'Y' -- restart
, 'Y' -- nls_compliant
, '' -- icon_name
, 'US'); -- language_code

end;




commit




BEGIN
FND_PROGRAM.ADD_TO_GROUP('conusername_s' -- program_short_name
,'Inventory' -- application
,'Accuracy Analysis Report' -- Report Group Name
,'Inventory'); -- Report Group Application
END;

-->error while trying to add concurrent program to Request group.

Error on line 0
BEGIN
FND_PROGRAM.ADD_TO_GROUP('conusername_s' -- program_short_name
,'Invento

ORA-06501: PL/SQL: program error
ORA-06512: at "APPS.FND_PROGRAM",
line 239
ORA-01403: no data found
ORA-06512: at "APPS.FND_PROGRAM", line 1360
ORA-06512: at line 2


-->for time being
i used front to add to request group.


select user_id from fnd_user where user_name='VARDHAN'



SELECT RESPONSIBILITY_ID,A.* FROM FND_RESPONSIBILITY A WHERE RESPONSIBILITY_KEY='INVENTORY'


DECLARE
REQ_ID NUMBER(10);
begin
--fnd_global.apps_initialize(1007919,20634,401);
REQ_ID:=fnd_submit.submit_program('Inventory','ggusername',10);
--dbms_output.put_line('req id is:'||REQ_ID);
--fnd_file.put_line(fnd_file.log,'REQUEST SUBMITTED SUCCESSFULLY: '||REQ_ID);
if REQ_ID>0 then
dbms_output.put_line('Successfully submitted');
else
dbms_output.put_line('Not Submitted');
end if;
end;

phani said...

Hi Govardhan,

In the following script.

BEGIN
FND_PROGRAM.ADD_TO_GROUP('conusername_s' -- program_short_name
,'Inventory' -- application
,'Accuracy Analysis Report' -- Report Group Name
,'Inventory'); -- Report Group Application
END;

I see that you are using in small caps (Program shortname, Application shortname etc) Put everything in big caps and sees if it works for you.

The error message indicating that, the parameter values yu have passed are not getting any data. Make sure you are passing the correct values.

And also, if you are summiting the request group then use the

fnd_submit.submit_program

If you are submitting only Concurrent program from back then you using the following API.

FND_REQUEST.SUBMIT_REQUEST

Regards,
Phani