OM Defaulting

9
OM – Defaulting Overview Order Management Defaulting Rules reduce the amount of data input required when entering orders or returns. DEFAULTING RULE INCLUDES THE FOLLOWING COMPONENTS 1. Defaulting Source/Value (Entity and Attribute, Source Type) ‘Attributes’ and ‘Entities’ are the things you default to. (A) 2. Defaulting Condition - ‘Conditions’ are rules you set up that will control when a particular group of default sources will be looked at. (B) 3. Precedence of Defaulting Condition (if multiple defaulting conditions exist, precedence determines the condition to use) (C) 4. Sequence (in what order is the rule applied if multiple rules exist) (D) 5. Source Type and Defaulting Source/Value: (how the attribute value is derived) ‘Sources’ are where things default from. (E) Defaulting Setup Form – Navigator -> Setup -> Rules -> Defaulting

Transcript of OM Defaulting

Page 1: OM Defaulting

OM – Defaulting Overview

Order Management Defaulting Rules reduce the amount of data input required when entering orders or returns.

DEFAULTING RULE INCLUDES THE FOLLOWING COMPONENTS

1. Defaulting Source/Value (Entity and Attribute, Source Type) ‘Attributes’ and ‘Entities’ are the things you default to. (A)

2. Defaulting Condition - ‘Conditions’ are rules you set up that will control when a particular group of default sources will be looked at. (B)

3. Precedence of Defaulting Condition (if multiple defaulting conditions exist, precedence determines the condition to use) (C) 4. Sequence (in what order is the rule applied if multiple rules exist) (D) 5. Source Type and Defaulting Source/Value: (how the attribute value is derived) ‘Sources’ are where things default from. (E)

Defaulting Setup Form – Navigator -> Setup -> Rules -> Defaulting

A

G A F

B

I H

Page 2: OM Defaulting

SEQUENCE OF INITIAL ATTRIBUTE DEFAULTING (F)

The defaulting sequence decides the order in which the attributes within an entity are defaulted. When attributes have equal sequence numbers, defaulting takes place alphabetically. Attribute with identical sequence numbers are defaulted in alphabetical order. For example- If the order type has a sequence number of 1 and the price list has a sequence number of 2, then the order type defaults before the price list.

INCLUDE IN BUILDING DEFAULTING CONDITIONS (G)

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 checkbox is for display purposes only, and is non-updateable.

THE DEFAULTING CONDITION TEMPLATES BUTTON (H)

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. Defaulting conditions enable you to define conditions that can be used to dictate how and when an attribute is sourced and defaulted. A generic condition of Always is seeded for each entity. Use this condition to define generic defaulting rules.

In the Group Number field: (I) 1. For conditions that should together evaluate to TRUE (AND conditions), enter the same group number. 2. For conditions that should together evaluate to OR (OR conditions), enter a different number for each record.

THE DEFAULTING RULES BUTTON

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.

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 byinternally 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.

The Always condition should be the last in this sequence as it would alwaysevaluate to True and no other defaulting conditions would be evaluated.

Page 3: OM Defaulting

DEFAULT SOURCING RULES REGION

Defaulting SourcesA defaulting rule source is the location from which you obtain a defaulting value;Defaulting Sources include:1 Same Record2 Related Record3 System Variable4 Constant Value5 Profile Option6 PL/SQL API.

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. Select the defaulting source type. The defaulting source type determines data entry in the Default Source/Value field.

DEPENDENCIES

Some attributes are dependent upon the value of other attributes on the same record. Dependencies can be established only among attributes on the same entity, not across entities. The list of available Source Attribute and Dependent attributes is pre-defined; most attributes are available but some are not. If an attribute is changed, either by the

B C

E D

Page 4: OM Defaulting

user or by the system, any attributes that are dependent on it will be cleared and then re-defaulted.

Note: Since the initial release of Oracle Order Management, functionality for Defaulting Rules has been slightly modified. Previous versions of Order Management allowed a change for certain attributes such that if re-defaulting did not determine a default for the dependent attribute, the previous value would be retained instead of clearing the value. Attributes affected are:1 price list2 salesperson3 customer po number4 order type.For example- the Salesperson for the Header Entity is dependent on Header Customer. If the Header Customer is changed, the Salesperson for the Header entity will be cleared and defaulting rules re-applied. Within previous releases, if the new Customer entered does not have a value for Salesperson, the old value was retained. In this release and within future releases, Order Management will leave the field Salesperson NULL if a default is not available.

GENERATING DEFAULTING PACKAGES FOR RULES AND CONDITIONS

To generate or update defaulting rules or defaulting conditions, you must submit the Defaulting Generator concurrent program. When you submit the Defaulting Generator concurrent program, a defaulting handler package is generated for each attribute on each entity. The creation of new rules or conditions, as well as modified rules and conditions are not effective until the defaulting package for the attribute is successfully generated.

Profile Options OE_CONC_LOG_DIRECTORY The profile option OE_CONC_LOG_DIRECTORY determines the location where all the defaulting files are output when the concurrent program to re-generate defaulting packages is run. This directory should be included in the UTL_FILE_DIR parameter for the database.

REPORT

There is a report in Order Management that lists the Defaulting Rules you have set up. The report is called Defaulting Rules Listing, and it has parameters to allow you to limit the listing to a specific object (entity), attribute or condition.

IMPORTANT NOTE

1. If the Attribute name is the same on both the Order and the Line, you can initially default the value from the Header to the Line. For example, you can default Purchase Order at the Header to Purchase Order at the Line when you first create a PO number. The initial value will default, but if you change the PO the new value will not default automatically from the header to the line.

Page 5: OM Defaulting

2. Defaulting conditions created for an Entity must be based on attributes within that Entity. For example, within the Lines Entity, you cannot use the attribute Order Type because Order Type is a attribute within the Header Entity.3. you might define a sourcing rule that says default attribute A on the line from attribute B on the same line. In this case, you need to ensure that the Attribute B is defaulted before A is defaulted, or the rule may not work as you expect.

4. You can’t default things from just anywhere. The data type has to match that of the attribute you are defaulting, and the source relationship has to be pre-defined.

5. You cannot change seeded defaulting rules but you can disable the defaulting rule's condition

6. When the Sequence in which the attributes within an entity are defaulted is changed, we must run the defaulting generator concurrent program from Resquest->Submit (and not from Forms->Menu->Tools). Don’t provide value for the parameter attribute, leave it NULL.

HOW TO ADD PL/SQL API AS DEFAULTING SOURCE

Create a function with the signature as described in the example below.

FUNCTION <<My Function>>

( p_database_object_name IN VARCHAR2

,p_attribute_code IN VARCHAR2)

RETURN VARCHAR2 IS

<<declare Local Variables>>

BEGIN

<<My Code to get the Value>>

RETURN <<l_value>>

EXCEPTION

WHEN OTHERS THEN

IF OE_MSG_PUB.Check_Msg_Level (OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)

THEN

OE_MSG_PUB.Add_Exc_Msg

( G_PKG_NAME , '<<My Function>>' );

END IF;

RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

END;

HOW TO ADD DEPENDENCY

Add the following code in OEXEDEPB.pls:

x_extn_dep_tbl(l_index).source_attribute := <Name of Source Attbiute>x_extn_dep_tbl(l_index).dependent_attribute := <Name of Dependent attribute> x_extn_dep_tbl(l_index).enabled_flag := 'Y';l_index := l_index + 1;

Page 6: OM Defaulting

Here the name of source attribute and the dependent attribute are those listed in OEXEDEPB.pls

If, on the other hand, you want to create a dependency for a source or a dependentattribute that is not listed in OEXEDEPB.pls, you have to do a little more.

Adding a new Source Attribute:

Add the following statement in OE_<ENTITY>_Util.Clear_Dependent_Attr Eg- Add the following statement in OE_Header_Util.Clear_Dependent_Attr (file:OEXUHDRB.pls). So that the attribute is added to table

IF NOT OE_GLOBALS.Equal(p_x_header_rec.shipment_priority_code,p_old_header_rec.shipment_priority_code)THEN l_index := l_index + 1.0; l_src_attr_tbl(l_index) := OE_HEADER_UTIL.G_SHIPMENT_PRIORITY;END IF

Adding a new Dependent Attribute:

First, add a sub-procedure <attribute> in PROCEDURE OE_<ENTITY>_Util.Clear_Dependents.This sub procedure should set the Atribute to G_MISS.

You also need to add a statement in the big IF loop in the main procedure OE_<ENTITY>_Util.Clear_Dependents to callthis new sub-procedure < attribute >

REFERENCES

1. OM User Guide2. OM Suite Implementation Guide3. White Paper- Using Defaulting Rules in Oracle Order Management4. DLD - Rule Based Defaulting Framework5. HLD - Rule Based Defaulting Framework6. Defaulting_Demo.exe7. Defaulting_Tech_Toi.exe8. Defaulting_tech_overview.ppt