SlideShare a Scribd company logo
Define a KFF step by step


Author:          Pan Tian
Creation Date:   04/05/2012
Last Updated:
Version:
Status:
Change Record



                Date         Author     Version   Change Reference

                01-May- 12   Pan Tian   Draft     No previous document




Contributors



                Name                               Position




Reviewers
                Name                                 Position




                                                                         ii
Contents



Define a KFF step by step...........................................................................................................................................................1
 BaseTable表增加一个外键列.....................................................................................................................................................1
 Block中创建一个Flexfield的隐藏item.....................................................................................................................................1
 Block中创建一个Flexfield显示字段.........................................................................................................................................1

   ......................................................................................................................................................................................................2
   When-New-Form-Instance中加入FlexField的定义...............................................................................................................2
   Trigger中调用FlexField标准的方法.........................................................................................................................................3
   Flexfield相关的API....................................................................................................................................................................4
   FlexField的相关表......................................................................................................................................................................8




                                                                                                                                                                                                       iii
How to Define a KFF(key flex field) Step by Step
Define a KFF step by step
BaseTable表增加一个外键列

                   在Base Table中定义一个字段XXX_ID,这个用于保存KFF表记录的主键(对于Base Table
                   就是外键列),比如对于本例,如果要增加一个Account的KFF,需要在Base Table上增加
                   一个XXX_ID外键字段用于保存捕获的CODE_COMBINATION_ID

Block中创建一个 Flexfield的隐藏item

                   Block中定义一个隐藏字段用于保存上边一步创建的FK字段,设置canvas为
                   NULL,TEXT_ITEM property class




Block中创建一个 Flexfield显示字段

                   创建了隐藏字段,当然要创建一个显示的字段让用户来输入,这里我们需要创建一个non-
                   database字段用来展示合并的科目值,subclass Information继续使用TEXT_ITEM,设置合
                   适canvas来显示,LOV设置为'ENABLE_LIST_LAMP','Validate from list' is set to No




                                                                                           1
When-New-Form-Instance中加入FlexField的定义

                    在When-New-Form-Instance中加入FlexField的定义,当然好的戏,代码类似于

                             SELECT CHART_OF_ACCOUNTS_ID INTO :PARAMETER.CHART_OF_ACCOUNTS_ID

                             FROM ORG_ORGANIZATION_DEFINITIONS

                             WHERE ORGANIZATION_ID = :PARAMETER.ORG_ID;




                       FND_KEY_FLEX.DEFINE(

                       BLOCK => 'TOMAI_MAIN_HEADER_BLK',



                                                                                                2
FIELD => 'TO_ACCOUNT_PT',

                        CODE => 'GL#',

                        APPL_SHORT_NAME =>'SQLGL',

                        NUM => ':PARAMETER.CHART_OF_ACCOUNTS_ID',

                        ID => 'TO_ACCOUNT_PT_id',

                          VRULE =>
                     'nSUMMARY_FLAGnInAPPL=SQLGL;NAME=GL_NO_PARENT_SEGMENT_ALLOWEDnN0GL_
                     GLOBALnDETAIL_POSTING_ALLOWEDnEnAPPL=INV;NAME=INV_VRULE_POSTINGnN',

                               REQUIRED => 'N',

                               DINSERT => 'Y',

                        VALIDATE => 'FULL',

                        USEDBFLDS => 'N');


                     FND_KEY_FLEX.DEFINE的用法

                     FND_KEY_FLEX.DEFINE(
                     block => 'Custom block',
                     Field => 'BTL_KFF',--第三步创建的显示item
                     ID => 'XXX_ID',--第二步创建的隐藏item
                     Appl_short_name => 'SQLGL',
                     Code => 'GL#',--ID_FLEX_CODE
                     Num => '101',--Chart of account
                     Vrule => 'GL_GLOBALnDETAIL_POSTING_ALLOWED nEnAPPL=''SQLGL'';
                     name=Parent Values are not allowednN'
                     );

Trigger中调用FlexField标准的方法

                     Trigger包括

                      PRE-QUERY

                      POST-QUERY

                      PRE-INSERT

                      PRE-UPDATE

                      WHEN-VALIDATE-RECORD

                      WHEN-NEW-ITEM-INSTANCE

                      WHEN-VALIDATE-ITEM

                      代码类似于:

WHEN-VALIDATE-ITEM

   if ( :system.mode = 'NORMAL' ) then

      fnd_flex.event( 'WHEN-VALIDATE-ITEM' );


                                                                                                 3
end if;

WHEN-NEW-ITEM-INSTANCE

   app_standard.event('WHEN-NEW-ITEM-INSTANCE');

   fnd_flex.event('WHEN-NEW-ITEM-INSTANCE' );

POST-QUERY

--Loads the flexfields (in our case, it populates

--the concatenated field on execute query).

   FND_FLEX.EVENT('POST-QUERY');

PRE-QUERY

--If you don't do this, whatever query criteria you may enter in

-- the concatenated flex field, it is not taken into account.

   FND_FLEX.EVENT('PRE-QUERY' );

KEY-LISTVAL

   APP_STANDARD.EVENT('KEY-LISTVAL');

   FND_FLEX.EVENT('KEY-LISTVAL' );

                    一般情况下,我们会把fnd_flex.event这样的代码放在Form级别,这样我们新加的Trigger
                    只要不是Override模式,那么fnd_flex.event都会被执行到,当然如果你的trigger为override
                    模式或者需要比较复杂的Flexfield的业务逻辑,那么你就必须手工添加fnd_flex.event代码
                    到你的Trigger中。 对于本例Account的KFF来说,因为要校验Account ID是否有效,所以需
                    要在When-Validate-Item中加入一些其他校验

                         FND_FLEX.EVENT('WHEN-VALIDATE-ITEM');

                         IF :BLOCK.XXX_ID = -1 THEN

                      FND_MESSAGE.SET_STRING('You Have Selected An Undefined Code
                    Combination !');

                         FND_MESSAGE.SHOW;

                         RAISE FORM_TRIGGER_FAILURE;

                         END IF;

Flexfield相关的API


                    FND_KEY_FLEX.DEFINE in Developer Guide
                    Use FND_KEY_FLEX.DEFINE for a key flexfield on a foreign key or combinations form.
                    Attention: We provide combinations form syntax so you can
                    convert any existing non–Oracle Applications combinations
                    forms you may have from SQL*Forms 2.3 to Oracle Forms 4.5.
                    However, the API for key flexfields may change in future
                    versions of Oracle Applications, so we recommend that you do
                    not create any new key flexfields that are not provided by
                    Oracle Applications.


                                                                                                         4
FND_KEY_FLEX.DEFINE(
/* Arguments that specify flexfield location */
BLOCK=>’block_name’,
FIELD=>’concatenated_segments_field_name’,
[DESCRIPTION=>’description_field_name’,]
[ID=>’Unique_ID_field’,]
[DATA_FIELD=>’concatenated_hidden_IDs_field’,]
/* Arguments that specify the flexfield */
APPL_SHORT_NAME=>’application_short_name’,
CODE=>’key_flexfield_code’,
NUM=>’structure_number’,
/* Other optional parameters */
[VALIDATE=>’{FOR_INSERT|FULL|PARTIAL|NONE|
PARTIAL_IF_POSSIBLE}’,]
[VDATE=>’date’,]
[DISPLAYABLE=>’{ALL | flexfield_qualifier |
segment_number}[0{ALL |
flexfield_qualifier | segment_number}]’,]
[INSERTABLE=>’{ALL | flexfield_qualifier |
segment_number}[0{ALL |
flexfield_qualifier | segment_number}]’,]
[UPDATEABLE=>’{ALL | flexfield_qualifier |
segment_number}[0{ALL |
flexfield_qualifier | segment_number}]’,]
[VRULE=>’flexfield qualifiern
segment qualifiern
{I[nclude]|E[xclude]}n
APPL=application_short_name;
NAME=Message Dictionary message namen
validation value1n
validation value2...
[0flexfield qualifiern
segment qualifiern
{I[nclude]|E[xclude]}n
APPL=application_short_name;
NAME=Message Dictionary message namen
validation value1n
validation value2...]’,]
[COPY=>’block.fieldn{ALL | flexfield
qualifier | segment_number}
[0block.fieldn{ALL | flexfield
qualifier | segment_number}]’,]
[DERIVED=>’block.fieldnSegment qualifier’,]
[DERIVE_ALWAYS=>’{Y|N}’,]
[DINSERT=>’{Y|N}’,]
[VALATT=>’block.fieldn
flexfield qualifiern
segment qualifier’,]
[TITLE =>’Title’,]
[REQUIRED=>’{Y|N}’,]
[AUTOPICK=>’{Y|N}’,]
[USEDBFLDS=>’{Y|N}’,]
[ALLOWNULLS=>’{Y|N}’,]
[DATA_SET=>’set number’,]
[COLUMN=>’{column1(n) | column1 alias(n)
[, column2(n), ...] [INTO block.field]}’,]
[WHERE_CLAUSE=>’where clause’,]
[COMBQP_WHERE=>’{where clause|NONE}’,]


                                                  5
[WHERE_CLAUSE_MSG=>’APPL=application_short_
name;NAME=message_name’,]
[QUERY_SECURITY=>’{Y|N|}’,]
[QBE_IN=>’{Y|N}’,]
[READ_ONLY=>’{Y|N}’,]
[LONGLIST=>’{Y|N}’,]
[NO_COMBMSG=>’APPL=application_short_
name;NAME=message_name’,]
[AUTOCOMBPICK=>’{Y|N}’,]
[LOCK_FLAG=>’{Y|N}’,]
[HELP=>’APPL=application_short_name;
TARGET=target_name’]
);
You should not use a colon ( : ) in block.field references for the
VALATT, COPY, or DERIVED arguments. The arguments for these
routines go to an Oracle Application Object Library cover routine and
are not directly interpreted in PL/SQL.


fnd_flex.event
fnd_flex.event的代码位于FNDSQF.pll

 procedure event(event_name varchar2) is

 begin

  fnd_flex_private.flex_debug('BEGIN FND_FLEX.EVENT('||event_name||')');

  if ((event_name = 'WHEN-VALIDATE-ITEM') AND

       (name_in('system.mode') = 'ENTER-QUERY')) then

       GOTO lbl_return;

  end if;




  --

  -- Synchronize call seems to solve some problems in

  -- event handling in Forms side.

  -- According to Peter this call does nothing, but let's

  -- call it. G.Olgun

  --

  -- Per Peter's request commenting out the code.

  --

  --IF (event_name = 'WHEN-NEW-ITEM-INSTANCE') THEN

  -- synchronize;

  --END IF;

  --



                                                                           6
user_exit('FND FFLEX ' || event_name);

if (NOT Form_Success) then

     fnd_flex_private.flex_failure('user_exit(FND FFLEX ' ||

                                                               event_name || ') is failed.');

     copy(NULL, 'GLOBAL.FND_FLEX_NAVIGATE');

     copy(NULL, 'GLOBAL.FND_FLEX_NAVIGATE_PUBLIC');

     copy(NULL, 'GLOBAL.FND_FLEX_READONLY');

     copy(NULL, 'GLOBAL.FND_FLEX_ENABLELOV');

     raise FORM_TRIGGER_FAILURE;

end if;




-- if (event_name = 'POST-QUERY') then

-- set_record_property(name_in('SYSTEM.TRIGGER_RECORD'),

--               name_in('SYSTEM.TRIGGER_BLOCK'),

--               STATUS, QUERY_STATUS);

-- end if;




fnd_flex_private.navigate_from_flex;

if (event_name = 'WHEN-NEW-ITEM-INSTANCE') then

 fnd_flex_private.set_flex_item_properties;

end if;




--

-- This step was asked for by Peter Wallack to enable localizations

-- This would eventually be moved to APPCORE.

--

if (event_name = 'WHEN-VALIDATE-RECORD') then

 copy('Y', 'GLOBAL.APPCORE_WVR_ZOOM');

 execute_trigger('ZOOM');

 if not form_success then

     raise form_trigger_failure;




                                                                                                7
end if;

                 end if;




                 <<lbl_return>>

                  fnd_flex_private.flex_debug('END FND_FLEX.EVENT('||event_name||')');

                  RETURN;




                EXCEPTION

                  WHEN OTHERS THEN

                             fnd_flex_private.flex_exception('FND_FLEX.EVENT');

                             RAISE;

                end event;




FlexField的相关表


                FND_ID_FLEXS:
                This table captures the information of all the Key FlexFields. The main columns in this
                table are:

                  APPLICATION_ID ‐ Column consists of Application ID

                  ID_FLEX_CODE ‐ Column KFF Code (like ‘GL#’, ‘AR#’ etc.)

                  ID_FLEX_NAME - KFF Name (like ‘Accounting Flexfield’, ‘Category Flexfield’..etc.)

                  APPLICATION_TABLE_NAME – Name of combination table (like
                ‘GL_CODE_COMBINATIONS’ , ‘FA_LOCATIONS’ etc.)


                FND_ID_FLEX_STRUCTURES:
                This table stores structure information about key Flexfields. Each Structure is uniquely
                identified by

                  APPLICATION_ID – Module Code

                  ID_FLEX_CODE – Code of KFF

                  ID_FLEX_NUM – Number of a Structure


                FND_ID_FLEX_SEGMENTS:
                It captures the information of Segments. Each Segment is Uniquely identified by

                  APPLICATION_ID – Module Code

                  ID_FLEX_CODE – Key Flexfield code


                                                                                                           8
ID_FLEX_NUM – Key flexfield structure number

  SEG_NUM – Segment number

  FLEX_VALUE_SET_ID – Flexfield value set identifier


FND_FLEX_VALUE_SETS:
This table captures the information of each Segment’s Value Set. Each Value Set is
Uniquely identified by FLEX_VALUE_SET_ID as Foreign Key of
FND_ID_FLEX_SEGMENTS Table.


FND_FLEX_VALUES:
This table captures the information each Value codes of a Value Set of a Segment. Each
Value Code is uniquely identified by

  FLEX_VALUE_SET_ID

  FLEX_VALUE_ID


FND_FLEX_VALUES_TL:
This table captures the information of each Value Description of a Value Set of a
Segment. Each Value Description is uniquely identified by FLEX_VALUE_ID.




                                                                                         9
Ad

More Related Content

What's hot (20)

Oracle Receivables ivas
Oracle Receivables ivasOracle Receivables ivas
Oracle Receivables ivas
Ali Ibrahim
 
Oracle EBS r12-2-6 New Features
Oracle EBS r12-2-6 New FeaturesOracle EBS r12-2-6 New Features
Oracle EBS r12-2-6 New Features
Feras Ahmad
 
Oracle Inventory Complete Implementation Setups.
Oracle Inventory Complete Implementation Setups.Oracle Inventory Complete Implementation Setups.
Oracle Inventory Complete Implementation Setups.
Muhammad Mansoor Ali
 
Ap invoice line level approval - R12
Ap invoice line level approval - R12  Ap invoice line level approval - R12
Ap invoice line level approval - R12
Anand Mallarapu
 
Oracle R12 Legal Entity
Oracle R12 Legal EntityOracle R12 Legal Entity
Oracle R12 Legal Entity
Sanjay Challagundla
 
Elshayeb Expense Subinventory And Items Scenario
Elshayeb Expense Subinventory And Items ScenarioElshayeb Expense Subinventory And Items Scenario
Elshayeb Expense Subinventory And Items Scenario
Ahmed Elshayeb
 
Oracle Fixed assets ivas
Oracle Fixed assets ivasOracle Fixed assets ivas
Oracle Fixed assets ivas
Ali Ibrahim
 
Oracle General ledger ivas
Oracle General ledger ivasOracle General ledger ivas
Oracle General ledger ivas
Ali Ibrahim
 
Oracle EBS Currency conversion
Oracle EBS Currency conversionOracle EBS Currency conversion
Oracle EBS Currency conversion
Baker Khader Abdallah, PMP
 
R12 Intercompany Flow
R12 Intercompany FlowR12 Intercompany Flow
R12 Intercompany Flow
ravisagaram
 
Oracle ebs otl setup document
Oracle ebs otl setup documentOracle ebs otl setup document
Oracle ebs otl setup document
Feras Ahmad
 
P2 p and o2c
P2 p and o2cP2 p and o2c
P2 p and o2c
venugopalram
 
Creating business group in oracle apps
Creating business group in oracle appsCreating business group in oracle apps
Creating business group in oracle apps
Gurpreet singh
 
E-Business Tax Purchasing Whitepaper
E-Business Tax Purchasing WhitepaperE-Business Tax Purchasing Whitepaper
E-Business Tax Purchasing Whitepaper
Baker Khader Abdallah, PMP
 
R12:Payment Process Request (PPR)
R12:Payment Process Request (PPR)R12:Payment Process Request (PPR)
R12:Payment Process Request (PPR)
lingaswamy vallapu
 
Approval Hierarchy in Oracle Apps
Approval Hierarchy in Oracle AppsApproval Hierarchy in Oracle Apps
Approval Hierarchy in Oracle Apps
Rahul Guhathakurta
 
ORACLE EBS R12 UPGRADE
ORACLE EBS R12 UPGRADEORACLE EBS R12 UPGRADE
ORACLE EBS R12 UPGRADE
Dinesh Gupta
 
Drop Ship Sales Order Across Operating Units
Drop Ship Sales Order Across Operating UnitsDrop Ship Sales Order Across Operating Units
Drop Ship Sales Order Across Operating Units
Bizinsight Consulting Inc
 
Oracle R12 – Multiple Organization Setup Steps
Oracle R12 – Multiple Organization Setup StepsOracle R12 – Multiple Organization Setup Steps
Oracle R12 – Multiple Organization Setup Steps
Boopathy CS
 
R12.2.4 india localization setup
R12.2.4 india localization setupR12.2.4 india localization setup
R12.2.4 india localization setup
Krithivasan Nagarajan
 
Oracle Receivables ivas
Oracle Receivables ivasOracle Receivables ivas
Oracle Receivables ivas
Ali Ibrahim
 
Oracle EBS r12-2-6 New Features
Oracle EBS r12-2-6 New FeaturesOracle EBS r12-2-6 New Features
Oracle EBS r12-2-6 New Features
Feras Ahmad
 
Oracle Inventory Complete Implementation Setups.
Oracle Inventory Complete Implementation Setups.Oracle Inventory Complete Implementation Setups.
Oracle Inventory Complete Implementation Setups.
Muhammad Mansoor Ali
 
Ap invoice line level approval - R12
Ap invoice line level approval - R12  Ap invoice line level approval - R12
Ap invoice line level approval - R12
Anand Mallarapu
 
Elshayeb Expense Subinventory And Items Scenario
Elshayeb Expense Subinventory And Items ScenarioElshayeb Expense Subinventory And Items Scenario
Elshayeb Expense Subinventory And Items Scenario
Ahmed Elshayeb
 
Oracle Fixed assets ivas
Oracle Fixed assets ivasOracle Fixed assets ivas
Oracle Fixed assets ivas
Ali Ibrahim
 
Oracle General ledger ivas
Oracle General ledger ivasOracle General ledger ivas
Oracle General ledger ivas
Ali Ibrahim
 
R12 Intercompany Flow
R12 Intercompany FlowR12 Intercompany Flow
R12 Intercompany Flow
ravisagaram
 
Oracle ebs otl setup document
Oracle ebs otl setup documentOracle ebs otl setup document
Oracle ebs otl setup document
Feras Ahmad
 
Creating business group in oracle apps
Creating business group in oracle appsCreating business group in oracle apps
Creating business group in oracle apps
Gurpreet singh
 
R12:Payment Process Request (PPR)
R12:Payment Process Request (PPR)R12:Payment Process Request (PPR)
R12:Payment Process Request (PPR)
lingaswamy vallapu
 
Approval Hierarchy in Oracle Apps
Approval Hierarchy in Oracle AppsApproval Hierarchy in Oracle Apps
Approval Hierarchy in Oracle Apps
Rahul Guhathakurta
 
ORACLE EBS R12 UPGRADE
ORACLE EBS R12 UPGRADEORACLE EBS R12 UPGRADE
ORACLE EBS R12 UPGRADE
Dinesh Gupta
 
Drop Ship Sales Order Across Operating Units
Drop Ship Sales Order Across Operating UnitsDrop Ship Sales Order Across Operating Units
Drop Ship Sales Order Across Operating Units
Bizinsight Consulting Inc
 
Oracle R12 – Multiple Organization Setup Steps
Oracle R12 – Multiple Organization Setup StepsOracle R12 – Multiple Organization Setup Steps
Oracle R12 – Multiple Organization Setup Steps
Boopathy CS
 

Similar to How to Define a KFF(key flex field) Step by Step (20)

Implement auto refresh function in oracle ebs 12.1.3
Implement auto refresh function in oracle ebs 12.1.3Implement auto refresh function in oracle ebs 12.1.3
Implement auto refresh function in oracle ebs 12.1.3
Hassan Abd Elrahman
 
Validation type 'special' in value sets
Validation type 'special' in value setsValidation type 'special' in value sets
Validation type 'special' in value sets
Feras Ahmad
 
Pick pack and ship confirm process in oracle apps
Pick pack and ship confirm process in oracle appsPick pack and ship confirm process in oracle apps
Pick pack and ship confirm process in oracle apps
shravan kumar chelika
 
Understanding Flex Fields with Accounting Flexfields(Chart of Accounts) in O...
Understanding Flex Fields with  Accounting Flexfields(Chart of Accounts) in O...Understanding Flex Fields with  Accounting Flexfields(Chart of Accounts) in O...
Understanding Flex Fields with Accounting Flexfields(Chart of Accounts) in O...
Gurpreet singh
 
Efficient Monitoring & Tuning of Dynamic SQL in DB2 for z/OS by Namik Hrle ...
Efficient Monitoring & Tuning of Dynamic SQL in DB2 for z/OS  by  Namik Hrle ...Efficient Monitoring & Tuning of Dynamic SQL in DB2 for z/OS  by  Namik Hrle ...
Efficient Monitoring & Tuning of Dynamic SQL in DB2 for z/OS by Namik Hrle ...
Surekha Parekh
 
Les22
Les22Les22
Les22
Sudharsan S
 
How to setup Flexfield Value Set Security.pdf
How to setup Flexfield Value Set Security.pdfHow to setup Flexfield Value Set Security.pdf
How to setup Flexfield Value Set Security.pdf
icaica52
 
Dependency Injection in Drupal 8
Dependency Injection in Drupal 8Dependency Injection in Drupal 8
Dependency Injection in Drupal 8
katbailey
 
R13_QP_Customer_Account_Specific_Pricing_Solution_V2 .docx
R13_QP_Customer_Account_Specific_Pricing_Solution_V2 .docxR13_QP_Customer_Account_Specific_Pricing_Solution_V2 .docx
R13_QP_Customer_Account_Specific_Pricing_Solution_V2 .docx
kotakonda Murali
 
Fndload commands
Fndload commandsFndload commands
Fndload commands
Nadia Saissi
 
Flexfields.ppt
Flexfields.pptFlexfields.ppt
Flexfields.ppt
vmnyuvarajraj
 
Compiler Design and Construction COSC 5353Project Instructions -
Compiler Design and Construction COSC 5353Project Instructions -Compiler Design and Construction COSC 5353Project Instructions -
Compiler Design and Construction COSC 5353Project Instructions -
LynellBull52
 
Ass2-Descriptor.docx1 Problem DescriptionThe objective of .docx
Ass2-Descriptor.docx1 Problem DescriptionThe objective of .docxAss2-Descriptor.docx1 Problem DescriptionThe objective of .docx
Ass2-Descriptor.docx1 Problem DescriptionThe objective of .docx
fredharris32
 
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UICustomizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Tech OneStop
 
Unit 3(rdbms)
Unit 3(rdbms)Unit 3(rdbms)
Unit 3(rdbms)
Jay Patel
 
Unit 3(rdbms)
Unit 3(rdbms)Unit 3(rdbms)
Unit 3(rdbms)
Jay Patel
 
Run report from menu Personalization كيفية تشغيل تقرير أو ما شابة من خلال شا...
Run report from menu  Personalization كيفية تشغيل تقرير أو ما شابة من خلال شا...Run report from menu  Personalization كيفية تشغيل تقرير أو ما شابة من خلال شا...
Run report from menu Personalization كيفية تشغيل تقرير أو ما شابة من خلال شا...
Ahmed Elshayeb
 
Working With The Symfony Admin Generator
Working With The Symfony Admin GeneratorWorking With The Symfony Admin Generator
Working With The Symfony Admin Generator
John Cleveley
 
Readme
ReadmeReadme
Readme
rec2006
 
Savitch Ch 04
Savitch Ch 04Savitch Ch 04
Savitch Ch 04
Terry Yoast
 
Implement auto refresh function in oracle ebs 12.1.3
Implement auto refresh function in oracle ebs 12.1.3Implement auto refresh function in oracle ebs 12.1.3
Implement auto refresh function in oracle ebs 12.1.3
Hassan Abd Elrahman
 
Validation type 'special' in value sets
Validation type 'special' in value setsValidation type 'special' in value sets
Validation type 'special' in value sets
Feras Ahmad
 
Pick pack and ship confirm process in oracle apps
Pick pack and ship confirm process in oracle appsPick pack and ship confirm process in oracle apps
Pick pack and ship confirm process in oracle apps
shravan kumar chelika
 
Understanding Flex Fields with Accounting Flexfields(Chart of Accounts) in O...
Understanding Flex Fields with  Accounting Flexfields(Chart of Accounts) in O...Understanding Flex Fields with  Accounting Flexfields(Chart of Accounts) in O...
Understanding Flex Fields with Accounting Flexfields(Chart of Accounts) in O...
Gurpreet singh
 
Efficient Monitoring & Tuning of Dynamic SQL in DB2 for z/OS by Namik Hrle ...
Efficient Monitoring & Tuning of Dynamic SQL in DB2 for z/OS  by  Namik Hrle ...Efficient Monitoring & Tuning of Dynamic SQL in DB2 for z/OS  by  Namik Hrle ...
Efficient Monitoring & Tuning of Dynamic SQL in DB2 for z/OS by Namik Hrle ...
Surekha Parekh
 
How to setup Flexfield Value Set Security.pdf
How to setup Flexfield Value Set Security.pdfHow to setup Flexfield Value Set Security.pdf
How to setup Flexfield Value Set Security.pdf
icaica52
 
Dependency Injection in Drupal 8
Dependency Injection in Drupal 8Dependency Injection in Drupal 8
Dependency Injection in Drupal 8
katbailey
 
R13_QP_Customer_Account_Specific_Pricing_Solution_V2 .docx
R13_QP_Customer_Account_Specific_Pricing_Solution_V2 .docxR13_QP_Customer_Account_Specific_Pricing_Solution_V2 .docx
R13_QP_Customer_Account_Specific_Pricing_Solution_V2 .docx
kotakonda Murali
 
Compiler Design and Construction COSC 5353Project Instructions -
Compiler Design and Construction COSC 5353Project Instructions -Compiler Design and Construction COSC 5353Project Instructions -
Compiler Design and Construction COSC 5353Project Instructions -
LynellBull52
 
Ass2-Descriptor.docx1 Problem DescriptionThe objective of .docx
Ass2-Descriptor.docx1 Problem DescriptionThe objective of .docxAss2-Descriptor.docx1 Problem DescriptionThe objective of .docx
Ass2-Descriptor.docx1 Problem DescriptionThe objective of .docx
fredharris32
 
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UICustomizing the Presentation Model and Physical Renderer in Siebel Open UI
Customizing the Presentation Model and Physical Renderer in Siebel Open UI
Tech OneStop
 
Unit 3(rdbms)
Unit 3(rdbms)Unit 3(rdbms)
Unit 3(rdbms)
Jay Patel
 
Unit 3(rdbms)
Unit 3(rdbms)Unit 3(rdbms)
Unit 3(rdbms)
Jay Patel
 
Run report from menu Personalization كيفية تشغيل تقرير أو ما شابة من خلال شا...
Run report from menu  Personalization كيفية تشغيل تقرير أو ما شابة من خلال شا...Run report from menu  Personalization كيفية تشغيل تقرير أو ما شابة من خلال شا...
Run report from menu Personalization كيفية تشغيل تقرير أو ما شابة من خلال شا...
Ahmed Elshayeb
 
Working With The Symfony Admin Generator
Working With The Symfony Admin GeneratorWorking With The Symfony Admin Generator
Working With The Symfony Admin Generator
John Cleveley
 
Ad

Recently uploaded (20)

Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Ad

How to Define a KFF(key flex field) Step by Step

  • 1. Define a KFF step by step Author: Pan Tian Creation Date: 04/05/2012 Last Updated: Version: Status:
  • 2. Change Record Date Author Version Change Reference 01-May- 12 Pan Tian Draft No previous document Contributors Name Position Reviewers Name Position ii
  • 3. Contents Define a KFF step by step...........................................................................................................................................................1 BaseTable表增加一个外键列.....................................................................................................................................................1 Block中创建一个Flexfield的隐藏item.....................................................................................................................................1 Block中创建一个Flexfield显示字段.........................................................................................................................................1 ......................................................................................................................................................................................................2 When-New-Form-Instance中加入FlexField的定义...............................................................................................................2 Trigger中调用FlexField标准的方法.........................................................................................................................................3 Flexfield相关的API....................................................................................................................................................................4 FlexField的相关表......................................................................................................................................................................8 iii
  • 5. Define a KFF step by step BaseTable表增加一个外键列 在Base Table中定义一个字段XXX_ID,这个用于保存KFF表记录的主键(对于Base Table 就是外键列),比如对于本例,如果要增加一个Account的KFF,需要在Base Table上增加 一个XXX_ID外键字段用于保存捕获的CODE_COMBINATION_ID Block中创建一个 Flexfield的隐藏item Block中定义一个隐藏字段用于保存上边一步创建的FK字段,设置canvas为 NULL,TEXT_ITEM property class Block中创建一个 Flexfield显示字段 创建了隐藏字段,当然要创建一个显示的字段让用户来输入,这里我们需要创建一个non- database字段用来展示合并的科目值,subclass Information继续使用TEXT_ITEM,设置合 适canvas来显示,LOV设置为'ENABLE_LIST_LAMP','Validate from list' is set to No 1
  • 6. When-New-Form-Instance中加入FlexField的定义 在When-New-Form-Instance中加入FlexField的定义,当然好的戏,代码类似于 SELECT CHART_OF_ACCOUNTS_ID INTO :PARAMETER.CHART_OF_ACCOUNTS_ID FROM ORG_ORGANIZATION_DEFINITIONS WHERE ORGANIZATION_ID = :PARAMETER.ORG_ID; FND_KEY_FLEX.DEFINE( BLOCK => 'TOMAI_MAIN_HEADER_BLK', 2
  • 7. FIELD => 'TO_ACCOUNT_PT', CODE => 'GL#', APPL_SHORT_NAME =>'SQLGL', NUM => ':PARAMETER.CHART_OF_ACCOUNTS_ID', ID => 'TO_ACCOUNT_PT_id', VRULE => 'nSUMMARY_FLAGnInAPPL=SQLGL;NAME=GL_NO_PARENT_SEGMENT_ALLOWEDnN0GL_ GLOBALnDETAIL_POSTING_ALLOWEDnEnAPPL=INV;NAME=INV_VRULE_POSTINGnN', REQUIRED => 'N', DINSERT => 'Y', VALIDATE => 'FULL', USEDBFLDS => 'N'); FND_KEY_FLEX.DEFINE的用法 FND_KEY_FLEX.DEFINE( block => 'Custom block', Field => 'BTL_KFF',--第三步创建的显示item ID => 'XXX_ID',--第二步创建的隐藏item Appl_short_name => 'SQLGL', Code => 'GL#',--ID_FLEX_CODE Num => '101',--Chart of account Vrule => 'GL_GLOBALnDETAIL_POSTING_ALLOWED nEnAPPL=''SQLGL''; name=Parent Values are not allowednN' ); Trigger中调用FlexField标准的方法 Trigger包括 PRE-QUERY POST-QUERY PRE-INSERT PRE-UPDATE WHEN-VALIDATE-RECORD WHEN-NEW-ITEM-INSTANCE WHEN-VALIDATE-ITEM 代码类似于: WHEN-VALIDATE-ITEM if ( :system.mode = 'NORMAL' ) then fnd_flex.event( 'WHEN-VALIDATE-ITEM' ); 3
  • 8. end if; WHEN-NEW-ITEM-INSTANCE app_standard.event('WHEN-NEW-ITEM-INSTANCE'); fnd_flex.event('WHEN-NEW-ITEM-INSTANCE' ); POST-QUERY --Loads the flexfields (in our case, it populates --the concatenated field on execute query). FND_FLEX.EVENT('POST-QUERY'); PRE-QUERY --If you don't do this, whatever query criteria you may enter in -- the concatenated flex field, it is not taken into account. FND_FLEX.EVENT('PRE-QUERY' ); KEY-LISTVAL APP_STANDARD.EVENT('KEY-LISTVAL'); FND_FLEX.EVENT('KEY-LISTVAL' ); 一般情况下,我们会把fnd_flex.event这样的代码放在Form级别,这样我们新加的Trigger 只要不是Override模式,那么fnd_flex.event都会被执行到,当然如果你的trigger为override 模式或者需要比较复杂的Flexfield的业务逻辑,那么你就必须手工添加fnd_flex.event代码 到你的Trigger中。 对于本例Account的KFF来说,因为要校验Account ID是否有效,所以需 要在When-Validate-Item中加入一些其他校验 FND_FLEX.EVENT('WHEN-VALIDATE-ITEM'); IF :BLOCK.XXX_ID = -1 THEN FND_MESSAGE.SET_STRING('You Have Selected An Undefined Code Combination !'); FND_MESSAGE.SHOW; RAISE FORM_TRIGGER_FAILURE; END IF; Flexfield相关的API FND_KEY_FLEX.DEFINE in Developer Guide Use FND_KEY_FLEX.DEFINE for a key flexfield on a foreign key or combinations form. Attention: We provide combinations form syntax so you can convert any existing non–Oracle Applications combinations forms you may have from SQL*Forms 2.3 to Oracle Forms 4.5. However, the API for key flexfields may change in future versions of Oracle Applications, so we recommend that you do not create any new key flexfields that are not provided by Oracle Applications. 4
  • 9. FND_KEY_FLEX.DEFINE( /* Arguments that specify flexfield location */ BLOCK=>’block_name’, FIELD=>’concatenated_segments_field_name’, [DESCRIPTION=>’description_field_name’,] [ID=>’Unique_ID_field’,] [DATA_FIELD=>’concatenated_hidden_IDs_field’,] /* Arguments that specify the flexfield */ APPL_SHORT_NAME=>’application_short_name’, CODE=>’key_flexfield_code’, NUM=>’structure_number’, /* Other optional parameters */ [VALIDATE=>’{FOR_INSERT|FULL|PARTIAL|NONE| PARTIAL_IF_POSSIBLE}’,] [VDATE=>’date’,] [DISPLAYABLE=>’{ALL | flexfield_qualifier | segment_number}[0{ALL | flexfield_qualifier | segment_number}]’,] [INSERTABLE=>’{ALL | flexfield_qualifier | segment_number}[0{ALL | flexfield_qualifier | segment_number}]’,] [UPDATEABLE=>’{ALL | flexfield_qualifier | segment_number}[0{ALL | flexfield_qualifier | segment_number}]’,] [VRULE=>’flexfield qualifiern segment qualifiern {I[nclude]|E[xclude]}n APPL=application_short_name; NAME=Message Dictionary message namen validation value1n validation value2... [0flexfield qualifiern segment qualifiern {I[nclude]|E[xclude]}n APPL=application_short_name; NAME=Message Dictionary message namen validation value1n validation value2...]’,] [COPY=>’block.fieldn{ALL | flexfield qualifier | segment_number} [0block.fieldn{ALL | flexfield qualifier | segment_number}]’,] [DERIVED=>’block.fieldnSegment qualifier’,] [DERIVE_ALWAYS=>’{Y|N}’,] [DINSERT=>’{Y|N}’,] [VALATT=>’block.fieldn flexfield qualifiern segment qualifier’,] [TITLE =>’Title’,] [REQUIRED=>’{Y|N}’,] [AUTOPICK=>’{Y|N}’,] [USEDBFLDS=>’{Y|N}’,] [ALLOWNULLS=>’{Y|N}’,] [DATA_SET=>’set number’,] [COLUMN=>’{column1(n) | column1 alias(n) [, column2(n), ...] [INTO block.field]}’,] [WHERE_CLAUSE=>’where clause’,] [COMBQP_WHERE=>’{where clause|NONE}’,] 5
  • 10. [WHERE_CLAUSE_MSG=>’APPL=application_short_ name;NAME=message_name’,] [QUERY_SECURITY=>’{Y|N|}’,] [QBE_IN=>’{Y|N}’,] [READ_ONLY=>’{Y|N}’,] [LONGLIST=>’{Y|N}’,] [NO_COMBMSG=>’APPL=application_short_ name;NAME=message_name’,] [AUTOCOMBPICK=>’{Y|N}’,] [LOCK_FLAG=>’{Y|N}’,] [HELP=>’APPL=application_short_name; TARGET=target_name’] ); You should not use a colon ( : ) in block.field references for the VALATT, COPY, or DERIVED arguments. The arguments for these routines go to an Oracle Application Object Library cover routine and are not directly interpreted in PL/SQL. fnd_flex.event fnd_flex.event的代码位于FNDSQF.pll procedure event(event_name varchar2) is begin fnd_flex_private.flex_debug('BEGIN FND_FLEX.EVENT('||event_name||')'); if ((event_name = 'WHEN-VALIDATE-ITEM') AND (name_in('system.mode') = 'ENTER-QUERY')) then GOTO lbl_return; end if; -- -- Synchronize call seems to solve some problems in -- event handling in Forms side. -- According to Peter this call does nothing, but let's -- call it. G.Olgun -- -- Per Peter's request commenting out the code. -- --IF (event_name = 'WHEN-NEW-ITEM-INSTANCE') THEN -- synchronize; --END IF; -- 6
  • 11. user_exit('FND FFLEX ' || event_name); if (NOT Form_Success) then fnd_flex_private.flex_failure('user_exit(FND FFLEX ' || event_name || ') is failed.'); copy(NULL, 'GLOBAL.FND_FLEX_NAVIGATE'); copy(NULL, 'GLOBAL.FND_FLEX_NAVIGATE_PUBLIC'); copy(NULL, 'GLOBAL.FND_FLEX_READONLY'); copy(NULL, 'GLOBAL.FND_FLEX_ENABLELOV'); raise FORM_TRIGGER_FAILURE; end if; -- if (event_name = 'POST-QUERY') then -- set_record_property(name_in('SYSTEM.TRIGGER_RECORD'), -- name_in('SYSTEM.TRIGGER_BLOCK'), -- STATUS, QUERY_STATUS); -- end if; fnd_flex_private.navigate_from_flex; if (event_name = 'WHEN-NEW-ITEM-INSTANCE') then fnd_flex_private.set_flex_item_properties; end if; -- -- This step was asked for by Peter Wallack to enable localizations -- This would eventually be moved to APPCORE. -- if (event_name = 'WHEN-VALIDATE-RECORD') then copy('Y', 'GLOBAL.APPCORE_WVR_ZOOM'); execute_trigger('ZOOM'); if not form_success then raise form_trigger_failure; 7
  • 12. end if; end if; <<lbl_return>> fnd_flex_private.flex_debug('END FND_FLEX.EVENT('||event_name||')'); RETURN; EXCEPTION WHEN OTHERS THEN fnd_flex_private.flex_exception('FND_FLEX.EVENT'); RAISE; end event; FlexField的相关表 FND_ID_FLEXS: This table captures the information of all the Key FlexFields. The main columns in this table are: APPLICATION_ID ‐ Column consists of Application ID ID_FLEX_CODE ‐ Column KFF Code (like ‘GL#’, ‘AR#’ etc.) ID_FLEX_NAME - KFF Name (like ‘Accounting Flexfield’, ‘Category Flexfield’..etc.) APPLICATION_TABLE_NAME – Name of combination table (like ‘GL_CODE_COMBINATIONS’ , ‘FA_LOCATIONS’ etc.) FND_ID_FLEX_STRUCTURES: This table stores structure information about key Flexfields. Each Structure is uniquely identified by APPLICATION_ID – Module Code ID_FLEX_CODE – Code of KFF ID_FLEX_NUM – Number of a Structure FND_ID_FLEX_SEGMENTS: It captures the information of Segments. Each Segment is Uniquely identified by APPLICATION_ID – Module Code ID_FLEX_CODE – Key Flexfield code 8
  • 13. ID_FLEX_NUM – Key flexfield structure number SEG_NUM – Segment number FLEX_VALUE_SET_ID – Flexfield value set identifier FND_FLEX_VALUE_SETS: This table captures the information of each Segment’s Value Set. Each Value Set is Uniquely identified by FLEX_VALUE_SET_ID as Foreign Key of FND_ID_FLEX_SEGMENTS Table. FND_FLEX_VALUES: This table captures the information each Value codes of a Value Set of a Segment. Each Value Code is uniquely identified by FLEX_VALUE_SET_ID FLEX_VALUE_ID FND_FLEX_VALUES_TL: This table captures the information of each Value Description of a Value Set of a Segment. Each Value Description is uniquely identified by FLEX_VALUE_ID. 9