Introduction to APPCORE Routine APIs
This chapter provides you with specifications for calling many Oracle E-Business Suite APIs from your PL/SQL procedures. Most routines in the APPCORE library are described here. Some APPCORE routines are described in other chapters (for example, the APP_SPECIAL routines are described in the chapter "Controlling the Toolbar and the Default Menu"). The routines described in this chapter include:
-
APP_COMBO: Combination Block API
-
APP_DATE: Date Conversion APIs
-
APP_EXCEPTION: Exception Processing APIs
-
APP_FIELD: Item Relationship Utilities
-
APP_FIND: Query Find Utilities
-
APP_ITEM: Individual Item Utilities
-
APP_ITEM_PROPERTY: Property Utilities
-
APP_NAVIGATE
-
APP_RECORD: Record Utilities
-
APP_REGION: Region Utilities
-
APP_STANDARD Package
-
APP_WINDOW: Window Utilities
APP_COMBO: Combination Block API
Use APP_COMBO to control navigation in combination blocks.
APP_COMBO.KEY_PREV_ITEM
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library |
Description | Call this procedure in the KEY-PREV-ITEM trigger to provide the standard behavior when back-tabbing from the first item in a record. This procedure ensures that the cursor automatically moves to the last item of the previous record.
See: Combination Blocks |
APP_DATE and FND_DATE: Date Conversion APIs
You can use the APP_DATE and FND_DATE package utilities to format, convert, or validate dates. The packages are designed to hide the complexities of the various format masks associated with dates. These routines are particularly useful when you are manipulating dates as strings. The routines are designed to handle the multilingual, flexible format mask, and Y2K aspects of these conversions.
The APP_DATE routines are located in the APPCORE library and can be called from forms and other libraries, except for libraries that are attached to APPCORE, such as the CUSTOM library. For code in the CUSTOM library and other libraries attached to APPCORE, use the APP_DATE2 package in the special APPCORE2 library. The APP_DATE2 package is equivalent to APP_DATE, with the same routines and routine arguments.
The FND_DATE package is located in the database. You can call FND_DATE routines from SQL statements or other database packages. Many of the routines are in both the APP_DATE and the FND_DATE packages.
List of Date Terms
Because a date can be expressed in many different ways, it is useful to define several date-related terms that appear in the following APIs.
Variable | Description |
---|---|
Form date field | A text item (in a form) that has a data type of "Date". |
Form datetime field | A text item (in a form) that has a data type of "Datetime". |
Form character field | A text item (in a form) that has a data type of "Char". |
PL/SQL date | A PL/SQL variable declared as type "Date". Such a variable includes both date and time components. |
User date format | The format in which the user currently sees dates in forms. |
User datetime format | The format in which the user currently sees dates with a time component in forms. |
Canonical date format | A standard format used to express a date as a string, independent of language. Oracle E-Business Suite uses YYYY/MM/DD HH24:MI:SS as the canonical date format. |
Warning: The APP_DATE and FND_DATE routines make use of several package variables, such as canonical_mask, user_mask, and others. The proper behavior of Oracle E-Business Suite depends on these values being correct, and you should never change any of these variables.
APP_DATE.CANONICAL_TO_DATE and FND_DATE.CANONICAL_TO_DATE
Variable | Description |
---|---|
Summary |
|
Variable | Description |
---|---|
Location | APPCORE library and database (stored function) |
Variable | Description |
---|---|
Description | This function takes a character string in the canonical date format (including a time component) and converts it to a PL/SQL date. If APP_DATE.CANONICAL_TO_DATE fails, the routine displays a message on the message line and raises form_trigger_failure. If FND_DATE.CANONICAL_TO_DATE fails, the routine raises a standard exception from the embedded TO_DATE call but does not return a message. |
Variable | Description |
---|---|
Arguments (input) | canonical - The VARCHAR2 string (in canonical format) to be converted to a PL/SQL date. |
Example 1
declare
hire_date varchar2(20) := '1980/01/01';
num_days_employed number;
begin
num_days_employed := trunc(sysdate) -
app_date.canonical_to_date(hire_date);
message('Length of employment in days: '||
to_char(num_days_employed));
end;
Example 2
select fnd_date.canonical_to_date(tab.my_char_date)
from ...
APP_DATE.DISPLAYDATE_TO_DATE and FND_DATE.DISPLAYDATE_TO_DATE
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library and database (stored function) |
Description | This function takes a character string in the user date format and converts it to a PL/SQL date. If APP_DATE.DISPLAYDATE_TO_DATE fails, the routine displays a message on the message line and raises form_trigger_failure. If FND_DATE.DISPLAYDATE_TO_DATE fails, the routine raises a standard exception from the embedded TO_DATE call but does not return a message. In previous releases this function was named APP_DATE.CHARDATE_TO_DATE (that name has been retained for backwards compatibility). |
Arguments (input) | chardate - The VARCHAR2 string (in the user date format) to be converted to a PL/SQL date. |
APP_DATE.DISPLAYDT_TO_DATE and FND_DATE.DISPLAYDT_TO_DATE
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library and database (stored function) |
Description | This function takes a character string in the user datetime format and converts it to a PL/SQL date. If APP_DATE.DISPLAYDT_TO_DATE fails, the routine displays a message on the message line and raises form_trigger_failure. If FND_DATE.DISPLAYDT_TO_DATE fails, the routine raises a standard exception from the embedded TO_DATE call but does not return a message. In previous releases this function was named APP_DATE.CHARDT_TO_DATE (that name has been retained for backwards compatibility). |
Arguments (input) | charDT - The VARCHAR2 string (in the user datetime format) to be converted to a PL/SQL date. |
APP_DATE.DATE_TO_CANONICAL and FND_DATE.DATE_TO_CANONICAL
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library and database (stored function) |
Description | This function converts a PL/SQL date to a character string in the canonical date format. The entire time component is retained. |
Arguments (input) | dateval - The PL/SQL date to be converted. |
Example
select fnd_date.date_to_canonical(hire_date)
from emp ...
APP_DATE.DATE_TO_DISPLAYDATE and FND_DATE.DATE_TO_DISPLAYDATE
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library and database (stored function) |
Description | This function converts a PL/SQL date to a character string in the user date format. Any time component of the PL/SQL date is ignored. In previous releases this function was named APP_DATE.DATE_TO_CHARDATE (that name has been retained for backwards compatibility). |
Arguments (input) | dateval - The PL/SQL date to be converted. |
Example
declare
my_displaydate varchar2(30);
my_dateval date;
begin
my_displaydate :=
app_date.date_to_displaydate(my_dateval);
end;
APP_DATE.DATE_TO_DISPLAYDT and FND_DATE.DATE_TO_DISPLAYDT
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library and database (stored function) |
Description | This function converts a PL/SQL date to a character string in the user datetime format. Any time component of the PL/SQL date is preserved. In previous releases this function was named APP_DATE.DATE_TO_CHARDT (that name has been retained for backwards compatibility). |
Arguments (input) | dateval - The PL/SQL date to be converted. |
Example
declare
my_displaydt varchar2(30);
my_dateval date;
begin
my_displaydt :=
app_date.date_to_displaydt(my_dateval);
end;
APP_DATE.DATE_TO_FIELD
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library |
Description | This procedure copies a PL/SQL date into a form field, form parameter, or global variable. Use this routine instead of the COPY built-in routine when date processing is required. When copying a value into form fields where the datatype is Date or Datetime, this procedure uses the appropriate internal mask to maintain the datatype. When copying a value into form fields where the datatype is Char, by default this procedure applies the user datetime format if the field is long enough to hold it; otherwise this procedure applies the user date format. When copying a value into global variables or form parameters, by default this procedure assumes a datatype of Char and applies the canonical date format, ignoring any time component. Use the date_parameter argument to override this behavior. |
Arguments (input) | dateval - The date to be copied. field - The name of the field to which the date is copied, including the block name. datetime - Use to override the default rules for determining date or datetime format. The default value is 'DEFAULT'. Specify 'DATE' or 'DATETIME' to force the copied value to have the date or datetime formats. Typically, you would use this argument to force the use of the datetime format in global variables and parameters, and for forcing use of the date format in character items that are longer than the datetime user mask. date_parameter - Use this argument only if you are copying the value to a date parameter (with the date data type). If this argument is set to TRUE, the value is copied as a date value instead of as a character value. |
Example
Replace the following code:
COPY(to_char(my_date_value, 'DD-MON-YYYY {HR24:MI:SS}','my_block.my_date_field');
with the following code:
app_date.date_to_field(my_date_value, 'my_block.my_date_field');
APP_DATE.FIELD_TO_DATE
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library |
Description | This function takes a value from a form field, form parameter, or global variable and returns a PL/SQL date. Use this routine instead of the NAME_IN built-in routine when date processing is required. When copying a value from form fields where the datatype is Date or Datetime, this procedure uses the appropriate internal mask to maintain the time component. When copying a value from form fields where the datatype is Char, this procedure applies the user datetime format if the field is long enough to hold it; otherwise this procedure applies the user date format. When copying a value from global variables or form parameters, by default this procedure assumes a datatype of Char and applies the canonical date format, with or without the time component depending on the current length. If APP_DATE.FIELD_TO_DATE fails, the routine raises a standard exception from the embedded TO_DATE call but does not return a message. |
Arguments (input) | field - The name of the field from which the date should be copied, including the block name. date_parameter - Use this argument only if you are copying the value from a date parameter (with the date data type). If this argument is set to TRUE, the value is copied from the parameter as a date instead of as a character value. |
Example
Replace the following code:
to_date(NAME_IN('my_block.my_date_field'), 'DD-MON-YYYY {HH24:MI:SS}');
with the following code:
my_date = app_date.field_to_date('my_block.my_date_field');
APP_DATE.VALIDATE_CHARDATE
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library |
Description | This procedure checks to see if a character value in a given form field (datatype Char) is a valid date by parsing it with the user date format. If the conversion to a date with no time component fails, the routine displays a message on the message line and raises form_trigger_failure. If the conversion succeeds, the routine copies the converted value back into the field to ensure display consistency. |
Arguments (input) | field - The name of the character field to be validated, including the block name. If no field name is passed in, the procedure uses SYSTEM.CURSOR_ITEM. |
APP_DATE.VALIDATE_CHARDT
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library |
Description | This procedure checks to see if a character value in a given form field (datatype Char) is a valid datetime string by parsing it with the user datetime format. If the conversion to a date with a time component fails, the routine displays a message on the message line and raises form_trigger_failure. If the conversion succeeds, the routine copies the converted value back into the field to ensure display consistency. |
Arguments (input) | field - The name of the character field to be validated, including the block name. If no field name is passed in, the procedure uses SYSTEM.CURSOR_ITEM. |
FND_DATE.STRING_TO_DATE
Variable | Description |
---|---|
Summary |
|
Location | Database (stored function) |
Description | This function converts a character string to a PL/SQL date using the given date format mask. This function tests all installed languages, if necessary, to find one that matches the language-dependent fragments of the given string.
Use this routine when you need to convert character string data to dates and are unsure of the language used to store the character date. This function returns NULL if the string cannot be converted. There is no error message. Your code must test for a NULL return value and handle the error as appropriate. Language is important if the mask has language-dependent fragments, as in the format mask DD-MON-RRRR, where the "MON" fragment is language dependent. For example, the abbreviation for February is FEB, but the French abbreviation is FEV. The language testing order of this function is: Language indicated by the setting of "NUMERIC DATE LANGUAGE". Current (default) database language. The "Base" language of the Oracle E-Business Suite installation (where the INSTALLED_FLAG column of the FND_LANGUAGES table is set to "B"). Other installed languages, ordered by the NLS_LANGUAGE column of the FND_LANGUAGES table (where the INSTALLED_FLAG column is set to "I"). |
Arguments (input) | p_string - The character string to be converted. p_mask - The format mask to use for the conversion, such as DD-MON-RRRR. |
FND_DATE.STRING_TO_CANONICAL
Variable | Description |
---|---|
Summary |
|
Location | Database (stored function) |
Description | This function is identical to FND_DATE.STRING_TO_DATE except that this function returns a character string in the canonical date format instead of returning a PL/SQL date. |
Arguments (input) | p_string - The character string to be converted. p_mask - The format mask to use for the conversion, such as DD-MON-RRRR. |
APP_EXCEPTION: Exception Processing APIs
You should use the APPCORE package APP_EXCEPTION to raise exceptions in the PL/SQL procedures written for your forms.
APP_EXCEPTION.RAISE_EXCEPTION
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library and database (stored procedure) |
Description | This procedure stores exception information and raises exception form_trigger_failure. |
Variable | Description |
---|---|
exception_text | Additional context information. |
exception_type | Error prefix that specifies error type (for example, ORA or APP) |
exception_code | The number that identifies the error. |
APP_EXCEPTION.RETRIEVE
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library and database (stored procedure) |
Description | This procedure retrieves exception information from the database. |
APP_EXCEPTION.GET_TYPE
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library and database (stored function) |
Description | This function returns the exception type. |
APP_EXCEPTION.GET_CODE
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library and database (stored function) |
Description | This function returns the exception code. |
APP_EXCEPTION.GET_TEXT
Variable | Description |
---|---|
Summary |
|
Location | APPCORE library and database (stored function) |
Description | This function returns the exception text. |
APP_EXCEPTION.RECORD_LOCK_EXCEPTION
Variable | Description |
---|---|
Description | This is a predefined exception. Call it in an exception handler to handle cases where the record cannot be locked. It is usually used with the APP_EXCEPTION.RECORD_LOCK_ERROR procedure. |
APP_EXCEPTION.RECORD_LOCK_ERROR
Variable | Description |
---|---|
Summary |
|
Description | This procedure asks the user to continue or cancel an attempt to lock a record. It returns to the calling procedure to try again if the user continues. It displays an "Unable to reserve record" acknowledgement and raises FORM_TRIGGER_FAILURE
if the user cancels. APP_EXCEPTION.RECORD_LOCK_ERROR only asks the user every two attempts to lock a record (e.g., counter = 2, 4, 6, etc.). The calling procedure should attempt to lock the record in a loop and call RECORD_LOCK_ERROR in a WHEN APP_EXCEPTION.RECORD_ LOCK_EXCEPTION exception handler inside the loop. If the user continues, RECORD_LOCK_ERROR returns and the loop repeats. If the user cancels, RECORD_LOCK_ERROR raises FORM_TRIGGER_FAILURE and the loop exits. |
Variable | Description |
---|---|
counter | Maintained by RECORD_LOCK_ERROR to count the attempts to lock a record. Calling procedure should initialize to null or 0. |
APP_EXCEPTION.DISABLED
Variable | Description |
---|---|
Summary |
|
Description | This procedure rings the bell. Call this procedure to disable simple functions (typically in a KEY- trigger). |
APP_FIELD: Item Relationship Utilities
This section describes utilities you can use to maintain relationships between your form items.
APP_FIELD.CLEAR_FIELDS
Variable | Description |
---|---|
Summary |
|
Description | This procedure clears up to ten items if the items are not NULL and are not check boxes or required lists. |
APP_FIELD.CLEAR_DEPENDENT_FIELDS
Variable | Description |
---|---|
Summary |
|
Description | This procedure clears up to ten dependent items if the master item is NULL and the dependent items are not NULL and not check boxes or required lists. |
Variable | Description |
---|---|
master_field | Name of master item |
field1 ... field10 | Name of dependent item(s). |
APP_FIELD.SET_DEPENDENT_FIELD
Variable | Description |
---|---|
Summary |
|
Description | This procedure makes an item enterable or not enterable based on whether the master item is NULL or a specified condition is TRUE, and clears the field. The dependent item can be a text item, check box, or poplist. You typically call this procedure in the following triggers: |
Triggers:
-
WHEN-VALIDATE-ITEM on the master field
-
WHEN-VALIDATE-ITEM on the field(s) the condition is based on or in event INIT on the dependent field
-
PRE-RECORD
-
POST-QUERY (required only when the dependent item is in a multi-record block)
Variable | Description |
---|---|
event | Name of trigger event. If you call this trigger on a master field, pass VALIDATE instead of the trigger name (which may be WHEN-VALIDATE-ITEM, WHEN-CHECKBOX-CHANGED, WHEN-LIST-CHANGED, or WHEN-RADIO-CHANGED, any of which can also be used). |
master_field | Name of master item |
condition | TRUE when dependent item is to be enabled |
dependent_field | Name of dependent item |
invalidate | If TRUE, mark the item as invalid instead of clearing the dependent item. Set this flag to TRUE if the dependent item is a required list or option group. For examples on using this procedure, see:Item Relations, , Mutually Inclusive Items with Dependent Items and Defaults. |
APP_FIELD.SET_EXCLUSIVE_FIELD
Variable | Description |
---|---|
Summary |
|
Description | This procedure coordinates items so that only one item of a set may contain a value. If a value is entered in one of the items, the other items are cleared and made non-NAVIGABLE (users can still mouse into these items). This procedure only covers sets of two or three mutually-exclusive items. |
Variable | Description |
---|---|
event | Name of trigger event (WHEN-NEW-RECORD-INSTANCE, PRE-RECORD, or VALIDATE. VALIDATE is generally used in place of WHEN-VALIDATE-ITEM, WHEN-RADIO-CHANGED, WHEN-LIST-CHANGED, or WHEN-CHECKBOX-CHANGED, any of which can also be used.) |
field1 | Name of exclusive item (BLOCK.FIELD) |
field2 | Name of exclusive item (BLOCK.FIELD) |
field3 | Name of exclusive item (BLOCK.FIELD, optional) |
For examples on using this procedure, see: Mutually Exclusive Items.
APP_FIELD.SET_INCLUSIVE_FIELD
Variable | Description |
---|---|
Summary |
|
Description | This procedure coordinates up to five items so that if any of the items contains a value, then all of the items require a value. If all of the items are NULL, then the items are not required. |
Variable | Description |
---|---|
event | Name of trigger event (WHEN-NEW-RECORD-INSTANCE, PRE-RECORD, or VALIDATE. VALIDATE is generally used in place of WHEN-VALIDATE-ITEM, WHEN-RADIO-CHANGED, WHEN-LIST-CHANGED, or WHEN-CHECKBOX-CHANGED, any of which can also be used.) |
field1 | Name of inclusive item |
field2 | Name of inclusive item |
field3 | Name of inclusive item (optional) |
field4 | Name of inclusive item (optional) |
field5 | Name of inclusive item (optional) |
For examples on using this procedure, see: Mutually Inclusive Items.
APP_FIELD.SET_REQUIRED_FIELD
Variable | Description |
---|---|
Summary |
|
Description | This procedure makes an item required or not required based on whether a specified condition is true. |
Variable | Description |
---|---|
event | Name of trigger event |
condition | True when items should be required |
field1 | Name of item |
field2 | Name of item |
field3 | Name of item (optional) |
field4 | Name of item (optional) |
field5 | Name of item (optional) |
For examples on using this procedure, see: Conditionally Mandatory Items.
APP_FIND: Query-Find Utilities
Use the following routines to implement the Find Window functionality.
APP_FIND.NEW
Variable | Description |
---|---|
Summary |
|
Description | This routine is called by the "New" button in a Find Window to return the user to a new record in the block on which the find is based. |
Variable | Description |
---|---|
block_name | The name of the block the Find Window is based on |
APP_FIND.CLEAR
Variable | Description |
---|---|
Summary |
|
Description | This routine is called by the "Clear" button in a Find Window to clear the Find Window. |
APP_FIND.CLEAR_DETAIL
Variable | Description |
---|---|
Summary |
|
Description | This routine clears the result block of a find block (not a Find window). This action can only be performed from triggers that allow navigation. |
Variable | Description |
---|---|
detail_block | The name of the block to be cleared |
Example
APP_FIND.CLEAR_DETAIL('MYBLOCK');
APP_FIND.FIND
Variable | Description |
---|---|
Summary |
|
Description | This routine is called by the "Find" button in a Find Window to execute the Find. |
Variable | Description |
---|---|
block_name | The name of the block the Find Window is based on |
APP_FIND.QUERY_RANGE
Variable | Description |
---|---|
Summary |
|
Description | This utility constructs the query criteria for ranges in a Find Window. Depending on the datatype of the low and high value, it creates a range of characters, dates, or numbers. |
Variable | Description |
---|---|
low_value | The low value of the range |
high_value | The high value of the range |
db_item_name | The name of the item in the block that is being queried |
APP_FIND.QUERY_FIND
Variable | Description |
---|---|
Summary |
|
Description | These routines invoke either the Row-LOV or the Find Window. Call them from a user-named trigger "QUERY_FIND." |
Variable | Description |
---|---|
lov_name | The name of the Row-LOV |
block_window | The name of the window the Find Window is invoked for |
find_window | The name of the Find Window |
find_block | The name of the block in the Find Window |
APP_ITEM: Individual Item Utilities
This section describes utilities for managing your items individually.
APP_ITEM.COPY_DATE
Variable | Description |
---|---|
Summary |
|
Description | Use this procedure to copy a hardcoded date value into a field. This routine does the copy in this way:
|
Variable | Description |
---|---|
date_val | A character date, expressed in the format 'DD-MM-YYYY' |
item_name | The name of the item to copy the value into, expressed as block.item. |
APP_ITEM.IS_VALID
Variable | Description |
---|---|
Summary |
|
Description | Use this routine with fields that are of character datatype but contain data in the format of a date, number or integer. The procedure raises an error if the value is not in a valid format for the specified datatype. The function returns TRUE if the value is in the correct format, otherwise FALSE |
Variable | Description |
---|---|
val | Value to be checked |
dtype | Datatype value should use: DATE, INTEGER, or NUMBER. |
APP_ITEM.SIZE_WIDGET
Variable | Description |
---|---|
Summary |
|
Description | This procedure reads the current label for the specified widget and resizes the widget to fully show the label (used to ensure proper size for a translated label). It will not make the widget any larger than the maximum width specified, to prevent overlapping or expansion beyond the edge of the screen. Call this procedure only for check boxes in single-record formats, buttons and radio groups. |
Variable | Description |
---|---|
wid_name | Name of the widget in block.field syntax |
max_width | The maximum size to make the widget, in inches |
APP_ITEM_PROPERTY: Property Utilities
These utilities help you control the Oracle Forms and Oracle E-Business Suite properties of your items.
APP_ITEM_PROPERTY.GET_PROPERTY
Variable | Description |
---|---|
Summary |
|
Description | This function returns the current setting of an item property. It differs from the Oracle Forms's get_item_property in that it returns PROPERTY_ON or PROPERTY_OFF instead of TRUE or FALSE. |
Variable | Description |
---|---|
item_name | Name of the item to apply the property attribute to. Specify both the block and item name. You can supply the item_ID instead of the name of the item. |
property | The property to set. |
See: Setting Item Properties.
APP_ITEM_PROPERTY.SET_PROPERTY
Variable | Description |
---|---|
Summary |
|
Description | This procedure sets the property of an item. You should never use the Oracle Forms built-in SET_ITEM_PROPERTY to set the field properties DISPLAYED, ENABLED, ENTERABLE, ALTERABLE, INSERT_ ALLOWED, UPDATEABLE, NAVIGABLE, REQUIRED,
and ICON_NAME directly. Use APP_ITEM_PROPERTY.SET_PROPERTY instead. APP_ITEM_PROPERTY.SET_PROPERTY remaps some properties to do other things like change visual attributes. Also, there are some properties that APP_ITEM_PROPERTY provides that native Oracle Forms does not. |
Variable | Description |
---|---|
item_name | Name of the item to apply the property attribute to. Specify both the block and item name. You can supply the item_ID instead of the name of the item. |
property | The property to set. |
value | Either PROPERTY_ON or PROPERTY_OFF, or an icon name (to change the icon property). |
APP_ITEM_PROPERTY.SET_VISUAL_ATTRIBUTE
Variable | Description |
---|---|
Summary |
|
Description | This procedure is no longer used. All colors are set as part of the Oracle Look and Feel (OLAF). |
APP_NAVIGATE: Open a Form Function
Use this utility instead of FND_FUNCTION.EXECUTE to open a form function where you want to reuse an instance of the same form that has already been opened. Use FND_FUNCTION.EXECUTE for all other cases of opening forms and functions.
APP_NAVIGATE.EXECUTE
APP_RECORD: Record Utilities
Following are utilities that interact with a block at the record level.
APP_RECORD.TOUCH_RECORD
Variable | Description |
---|---|
Summary |
|
Description | Sets the status of a NEW record to INSERT_STATUS. For a QUERY record, the record is locked and the status is set to CHANGED_STATUS. In both cases this flags the record to be saved to the database. |
Variable | Description |
---|---|
block_name | The name of the block to touch |
record_number | The record that will be touched |
APP_RECORD.HIGHLIGHT
Variable | Description |
---|---|
Summary |
|
Description | This call changes the visual attribute of the current record by calling the DISPLAY_ITEM built-in for each multirow TEXT_ITEM, LIST and DISPLAY_ITEM of the current record. It will do nothing for items in which the RECORDS_DISPLAYED property is 1. To highlight data, pass 'SELECTED_DATA'. To turn off highlighting, pass 'DATA'. You can pass the name of any visual attribute you want to apply. |
Variable | Description |
---|---|
value | The name of the visual attribute you want to apply. For more information, see the Oracle E-Business Suite User Interface Standards for Forms-Based Products. |
Tip: To improve performance for large blocks with many hidden fields, position all hidden fields at the end of the block, and place a non-database item named "APPCORE_STOP" before the hidden items. When APP_RECORD.HIGHLIGHT reaches this field, it stops highlighting.
APP_RECORD.FOR_ALL_RECORDS
Variable | Description |
---|---|
Summary |
|
Description | This call executes the specified trigger for every record of the current block or the specified block. If you specify a block, the GO_BLOCK built-in fires. When finished, the cursor returns to the original record and item. If the trigger fails, FORM_TRIGGER_FAILURE is raised and the cursor is left in the record in which the failure occurred. You can pass arguments to the specified trigger using global variables simply by setting the global variables before calling this routine. APP_RECORD.FOR_ALL_RECORDS fires once when there are no queried records. |
Variable | Description |
---|---|
block_name | The name of the block to navigate to |
trigger_name | Name of the trigger to execute |
APP_RECORD.DELETE_ROW
Variable | Description |
---|---|
Summary |
|
Description | This call provides a generic message to insure that the user really intends to delete the row. If the function version of this routine is called, it does not delete the row but returns TRUE if the user responds with a confirmation to delete the record and FALSE otherwise. If you have a complex delete, you can first confirm that the user wants to delete the record. If the procedure version of this routine is called, the record is deleted if the user responds affirmatively. You should provide your own message when there is more than one block that allows delete. |
Variable | Description |
---|---|
check_delete | Forces block DELETE_ALLOWED to be checked (optional) |
product_name | The product shortname needed if passing your own message. Otherwise a default message will be supplied (optional) |
message_name | The name of the message if a product_name is supplied (optional) |
APP_RECORD.VALIDATE_RANGE
Variable | Description |
---|---|
Summary |
|
Description | This call validates a range to assure that the "from" value is less than the "to" value. Call this routine from the WHEN-BUTTON-PRESSED trigger of a Find button, or a WHEN-VALIDATE-RECORD trigger (for example) to verify that any
range data entered by the user is valid. If the range is invalid, the routine attempts to navigate to the beginning of the range. If you call VALIDATE_RANGE from a trigger that does not allow navigation, then provide a range name so that it can be displayed to the user when the default message is displayed. You should define the range name in message dictionary and pass the message name to VALIDATE_RANGE. When you define your message, you should include a description that lets the translators know that it should be translated the same as the range title. |
Variable | Description |
---|---|
from_item | The block.item of the from value |
to_item | The block.item of the to value |
range_name | Name of the range (optional) |
event_name | Trigger name, used to determine if navigation is possible (optional) |
dtype | Datatype of the range (NUMBER or DATE, defaults to DATE) (optional) |
product_name | The product shortname needed if passing your own message. Otherwise a default message will be supplied (optional) |
message_name | The name of the message, if a product_name is supplied (optional) |
APP_REGION: Region Utilities
Following are utilities used with alternative regions (for backwards compatibility only; alternative regions have been replaced by tabs).
APP_REGION.ALT_REGION
Variable | Description |
---|---|
Summary |
|
Description | Takes the values currently in the poplist identified by poplist_name and shows them in LOV 'appcore_alt_regions' (referenced in from APPSTAND automatically). If the user selects a row from the LOV, the corresponding poplist value will be updated and TRUE will be returned; otherwise no changes will be made to the poplist and this will return FALSE. Used for keyboard support of alternative region control. |
Variable | Description |
---|---|
poplist_name | The control poplist for an alternative region ('block.field' format). |
Example
if APP_REGION.ALT_REGIONS('CONTROL.LINE_REGIONS') then
CONTROL.LINE_REGIONS('WHEN-LIST-CHANGED');
end if;
See: Coding Alternative Region Behavior
APP_STANDARD Package
APP_STANDARD.APP_VALIDATE
Variable | Description |
---|---|
Summary |
|
Description | This procedure acts similarly to Oracle Forms' built-in Validate, except that it navigates to the first item that caused the validation failure, and it provides support for the button standard. Use it instead of the Oracle Forms built-in. |
Variable | Description |
---|---|
scope | The scope of the validation. Valid values are DEFAULT_SCOPE, FORM_SCOPE, BLOCK_SCOPE, RECORD_SCOPE, and ITEM_SCOPE. |
APP_STANDARD.EVENT
Variable | Description |
---|---|
Summary |
|
Description | This procedure invokes the standard behavior for the specified event. The TEMPLATE form contains all necessary calls to this trigger. |
Variable | Description |
---|---|
event_name | Name of the event or trigger |
See: Special Triggers in the TEMPLATE form
APP_STANDARD.SYNCHRONIZE
Variable | Description |
---|---|
Summary |
|
Description | Dynamic changes to the form can affect which menu items apply, although the state of the menu items is not re-evaluated automatically. If you make a change that affects which items in the toolbar and menu can be used, call this
routine, and it re-evaluates the menu and toolbar. (For example, changing the INSERTABLE property of a block, changing the status of a record, etc.) See: Pulldown Menus and the Toolbar. |
APP_STANDARD.PLATFORM
Variable | Description |
---|---|
Summary |
|
Description | This package variable stores the name of the value returned by GET_APPLICATION_PROPERTY(USER_INTERFACE). Valid values include 'MACINTOSH', MSWINDOWS', MSWINDOWS32', and 'MOTIF'. |
Example
if APP_STANDARD.PLATFORM = 'MSWINDOWS' then
MDI_height := get_window_property(FORMS_MDI_WINDOW,
HEIGHT); end if;
APP_WINDOW: Window Utilities
The following utilities operate at the window level.
APP_WINDOW.CLOSE_FIRST_WINDOW
Variable | Description |
---|---|
Summary |
|
Description | This call exits the form. It raises FORM_TRIGGER_FAILURE if it fails. |
APP_WINDOW.PROGRESS
Variable | Description |
---|---|
Summary |
|
Description | This call manages all aspects of the progress_indicator object. If it is not already visible, the call opens and centers the window. When the percent >= 99.9, the window automatically closes. For any other percent, the progress bar resizes (with a four inch wide maximum). |
Variable | Description |
---|---|
percent | A number between 0 and 99.9, expressing the amount competed. |
APP_WINDOW.SET_COORDINATION
Variable | Description |
---|---|
Summary |
|
Description | This call sets the deferred coordination attribute of a relation to ON or OFF based on the state of the coordination check box. The check box is either "DEFERRED" or "IMMEDIATE." For a closed window, the relation is always "DEFERRED." When coordination is set to "DEFERRED," AutoQuery is turned on. |
Variable | Description |
---|---|
event | The name of the trigger event (either WHEN-CHECKBOX-CHANGED, WHEN-WINDOW-CLOSED, or OPEN-WINDOW) |
coordination | IMMEDIATE or DEFERRED. Defaults to IMMEDIATE |
relation_name | Name of the relation, which is listed in the Oracle Forms Designer under the Block object in the Relation object |
APP_WINDOW.SET_WINDOW_POSITION
Variable | Description |
---|---|
Summary |
|
Description | This call positions a window in the following styles:
If the window was open but obscured, this call raises the windows. If the window was minimized, the call normalizes it. If system resources are low (especially on MS Windows), a warning message appears. |
Variable | Description |
---|---|
child | The name of the window to be positioned |
rel | The style of the window's position |
parent | Name of the window to relative to which you want to position the child window |
See: Non-Modal Windows.
APP_WINDOW.SET_TITLE
Variable | Description |
---|---|
Summary |
|
Description | Use this utility to set the title of a window in the standard format. |
Variable | Description |
---|---|
window_name | The name of the window to set the title for |
session | General session information (for example, Org, Set of Books), no more than 64 characters |
instance[1,2,3] | Context information from the master record (optional). The combined length should be no more than 250 characters. |