FND_programPackage

18
FND_PROGRAM: Concurrent Program Loaders The FND_PROGRAM package includes procedures for creating concurrent program executables, concurrent programs with parameters and incompatibility rules, request sets, and request groups. The FND_PROGRAM package also contains functions you can use to check for the existence of concurrent programs, executables, parameters, and incompatibility rules. The arguments passed to the procedures correspond to the fields in the Oracle Application Object Library Release 11 forms, with minor exceptions. In general, first enter the parameters to these procedures into the forms for validation and debugging. If an error is detected, ORA-06501: PL/SQL: internal error is raised. The error message can be retrieved by a call to the function fnd_program.message(). Some errors are not trapped by the package, notably "duplicate value on index". Note that an exception is raised if bad foreign key information is provided. For example, delete_program() does not fail if the program does not exist, but does fail if given a bad application name. Arguments (input) FND_PROGRAM.MESSAGE Summary function FND_PROGRAM.MESSAGE return VARCHAR2; Description Use the message function to return an error message. Messages are set when any validation (program) errors occur. FND_PROGRAM.EXECUTABLE

Transcript of FND_programPackage

Page 1: FND_programPackage

FND_PROGRAM: Concurrent Program Loaders

The FND_PROGRAM package includes procedures for creating concurrent program executables, concurrent programs with parameters and incompatibility rules, request sets, and request groups. The FND_PROGRAM package also contains functions you can use to check for the existence of concurrent programs, executables, parameters, and incompatibility rules.

The arguments passed to the procedures correspond to the fields in the Oracle Application Object Library Release 11 forms, with minor exceptions. In general, first enter the parameters to these procedures into the forms for validation and debugging.

If an error is detected, ORA-06501: PL/SQL: internal error is raised. The error message can be retrieved by a call to the function fnd_program.message().

Some errors are not trapped by the package, notably "duplicate value on index".

Note that an exception is raised if bad foreign key information is provided. For example, delete_program() does not fail if the program does not exist, but does fail if given a bad application name.

Arguments (input)

FND_PROGRAM.MESSAGE

Summary

function FND_PROGRAM.MESSAGE return VARCHAR2;

Description

Use the message function to return an error message. Messages are set when any validation (program) errors occur.

FND_PROGRAM.EXECUTABLE

Summary

procedure FND_PROGRAM.EXECUTABLE

(executable IN VARCHAR2,

application IN VARCHAR2,

description IN VARCHAR2 DEFAULT NULL,

Page 2: FND_programPackage

execution_method IN VARCHAR2,

execution_file_name IN VARCHAR2 DEFAULT NULL,

subroutine_nameIN VARCHAR2 DEFAULT NULL,

icon_name IN VARCHAR2 DEFAULT NULL,

language_code IN VARCHAR2 DEFAULT 'US');

Description

Use this procedure to define a concurrent program executable. This procedure corresponds to the "Concurrent Program Executable" window accessible from the System Administrator and Application Developer responsibilities.

Arguments (input)

executable Name of executable (for example, 'FNDSCRMT'). application The short name of the executable's application, for example, 'FND'. description Optional description of the executable. execution_ method The type of program this executable uses. Possible values are 'Host',

'Immediate', 'Oracle Reports', 'PL/SQL Stored Procedure', 'Spawned', 'SQL*Loader', 'SQL*Plus'.

execution_ file_name

The operating system name of the file. Required for all but Immediate programs. This file name should not include spaces or periods unless the file is a PL/SQL stored procedure.

subroutine_name Used only by Immediate programs. Cannot contain spaces or periods. icon_name Reserved for future use by internal developers only. Specify NULL. language_code Language code for the name and description, for example, 'US'.

FND_PROGRAM.DELETE_EXECUTABLE

Summary

procedure FND_PROGRAM.DELETE_EXECUTABLE

(executable IN varchar2,

application IN varchar2);

Description

Use this procedure to delete a concurrent program executable. An executable that is assigned to a concurrent program cannot be deleted.

Page 3: FND_programPackage

Arguments (input)

executable The short name of the executable to delete. application The short name of the executable's application, for example 'FND'.

FND_PROGRAM.REGISTER

Summary

procedure FND_PROGRAM.REGISTER

(program IN VARCHAR2,

application IN VARCHAR2,

enabled IN VARCHAR2,

short_name IN VARCHAR2,

description IN VARCHAR2 DEFAULT NULL,

executable_name IN VARCHAR2,

executable_application IN VARCHAR2,

execution_options IN VARCHAR2 DEFAULT NULL,

priority IN NUMBER DEFAULT NULL,

save_output IN VARCHAR2 DEFAULT 'Y',

print IN VARCHAR2 DEFAULT 'Y',

cols IN NUMBER DEFAULT NULL,

rows IN NUMBER DEFAULT NULL,

style IN VARCHAR2 DEFAULT NULL,

style_required IN VARCHAR2 DEFAULT 'N',

printer IN VARCHAR2 DEFAULT NULL,

request_type IN VARCHAR2 DEFAULT NULL,

request_type_application IN VARCHAR2 DEFAULT NULL,

use_in_srs IN VARCHAR2 DEFAULT 'N',

Page 4: FND_programPackage

allow_disabled_values IN VARCHAR2 DEFAULT 'N',

run_alone IN VARCHAR2 DEFAULT 'N',

output_type IN VARCHAR2 DEFAULT 'TEXT',

enable_trace IN VARCHAR2 DEFAULT 'N',

restart IN VARCHAR2 DEFAULT 'Y',

nls_compliant IN VARCHAR2 DEFAULT 'N',

icon_name IN VARCHAR2 DEFAULT NULL,

language_code IN VARCHAR2 DEFAULT 'US'

mls_function_short_name IN VARCHAR2,

mls_function_application IN VARCHAR2,

incrementor IN VARCHAR2);

Description

Use this procedure to define a concurrent program. This procedure corresponds to the "Concurrent Program" window accessible from the System Administrator and Application Developer responsibilities.

Arguments (input)

program The user-visible program name, for example 'Menu Report'. application The short name of the application that owns the program. The program

application determines the Oracle user name used by the program. enabled Specify either "Y" or "N". short_name The internal developer program name. description An optional description of the program. executable_name The short name of the registered concurrent program executable. executable_ application

The short name of the application under which the executable is registered.

execution_ options Any special option string, used by certain executables such as Oracle Reports.

priority An optional program level priority. save_output Indicate with "Y" or "N" whether to save the output. print Allow printing by specifying "Y", otherwise "N". cols The page width of report columns. rows The page length of report rows. style The default print style name.

Page 5: FND_programPackage

style_required Specify whether to allow changing the default print style from the Submit Requests window.

printer Force output to the specified printer. request_type A user-defined request type. request_type_ application

The short name of the application owning the request type.

use_in_srs Specify "Y" to allow users to submit the program from the Submit Requests window, otherwise "N".

allow_ disabled_values

Specify "Y" to allow parameters based on outdated value sets to validate anyway. Specify "N" to require current values.

run_alone Program must have the whole system to itself. ("Y" or "N") output_type The type of output generated by the concurrent program. Either "HTML",

"PS", "TEXT" or "PDF". enable_trace Specify "Y" if you want to always enable SQL trace for this program,

"N" if not. nls_compliant Reserved for use by internal developers only. Use "N". icon_name Reserved for use by internal developers only. Use NULL. language_code Language code for the name and description. mls_function_ short_name

The name of the registered MLS function.

mls_function_ application

The short name of the application under which the MLS function is registered.

incrementor The incrementor PL/SQL function name.

FND_PROGRAM.DELETE_PROGRAM

Summary

procedure FND_PROGRAM.DELETE_PROGRAM

(program_short_name IN varchar2,

application IN varchar2);

Description

Use this procedure to delete a concurrent program. All references to the program are deleted as well.

Arguments (input)

program_short_ name The short name used as the developer name of the concurrent program. application The application that owns the concurrent program.

Page 6: FND_programPackage

FND_PROGRAM.PARAMETER

Summary

procedure FND_PROGRAM.PARAMETER

(program_short_name IN VARCHAR2,

application IN VARCHAR2,

sequence IN NUMBER,

parameter IN VARCHAR2,

description IN VARCHAR2 DEFAULT NULL,

enabled IN VARCHAR2 DEFAULT 'Y',

value_set IN VARCHAR2,

default_type IN VARCHAR2 DEFAULT NULL,

default_value IN VARCHAR2 DEFAULT NULL,

required IN VARCHAR2 DEFAULT 'N',

enable_security IN VARCHAR2 DEFAULT 'N',

range IN VARCHAR2 DEFAULT NULL,

display IN VARCHAR2 DEFAULT 'Y',

display_size IN NUMBER,

description_size IN NUMBER,

concatenated_description_size IN NUMBER,

prompt IN VARCHAR2 DEFAULT NULL,

token IN VARCHAR2 DEFAULT NULL);

Description

Creates a new parameter for a specified concurrent program. This procedure corresponds to the "Concurrent Program Parameters" window accessible from the System Administrator and Application Developer responsibilities.

Page 7: FND_programPackage

Attention: A newly added parameter does not show up in the SRS form until the descriptive flexfields are compiled. The program $FND_TOP/$APPLBIN/fdfcmp compiles the descriptive flexfields.

Arguments (input)

program_short_ name The short name used as the developer name of the concurrent program. application The short name of the application that owns the concurrent program. sequence The parameter sequence number that determines the order of the

parameters. parameter The parameter name. description An optional parameter description. enabled "Y" for enabled parameters; "N" for disabled parameters. value_set The value set to use with this parameter. default_type An optional default type. Possible values are 'Constant', 'Profile', 'SQL

Statement', or 'Segment'. default_value Only required if the default_type is not NULL. required "Y" for required parameters, "N" for optional ones. enable_security "Y" enables value security if the value set permits it. "N" prevents

value security from operating on this parameter. range Optionally specify "High", "Low", or "Pair". display "Y" to display the parameter, "N" to hide it. display_size The length of the item in the parameter window. description_size The length of the item's description in the parameter window. concatenated_ description_size

The Length of the description in the concatenated parameters field.

prompt The item prompt in the parameter window. token The Oracle Reports token (only used with Oracle Reports programs).

FND_PROGRAM.DELETE_PARAMETER

Summary

procedure FND_PROGRAM.DELETE_PARAMETER

(program_short_name IN varchar2,

application IN varchar2

parameter IN varchar2);

Description

Call this procedure to remove a parameter from a concurrent program.

Page 8: FND_programPackage

Arguments (input)

program_short_ name The short name used as the developer name of the concurrent program. application The application that owns the concurrent program. parameter The parameter to delete.

FND_PROGRAM.INCOMPATIBILITY

Summary

procedure FND_PROGRAM.INCOMPATIBILITY

(program_short_name IN VARCHAR2,

application IN VARCHAR2

inc_prog_short_name IN VARCHAR2,

inc_prog_application IN VARCHAR2,

scope IN VARCHAR2 DEFAULT 'Set');

Description

Use this procedure to register an incompatibility for a specified concurrent program. This procedure corresponds to the "Incompatible Programs" window accessible from the System Administrator and Application Developer responsibilities.

Arguments (input)

program_short_ name The short name used as the developer name of the concurrent program. application The short name of the application that owns the concurrent program inc_prog_ short_name The short name of the incompatible program. inc_prog_ application Application that owns the incompatible program. scope Either "Set" or "Program Only"

FND_PROGRAM.DELETE_INCOMPATIBILITY

Summary

procedure FND_PROGRAM.DELETE_INCOMPATIBILITY

(program_short_name IN VARCHAR2,

application IN VARCHAR2,

Page 9: FND_programPackage

inc_prog_short_name IN VARCHAR2,

inc_prog_application IN VARCHAR2);

Description

Use this procedure to delete a concurrent program incompatibility rule.

Arguments (input)

program_short_ name The short name used as the developer name of the concurrent program. application Application that owns the concurrent program inc_prog_ short_name Short name of the incompatible program to delete. inc_prog_ application Application that owns the incompatible program.

FND_PROGRAM.REQUEST_GROUP

Summary

procedure FND_PROGRAM.REQUEST_GROUP

(request_group IN VARCHAR2,

application IN VARCHAR2,

code IN VARCHAR2 DEFAULT NULL,

description IN VARCHAR2 DEFAULT NULL);

Description

Use this procedure to create a new request group. This procedure corresponds to the master region of the "Request Groups" window in the System Administration responsibility.

Arguments (input)

request_group The name of the request group application The application that owns the request group. code An optional code for the request group. description An optional description of the request group.

FND_PROGRAM.DELETE_GROUP

Summary

procedure FND_PROGRAM.DELETE_GROUP

Page 10: FND_programPackage

(group IN VARCHAR2,

application IN VARCHAR2);

Description

Use this procedure to delete a request group.

Arguments (input)

request_group The name of the request group to delete. application The application that owns the request group.

FND_PROGRAM.ADD_TO_GROUP

Summary

procedure FND_PROGRAM.ADD_TO_GROUP

(program_short_name IN VARCHAR2,

program_application IN VARCHAR2,

request_group IN VARCHAR2,

group_application IN VARCHAR2);

Description

Use this procedure to add a concurrent program to a request group. This procedure corresponds to the "Requests" region in the "Request Groups" window in System Administration.

Arguments (input)

program_short_ name The short name used as the developer name of the concurrent program. program_ application The application that owns the concurrent program. request_group The request group to which to add the concurrent program. group_ application The application that owns the request group.

FND_PROGRAM.REMOVE_FROM_GROUP

Summary

Page 11: FND_programPackage

procedure FND_PROGRAM.REMOVE_FROM_GROUP

(program_short_name IN VARCHAR2,

program_application IN VARCHAR2,

request_group IN VARCHAR2,

group_application IN VARCHAR2);

Description

Use this procedure to remove a concurrent program from a request group.

Arguments (input)

program_short_ name The short name used as the developer name of the concurrent program. program_ application The application that owns the concurrent program. request_group The request group from which to delete the concurrent program. group_ application The application that owns the request group.

FND_PROGRAM.PROGRAM_EXISTS

Summary

function FND_PROGRAM.PROGRAM_EXISTS

(program IN VARCHAR2,

application IN VARCHAR2)

return boolean;

Description

Returns TRUE if a concurrent program exists.

Arguments (input)

program The short name of the program application Application short name of the program.

FND_PROGRAM.PARAMETER_EXISTS

Summary

Page 12: FND_programPackage

function FND_PROGRAM.PARAMETER_EXISTS

(program_short_name IN VARCHAR2,

application IN VARCHAR2,

parameter IN VARCHAR2)

return boolean;

Description

Returns TRUE if a program parameter exists.

Arguments (input)

program The short name of the program application Application short name of the program. parameter Name of the parameter.

FND_PROGRAM.INCOMPATIBILITY_EXISTS

Summary

function FND_PROGRAM.INCOMPATIBILITY_EXISTS

(program_short_name IN VARCHAR2,

application IN VARCHAR2,

inc_prog_short_name IN VARCHAR2,

inc_prog_application IN VARCHAR2)

return boolean;

Description

Returns TRUE if a program incompatibility exists.

Arguments (input)

program The short name of the first program application Application short name of the program. inc_prog_short_ name Short name of the incompatible program. inc_prog_ applicatoin Application short name of the incompatible program.

Page 13: FND_programPackage

FND_PROGRAM.EXECUTABLE_EXISTS

Summary

function FND_PROGRAM.EXECUTABLE_EXISTS

(executable_short_name IN VARCHAR2,

application IN VARCHAR2)

return boolean;

Description

Returns TRUE if program executable exists.

Arguments (input)

program The name of the executable. application Application short name of the executable.

FND_PROGRAM.REQUEST_GROUP_EXISTS

Summary

function FND_PROGRAM.REQUEST_GROUP_EXISTS

(request_group IN VARCHAR2,

application IN VARCHAR2)

return boolean;

Description

Returns TRUE if request group exists.

Arguments (input)

program The name of the executable. application Application short name of the request group.

FND_PROGRAM.PROGRAM_IN_GROUP

Summary

Page 14: FND_programPackage

function FND_PROGRAM.INCOMPATIBILITY_EXISTS

(program_short_name IN VARCHAR2,

application IN VARCHAR2,

request_group IN VARCHAR2,

group_application IN VARCHAR2)

return boolean;

Description

Returns TRUE if a program is in a request group.

Arguments (input)

program The short name of the first program. application Application short name of the program. request_group Name of the request group. group_ application Application short name of the request group.

FND_PROGRAM.ENABLE_PROGRAM

Syntax:

procedure FND_PROGRAM_ENABLE_PROGRAM

(short_name IN VARCHAR2,

application IN VARCHAR2,

ENABLED IN VARCHAR2);

Description

Use this procedure to enable or disable a concurrent program.

Arguments (input)

short_name The shortname of the program. application Application short name of the program. enabled Specify 'Y' to enable the program and 'N' to disable the program.