Define Defaulting Rules

You can create and modify defaulting rules to improve the efficiency and accuracy with which you enter orders. You can define the rules to determine the source and prioritization for defaulting order information to reduce the amount of information you must enter manually in the Sales Orders window. For most fields, you can assign one or more defaulting sources in a priority sequence, or, if the default is always the same, you can define a constant value. This is step twenty-five of the Order Management Setup Steps.
Updates to defaulting rules take effect once the Defaulting Generator concurrent program has been submitted for the application and the program successfully completes for the entity combination modified. Existing orders are only affected by updates to defaulting rules if you update an attribute on an order that was included in the modified defaulting rule. If you do not perform a change to an existing order that uses the modified defaulting rules, thus activating validation of defaulting, the order is not affected by the modification.
Note: Seeded defaulting rules can be disabled, but not modified.
If you wish to modify a seeded defaulting rule, disable the seeded defaulting rule condition, and then create a copy of the seeded defaulting rule and include your changes in the copied defaulting rule.

To query entities and attributes:

  1. Navigate to the Defaulting Setup - Entity Attributes window.
    Defaulting Setup-Entity Attributes Window
    the picture is described in the document text
    Entity Region
  2. Application: The Application field displays the application context for the entity displayed. For Oracle Order Management, the value is “Oracle Order Management”. This field is non updatable.
  3. Entity: The Entity field displays the name of the object for which defaulting rules and conditions are being defined such as the order line. For Order Management you have the following options:
    • Order Header
      • Order Line
      • Sales Agreement Header
      • Sales Agreement Line
      • Order Payment
      • Line Payment

      Note: Defaulting rule creation is not supported for the sales credit entity and the price adjustment entity.
    Note, defaulting rules can be created for Releases only. Sales Agreements have several hard coded defaults in place but currently does not support the defaulting framework.
    Attribute Region
    The Attributes Region displays all the entity attributes for which defaulting rules can be defined. You are NOT allowed to enter new records here.
  4. The Defaulting Sequence field enables a user to assign the sequence (priority) number in which this attribute should be defaulted.

    Note: Attributes with identical sequence numbers are defaulted in alphabetical order.
    e.g. If the attribute Contact has a sequence number of 1 and the price list has a sequence number of 1, then the Contact defaults before the price list.
  5. The Attribute field stores the name of available attributes. Values are currently displayed based upon the entity selected.
  6. The Include in Building Defaulting Conditions check box indicates whether an attribute can be used in defining conditions for the entity selected.

    Note: The Include in Building Defaulting Conditions check box is for display purposes only, and is non-updateable.
  7. Save your work.
    The Defaulting Condition Templates button enables you to define defaulting template and conditions for the application/entity combination displayed on the defaulting rules setup window. Selecting this button will take you to the Defaulting Condition Validation Templates window.
    The Defaulting Rules button enables users to define defaulting rules for the attribute selected. Selecting this button will take you to the Attribute Defaulting Rules window. For more information on defining or updating defaulting sourcing rules, see the Define Defaulting Rules section.
    Select the Defaulting Condition Templates button to define the defaulting condition for this entity.

    Note: The template that appears after selecting the Default Condition Template button is based upon current values displayed in the Application and Entity field on the Defaulting Setup window.

To define Defaulting Condition Templates:

  1. Navigate to the Defaulting Conditions Validation Templates window.
    Defaulting Condition Validation Templates Window
    the picture is described in the document text
  2. Defaulting conditions enable you to define conditions that can be used to dictate when an attribute is sourced and defaulted. Select an existing condition name if you wish to update the associated validation rules or add a new condition name with associated validation rules.
  3. In the Description field, enter a brief description of the condition.

    Note: A generic condition of Always is seeded for each entity. Use this condition to define generic defaulting rules
  4. The Seeded check box will be checked for seeded conditions. This field is protected against update. You cannot update seeded conditions or validation rules associated with seeded conditions, however, you can disable seeded conditions and create your own.
    In the Validation Rules Region, enter the validation rules based on the attribute values of the above entity. For example, standard orders could have the order type Standard. Order type = Standard.
  5. In the Group Number field:
    • For conditions that should together evaluate to TRUE (AND conditions), enter the same group number
    • For conditions that should together evaluate to OR (OR conditions), enter a different number for each record
  6. Select the Attribute name, such as Contact.
  7. Select the validation operation: Select from:
    • (>) Greater Than
    • (<) Less Than
    • (>=) Greater than or Equal to
    • (<=) Less than or Equal to
    • (=) Equal
    • (!=) Not Equal
  8. Enter the Value String of the attribute that you want to validate against.
  9. Navigate to the Defaulting Setup - Entity Attributes window.
    The Attribute name displays in the Attribute field. Descriptive Flexfield attributes will not be displayed.
  10. Save your work.
    Select the Defaulting Rules button to define your defaulting rules.

To define defaulting rules:

  1. Navigate to the Attribute Defaulting Rules window.
    Attribute Defaulting Rules Window
    the picture is described in the document text
    Defaulting Conditions Region
  2. Enter a value in the Precedence field to determine the precedence when resolving multiple TRUE defaulting conditions.

    Note: If more than one defaulting condition is valid, the conflict is resolved by internally ranking conditions using the Precedence value.
    For example, defaulting condition Standard Order has a precedence value of two and Copied Order has a precedence value of one. If an order is standard and a copied order, then the defaulting condition with higher priority, Copied Order, is used initially. If your conditions for Copy Order do not return a default, conditions for Standard Order will be evaluated.
  3. Select a Defaulting Condition from the List of Values and then enter the defaulting rules to be used if this defaulting condition is TRUE.

    Note: The Always condition should be the last in this sequence as it would always evaluate to True and no other defaulting conditions would be evaluated.
  4. Select the Enable check box if you wish to enable the defaulting condition. If this check box is not selected, the defaulting condition is disabled and the rules and condition associated with this condition are not used in default possessing.
  5. The check box for the field Seeded cannot be updated. This value is seeded by Order Management. For seeded Order Management defaulting conditions, you are unable to update or delete any fields except:
    • The Precedence field on the defaulting rule condition
    • The Enable check box. You can disable seeded Order Management defaulting rules.
  6. Within the Default Sourcing Rules region, select the priority sequence in which you want to retrieve the default for this attribute.
    The defaulting process searches for a default for your attribute by evaluating defaulting rules in ascending order.
  7. Select the defaulting source type. The defaulting source type determines data entry in the Default Source/Value field.
  8. Based on the default source type selected, either select the default sources or enter default values in the Default Source/Value field.
    The table below describes Order Management Source Types and the appropriate action required by a user.
    Order Management Source Types and Actions
    Source TypeAction required
    Constant ValueEnter the default constant value.
    Application ProfileSelect the profile option from where you want to retrieve the default value.
    Same RecordSelect the attribute on the same record from where you want to retrieve the default value.
    Related RecordObject--Select the related object.
    Attribute--Select the attribute on the related object from where you want to retrieve the default value.
    System VariableExpression--Enter the system expression to be evaluated to obtain the default value. (E.g. System Date.)
    PL/SQL APIYou can write a custom API to obtain a default value if the value cannot be obtained using other source types such as, the default order number from a sequence.
    Package--Enter the PL/SQL package name.
    Function--Enter the function name.
    Object--Optionally, enter the name of an object to be passed to this API.
    Attribute--Optionally, you can also enter the name of an attribute to be passed to this API. (See the PL/SQL API Procedure below.)
    WADAttribute
    WADObject Attribute
  9. Save your work.

Caution

If defaulting rules or conditions are updated, the Defaulting Generator concurrent program must be run to generate new defaulting packages.
  • If you update an existing defaulting rule or condition from within the Defaulting Rules window and the update is saved, a pop up window will display a note reminding you to submit the Defaulting Generator concurrent program.
  • Choose to submit the program by selecting Defaulting Generator from the Tools menu while within the Defaulting Rules window, or from the Order Management SRS window.
  • To generate the Defaulting Generator concurrent program for an entity, you must go to the Requests form and select your entity.
You may execute the Defaulting Generator concurrent program while users are still on the system, although the defaulting package may not generate successfully. This can be due to the package currently being called by other users who are processing orders on the system. Common errors within the output log file for this concurrent program may contain text that a time-out occurred while waiting to lock object.
If defaulting packages do not generate successfully, you must choose to run the program at a later time, or to have users briefly log off the system while defaulting packages are regenerated.
Defaulting Rule Example
Here is an example of a defaulting rule that you can define so that a specific Price List will default to the Sales Order Header window. You may also define a sequence (priority) in which you want Order Management to search for a Price List.
The default sequence can also be complex.
For example, look on an Agreement for a Price List, followed by the Invoice To Location, then the Ship To Location, then the Customer, and finally, the Order Type. If Order Management still does not find a price list for any of the source locations listed (Invoice-To, Ship To, Customer, Order Type), you can have a Constant Value default, such as 1998 USA Prices, which you enter in the Value field of the Attribute Defaulting Rules window.
The table below corresponds to the example stated above.
Example of Complex Default Sequence
SequenceDefaulting SourcesSource Field or Value
1Related RecordAgreement.Price List
2Related RecordInvoice To Location.Price List
3Related RecordShip To Location.Price List
4Related RecordCustomer.Price List
5Related RecordOrder Type.Price List
6Constant Value1998 USA Prices
Note: Oracle Order Management does not recommend that you define any overly complex or recurring defaulting rules.

PL/SQL API Procedure

The signature of the PL/SQL API is:
 (p_database_object_name VARCHAR2

,p_attribute_code VARCHAR2)

return VARCHAR2

The table below describes Order Management entities, their associated entity code, and the database object called when the entity is processed within Order Management.
Order Management Entities, Entity Code, and Database Objects Called
EntityEntity CodeDatabase Object
Order HeaderHEADEROE_AK_ORDER_HEADERS_V
Order LineLINEOE_AK_ORDER_LINES_V
For example:
Function to default order number from a sequence based on the order type:
Function Get_Order_Number(p_database_object_name IN VARCHAR2,
p_attribute_code IN VARCHAR2)
return varchar2
IS
l_header_rec OE_AK_ORDER_HEADERS_V%ROWTYPE;
BEGIN
-- Getting the defaulting global record
l_header_rec: <= ONT_Header_Def_Hdlr.g_record;
-- for internal orders, use this sequence but for all other order types use the -- sequence for STANDARD orders.
if l_header_rec.order_type_id = 1 then
return to_char(OE_INTERNAL_ORDERS_S.nextval);
else
return to_char(OE_STANDARD_ORDERS_S.nextval);
end if;
END;
Note: The PL/SQL API should only access global record for entity being defaulted else rules might not work as expected. For e.g. API should not access values on ONT_Header_Def_Hdlr.g_record if rule is for an order line attribute. Instead reference values from ONT_Line_Def_Hdlr.g_record.

Deleted Seeded Defaulting Rules

In a multi-org environment, you can no longer specify Order Type and Salesrep at the Customer Account using the Receivables Customer Form. The multi-org upgrade copies the values for these attributes from the customer account to the site use (provided there is no value there) and clears them from the account level.
Therefore Order Management seeded defaulting rules which defaulted Order Type and Salesrep from the Customer are deleted. The sources (Customer.Order Type and Customer.Salesrep) are now disabled. To view the deleted defaulting rules, run the Upgrade Script Report, ontexc16.sql, to get the ontexc16.lst output.
Related Topics

No comments:

Post a Comment