descriptive flexfield

Time:2021-5-6

 

 

1、 Descriptive elastic domain

Foreword introduction:

The essence of descriptive elastic domain is that the system reserves self-defined fields, and the system can use descriptive elastic domain to obtain important additional information unique to the business. The system may customize the descriptive elastic field to display the fields that store more information, and provide a complete set of “custom” mechanism. The value set can be used to verify the fields, and the dependency relationship between fields can be set, etc.

1. Register and field to EBS (remember commit)

    explain:

registry :

AD_ DD.REGISTER_ TABLE(p_ appl_ short_ Name in VARCHAR2, - App name / owner 
p_ tab_ Name in VARCHAR2, - table name 
p_ tab_ Type in VARCHAR2, - t auto extension / s non auto extension / F 
p_ next_ Extend in number 
p_pct_free in number, 
p_pct_used in number)

    Registration column:

AD_DD.REGISTER_COLUMN(p_appl_short_name in varchar2, 
p_ tab_ Name in VARCHAR2, - App name / owner 
p_ col_ Name in VARCHAR2, - column name 
p_ col_ Seq in number, - sequence number, unique 
p_ col_ Type in VARCHAR2, - type 
p_ col_ Width in number, - field width 
p_ Nullable in VARCHAR2, - is it empty 
p_ Translate in VARCHAR2, -- can be converted 
p_precision in number default null, 
p_scale in number default null)

 

2. Register the descriptive elastic domain in application developer > elastic domain > descriptive > registration. Usually, the name is consistent with the table name, and the value of title is distinguishable

 

   After saving, click columns to see that all attribute fields are automatically selected

3. Create non database items:

Manually create a field in a block, usually called desc_ Flex, subclass text ­ ITEM ­ Descflex, prompt is a pair of braces “[]”, which is usually placed at the end of the layout, but does not scroll with the scroll bar

Note: it is a non database field, and the database item attribute is No

4. Trigger:

4.1form level: when ­- NEW ­- FORM ­- INSTANCE

      fnd_descr_flex.define(BLOCK           => ‘BLOCKNAME’,

                                 field           => ‘DESC_FLEX’, 

                              appl_short_name => ‘SCF’,   

                              desc_flex_name  => ‘CUX_FLEXFIELD_DEMO’);  

     Example:

fnd_descr_flex.define(BLOCK           => 'ORDER_HEADERS'                          ,field           => 'DESC_FLEX'                                        ,appl_short_name => 'CUX'                                        ,desc_flex_name  => 'CUX_OE_ORDER_HEADERS_25305_ALL');

 

4.2 block level:

      PRE ­ Add in insert:   fnd_ flex.event(‘PRE ­ INSERT’) ;

PRE ­ Add in update:   fnd_ flex.event(‘PRE ­ UPDATE’) ;

PRE ­ Query added:   fnd_ flex.event(‘PRE ­ QUERY’) ;

POST ­ Query added:   fnd_ flex.event(‘POST ­ QUERY’) ;

WHEN ­ VALIDATE ­ Add in record:   fnd_ flex.event(‘WHEN ­ VALIDATE ­ RECORD’) ;

    

4.3 item level:

    WHEN ­ NEW ­ ITEM ­ Add in instance:   fnd_ flex.event(‘WHEN ­ NEW ­ ITEM ­ INSTANCE’) ;

WHEN ­ VALIDATE ­ Add in Item:   fnd_ flex.event(‘WHEN ­ VALIDATE ­ ITEM’) ;

Note: these triggers (block level and item level) can be written at the form level, so that each block does not need to be written. However, if a trigger with the same name is written at the block level for other functions, the execution level needs to be changed to before (modify the execution hierarchy property of the trigger, which is override by default, and can be changed to after, before).

1. Override mode, the default mode, no longer triggers high-level events (the execution order is item level, block level and form level);
2. Before mode. After triggering the event of this level, the high-level event will be triggered;
3. After mode: first trigger high-level events, and then trigger this level event

 

5. Enable elastic domain:

Enable elastic domain through application developer responsibilities / flexfield / descriptive / segments: select the corresponding field and save it.

  

 

6. Effect:

  

 

 

 

2、 Bond elastic domain

Foreword introduction:

The key elasticity domain has enough “elasticity” to allow arbitrary code combinations to describe entities as needed. The system can determine how many segments an entity has, the meaning of each segment, the value of each segment and the meaning of each segment value for each key elastic domain. The system can also define rules (cross validation rules) to manage the effective combination of segment values, or define the correlation between segments. So the system can use the code it needs. The key elastic domain is usually used to deal with hierarchical coding, such as account, category, etc. it is rarely customized by itself. Generally, it only uses the system standard key elastic domain.

1. Requirements:

1.1 basic table requirements:

The tables corresponding to the key elastic field all have an ID field. If you need to use this table as a foreign key in customization development, of course, you need a foreign key ID field, and the name can start as needed.

1.2 field requirements:

Field requirements: a key code combination field + an optional key description combination field: these two fields can be database items or not.   The code combination segment subclass is text_ Item, which describes a combination of characters. The subclass is usually text_ Item_ Display_ Only; Note that they should be long enough, or they may not fit together.   For the code combination field, you need to set its lov property (list of values is set to enable)_ LIST_ Lamp, validate from list set to no, not required).

    

2. Trigger:

2.1 form level:

      WHEN-NEW-FORM-INSTANCE:

fnd_key_flex.define(BLOCK           => 'FLEXFIELD_DEMO',                             
                              field           => 'ACCOUNT_CODE',                    
                              description     => 'ACCOUNT_DESC',                     
                              appl_short_name => 'SQLGL',                     
                               code            => 'GL#', 
                               id              => 'CODE_COMBINATION_ID',                     
                               required        => 'N',
                               usedbflds       => 'N',                     
                               validate        => 'FULL',                    
                               vrule           => 

 '\nSUMMARY_FLAG\nI\nAPPL=SQLGL;NAME=GL_NO_PARENT_SEGMENT_ALLOWED\nN\0GL_GLOBAL\nDETAIL_POSTING_ALLOWED\nE\nAPPL=INV;NAME=INV_VRULE_POSTING\nN',  
--Because different companies use different structures, don't write dead num value in actual development.                    
                                num             => 101);

 

     Note: you can use the following SQL to query the definitions of different key elastic fields: 

SELECT app.application_short_name,
       app.application_name,
       flx.id_flex_code,
       flx.id_flex_name,
       str.id_flex_num,
       str.id_flex_structure_code,
       str.id_flex_structure_name
  FROM fnd_id_flexs              flx,
       fnd_id_flex_structures_vl str,
       fnd_application_vl        app
 WHERE flx.application_id = str.application_id
   AND flx.id_flex_code = str.id_flex_code
   AND flx.application_id = app.application_id
 ORDER BY 1, 3, 5

 

2.2 block level:

      Add in pre-insert:
        fnd_flex.event(‘PRE-INSERT’);

     Add in pre-update:
        fnd_flex.event(‘PRE-UPDATE’);

     Add in pre-query:
        fnd_flex.event(‘PRE-QUERY’);

Add in post-query:
        fnd_flex.event(‘POST-QUERY’);

      Added in when-validate-record:
        fnd_flex.event(‘WHEN-VALIDATE-RECORD’);

2.3 item level:

     Added in when-new-item-instance:
        fnd_flex.event(‘WHEN-NEW-ITEM-INSTANCE’);

     Added in when-validate-item:
        fnd_flex.event(‘WHEN-VALIDATE-ITEM’);

    Note: these triggers (block level and item level) can be written at the form level, so that each block does not need to be written. However, if a trigger with the same name is written at the block level for other functions, the execution level needs to be changed to before

3. Effect:

 

 
label:  EBS

,

1、 Descriptive elastic domain

Foreword introduction:

The essence of descriptive elastic domain is that the system reserves self-defined fields, and the system can use descriptive elastic domain to obtain important additional information unique to the business. The system may customize the descriptive elastic field to display the fields that store more information, and provide a complete set of “custom” mechanism. The value set can be used to verify the fields, and the dependency relationship between fields can be set, etc.

1. Register and field to EBS (remember commit)

    explain:

registry :

AD_ DD.REGISTER_ TABLE(p_ appl_ short_ Name in VARCHAR2, - App name / owner 
p_ tab_ Name in VARCHAR2, - table name 
p_ tab_ Type in VARCHAR2, - t auto extension / s non auto extension / F 
p_ next_ Extend in number 
p_pct_free in number, 
p_pct_used in number)

    Registration column:

AD_DD.REGISTER_COLUMN(p_appl_short_name in varchar2, 
p_ tab_ Name in VARCHAR2, - App name / owner 
p_ col_ Name in VARCHAR2, - column name 
p_ col_ Seq in number, - sequence number, unique 
p_ col_ Type in VARCHAR2, - type 
p_ col_ Width in number, - field width 
p_ Nullable in VARCHAR2, - is it empty 
p_ Translate in VARCHAR2, -- can be converted 
p_precision in number default null, 
p_scale in number default null)

 

2. Register the descriptive elastic domain in application developer > elastic domain > descriptive > registration. Usually, the name is consistent with the table name, and the value of title is distinguishable

 

   After saving, click columns to see that all attribute fields are automatically selected

3. Create non database items:

Manually create a field in a block, usually called desc_ Flex, subclass text ­ ITEM ­ Descflex, prompt is a pair of braces “[]”, which is usually placed at the end of the layout, but does not scroll with the scroll bar

Note: it is a non database field, and the database item attribute is No

4. Trigger:

4.1form level: when ­- NEW ­- FORM ­- INSTANCE

      fnd_descr_flex.define(BLOCK           => ‘BLOCKNAME’,

                                 field           => ‘DESC_FLEX’, 

                              appl_short_name => ‘SCF’,   

                              desc_flex_name  => ‘CUX_FLEXFIELD_DEMO’);  

     Example:

fnd_descr_flex.define(BLOCK           => 'ORDER_HEADERS'                          ,field           => 'DESC_FLEX'                                        ,appl_short_name => 'CUX'                                        ,desc_flex_name  => 'CUX_OE_ORDER_HEADERS_25305_ALL');

 

4.2 block level:

      PRE ­ Add in insert:   fnd_ flex.event(‘PRE ­ INSERT’) ;

PRE ­ Add in update:   fnd_ flex.event(‘PRE ­ UPDATE’) ;

PRE ­ Query added:   fnd_ flex.event(‘PRE ­ QUERY’) ;

POST ­ Query added:   fnd_ flex.event(‘POST ­ QUERY’) ;

WHEN ­ VALIDATE ­ Add in record:   fnd_ flex.event(‘WHEN ­ VALIDATE ­ RECORD’) ;

    

4.3 item level:

    WHEN ­ NEW ­ ITEM ­ Add in instance:   fnd_ flex.event(‘WHEN ­ NEW ­ ITEM ­ INSTANCE’) ;

WHEN ­ VALIDATE ­ Add in Item:   fnd_ flex.event(‘WHEN ­ VALIDATE ­ ITEM’) ;

Note: these triggers (block level and item level) can be written at the form level, so that each block does not need to be written. However, if a trigger with the same name is written at the block level for other functions, the execution level needs to be changed to before (modify the execution hierarchy property of the trigger, which is override by default, and can be changed to after, before).

1. Override mode, the default mode, no longer triggers high-level events (the execution order is item level, block level and form level);
2. Before mode. After triggering the event of this level, the high-level event will be triggered;
3. After mode: first trigger high-level events, and then trigger this level event

 

5. Enable elastic domain:

Enable elastic domain through application developer responsibilities / flexfield / descriptive / segments: select the corresponding field and save it.

  

 

6. Effect:

  

 

 

 

2、 Bond elastic domain

Foreword introduction:

The key elasticity domain has enough “elasticity” to allow arbitrary code combinations to describe entities as needed. The system can determine how many segments an entity has, the meaning of each segment, the value of each segment and the meaning of each segment value for each key elastic domain. The system can also define rules (cross validation rules) to manage the effective combination of segment values, or define the correlation between segments. So the system can use the code it needs. The key elastic domain is usually used to deal with hierarchical coding, such as account, category, etc. it is rarely customized by itself. Generally, it only uses the system standard key elastic domain.

1. Requirements:

1.1 basic table requirements:

The tables corresponding to the key elastic field all have an ID field. If you need to use this table as a foreign key in customization development, of course, you need a foreign key ID field, and the name can start as needed.

1.2 field requirements:

Field requirements: a key code combination field + an optional key description combination field: these two fields can be database items or not.   The code combination segment subclass is text_ Item, which describes a combination of characters. The subclass is usually text_ Item_ Display_ Only; Note that they should be long enough, or they may not fit together.   For the code combination field, you need to set its lov property (list of values is set to enable)_ LIST_ Lamp, validate from list set to no, not required).

    

2. Trigger:

2.1 form level:

      WHEN-NEW-FORM-INSTANCE:

fnd_key_flex.define(BLOCK           => 'FLEXFIELD_DEMO',                             
                              field           => 'ACCOUNT_CODE',                    
                              description     => 'ACCOUNT_DESC',                     
                              appl_short_name => 'SQLGL',                     
                               code            => 'GL#', 
                               id              => 'CODE_COMBINATION_ID',                     
                               required        => 'N',
                               usedbflds       => 'N',                     
                               validate        => 'FULL',                    
                               vrule           => 

 '\nSUMMARY_FLAG\nI\nAPPL=SQLGL;NAME=GL_NO_PARENT_SEGMENT_ALLOWED\nN\0GL_GLOBAL\nDETAIL_POSTING_ALLOWED\nE\nAPPL=INV;NAME=INV_VRULE_POSTING\nN',  
--Because different companies use different structures, don't write dead num value in actual development.                    
                                num             => 101);

 

     Note: you can use the following SQL to query the definitions of different key elastic fields: 

SELECT app.application_short_name,
       app.application_name,
       flx.id_flex_code,
       flx.id_flex_name,
       str.id_flex_num,
       str.id_flex_structure_code,
       str.id_flex_structure_name
  FROM fnd_id_flexs              flx,
       fnd_id_flex_structures_vl str,
       fnd_application_vl        app
 WHERE flx.application_id = str.application_id
   AND flx.id_flex_code = str.id_flex_code
   AND flx.application_id = app.application_id
 ORDER BY 1, 3, 5

 

2.2 block level:

      Add in pre-insert:
        fnd_flex.event(‘PRE-INSERT’);

     Add in pre-update:
        fnd_flex.event(‘PRE-UPDATE’);

     Add in pre-query:
        fnd_flex.event(‘PRE-QUERY’);

Add in post-query:
        fnd_flex.event(‘POST-QUERY’);

      Added in when-validate-record:
        fnd_flex.event(‘WHEN-VALIDATE-RECORD’);

2.3 item level:

     Added in when-new-item-instance:
        fnd_flex.event(‘WHEN-NEW-ITEM-INSTANCE’);

     Added in when-validate-item:
        fnd_flex.event(‘WHEN-VALIDATE-ITEM’);

    Note: these triggers (block level and item level) can be written at the form level, so that each block does not need to be written. However, if a trigger with the same name is written at the block level for other functions, the execution level needs to be changed to before

3. Effect:

 

Recommended Today

Looking for frustration 1.0

I believe you have a basic understanding of trust in yesterday’s article. Today we will give a complete introduction to trust. Why choose rust It’s a language that gives everyone the ability to build reliable and efficient software. You can’t write unsafe code here (unsafe block is not in the scope of discussion). Most of […]