Elastic Domain Learning-descriptive elastic domain

Source: Internet
Author: User


Elastic domains are divided into key-elastic domains and descriptive elastic domains. These two types of elastic domains are used differently.

Key elastic domain: only the ID is saved in the base table that uses the key elastic domain. However, the corresponding segment can be queried by ID. * ** _ Id and segment1 are displayed in the table structure.

Descriptive elastic domain: extended fields that enter specific information for specific users. The attribute_category and attribute1 fields are displayed in the table structure.


Register descriptive elastic Domains

I. Preparations for Elastic domain development
1. Register a table with elastic Fields
The following table describes the elastic domains.

Create Table hek_om_pop_validity_all (
Line_id number,
Inventory_item_id number, -- item number 189
Number_of_day number, -- Number of days
Start_date date, -- start date
End_date date, -- end date

-- ======================== Extended field ========================= ================
Created_by number,
Creation_date date,
Last_updated_by number,
Last_update_date date,
Last_update_login number,
Org_id number,

Attribute_category varchar2 (30 ),
Attribute1 varchar2 (50 ),
Attribute2 varchar2 (50 ),
Attribute3 varchar2 (50 ),
Attribute4 varchar2 (150 ),
Attribute5 varchar2 (150)


Register database tables and columns
The registration of database tables and columns in the system is designed to support the two features of the system's elastic domain and warning system. If you do not need these features, you do not need to register them.
Table. Registration Method: Use the following process registry:

Ad_dd.register_table (
P_appl_short_name in varchar2,
P_tab_name in varchar2,
P_tab_type in varchar2,
P_next_extent in number default 512,
P_pct_free in number default 10,
P_pct_used in number default 70 );

2. Registry hek_om_pop_validity_all
Ad_dd.register_table ('hek', 'hek _ om_pop_validity_all ', 'T'); -- Note: HEK is short for new applications. (Abbreviation required for new registration)

3. columns in the Registry (elastic domain columns ):

Ad_dd.register_column ('hek', 'hek _ om_pop_validity_all ', 'bubute1', 1, 'varchar2', 50, 'n', 'n ');
Ad_dd.register_column ('hek', 'hek _ om_pop_validity_all ', 'bubute2', 2, 'varchar2', 50, 'n', 'n ');
Ad_dd.register_column ('hek', 'hek _ om_pop_validity_all ', 'bubute3', 3, 'varchar2', 50, 'n', 'n ');
Ad_dd.register_column ('hek', 'hek _ om_pop_validity_all ', 'bubute4', 4, 'varchar2', 150, 'n', 'n ');
Ad_dd.register_column ('hek', 'hek _ om_pop_validity_all ', 'attribute _ category', 5, 'varchar2', 30, 'n', 'n ');


4. Check whether the registration is successful:

Select ft. table_id from fnd_tables FT where ft. table_name = 'hek _ om_pop_validity_all ';


Select * From fnd_columns FC where fc. table_id in (select ft. table_id from fnd_tables ft

Where ft. table_name = 'hek _ om_pop_validity_all ');

5. If you want to delete the registration, you can reference the corresponding process below.
Procedure delete_table (p_appl_short_name in varchar2, p_tab_name in varchar2 );
Procedure delete_column (p_appl_short_name in varchar2,
P_tab_name in varchar2,
P_col_name in varchar2 );


6. register an elastic domain Column

Path: application developer => elastic domain => descriptive => Registration

Application: select the registered application
Name: enter the name of the registration description elastic domain (must be unique)
Title: The title of the elastic domain. In future applications, this description will show the title content defined here in the title of the window.
Table application: application specified in the Registry and column (appl_short_name)
Table Name: select the registered table name.
Structure Column: it must also exist in registered columns. The meaning of the Structure Column is to store the value of the descriptive elastic domain context prompt.
Context prompt: The Title Description of the field in the descriptive elastic domain Context


The above interface is the input interface. The system provides the input. You can enter multiple records here. Of course, only one field can be used.
Field name: it must be consistent with the field in the table selected in the elastic domain.
Description: descriptive text of a field.
Meanings of reference fields:
The main function of the reference field is similar to that of the Structure Column. If you do not select a context field, the system determines the meaning of the reference field.
To display unused elastic domains,
For example, if the reference field is name, the system automatically determines the elastic domains displayed based on the name information after the name information is entered, in this way, you can avoid selecting the context to display the desired elastic domain.

The column field after registration is displayed. (If the Structure Column field is entered, the structure column field is not displayed, because the system regards the Structure Column field as different from the elastic field)

If you do not need an elastic field, you can use checked to invalidate it. In this way, when constructing an elastic field, this field will not be displayed.
After the system registers the name of the elastic domain, you need to configure the elastic field of the elastic domain in the next step.

Note the following points on the interface:
Context Field
-> Tip: the prompt here is the context prompt information. after entering the information here, the content in the "context prompt" column of the registered elastic domain is consistent.
-> Value set: provides a value selection in the lov format for the content of the context field,

In this example, the information contained in set_value_desc_flex is "elastic 1" and "elastic 2". In this way, you can select different information to implement different elastic domains, the selected context field information (this is the AAAA column of the elastic domain context) is saved in the Structure Column.
-> Default value: Set the default value of the context.
-> Reference field: here, the system provides a lov input. The data in the lov here comes from the input record in the "reference field:" button when registering an elastic domain.
The meaning of the reference field is that you can use the input records of other fields to determine whether an elastic field is displayed.
Context Field Value
Multiple elastic domain segments can be defined here: for example, elastic domain 1 = elastic field 1 + elastic field 2
Elastic Field 2 = elastic field 1 + elastic field 2 + elastic field 3
Elastic Field 3 = elastic field 1 + elastic field 2 + elastic field 3 + elastic field 4
Here we need to note that each flexible segment information has a default segment that defines global data elements.

The segment structure of the elastic domain global data elements is as follows:

If we define only one segment structure for an elastic domain, we can define it directly in the global data elements segment. If there are multiple
You need to create another record for segment definition. One thing you need to note is that once a registered field is defined in global data elements
If you create another segment structure, the fields used in global data elements are not displayed.


7. Enable descriptive elastic Domains
7.1 first develop the corresponding form, and then add the following trigger (block level) at the form level
PRE-QUERY: fnd_flex.event ('pre-query ');
Post-query: fnd_flex.event ('post-query ');
PRE-INSERT: fnd_flex.event ('pre-insert ');
PRE-UPDATE: fnd_flex.event ('pre-Update ');
When-validate-item: fnd_flex.event ('when-validate-item ');
When-validate-record: fnd_flex.event ('when-validate-record ');
7.2 add to trigger of PRE-FORM

Fnd_descr_flex.define (Block => 'hek _ om_pop_validity ',
Field => 'desc_flex ',
Appl_short_name => 'hek ',
Desc_flex_name => 'hek _ om_pop_validity_all ');
Description: corresponding parameter: Block: refers to the data block name that enables the elastic domain.
Field: the newly added item
Appl_short_name: abbreviation of the corresponding module (System Administrator-> application-> Registration)
Desc_flex_name: the name used to register an elastic domain.
8. add an item to the data block to enable the elastic domain. Name: desc_flex.
8.1 desc_flex attributes are set as follows:
Subclass information: text_item_desc_flex
Database item: No
Canvas: main_c
8.2 Add the following triggers to the desc_flex entry:
When-validate-item: fnd_flex.event ('when-validate-item ');
When-New-item-instance: fnd_flex.event ('when-New-item-instance ');
9. effect:


Add By guozhenbin 20100421

Objective: To add an elastic domain to the order line of the 2% sales order (return order) and record the replenishment number.

1. Check whether an elastic domain exists on the line on the sales ticket.

2. Search in the application developer> elastic domain:

3. Search for related segments

The "Reference Field" indicates the field value to determine which elastic field to display.

For example, when the order line type is "24-normal gift return", the elastic domain 1 is displayed, and the order line type is "25-normal gift return, show elastic domain 2.

4. Set the reason why the "reference field" is displayed.

For example, the row type "24-normal gift return" will display the "benefit product" and "replenishment line number" of the two elastic domains ".

5. Edit related Value Sets

6. Final Results:



Conditional Control descriptive elastic domain

Note: You can use the value of a field to control whether to display descriptive elastic fields. Similar to General descriptive elastic domains. The following only describes the differences.

1. When registering an elastic domain column, define a reference column.


Click Reference Field


Discount_type is a field in the data table of the elastic domain to be enabled. This field is used to control whether to display the elastic domain.

2. Define elastic domain segments


Add a new context value record, for example, yearly return. That is, when the value of discount_type is "yearly return", the elastic domain is displayed.


3. Implementation results.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.