In this Article, we will see how to display Key Flex Fields in OAF Pages.
Lets assume that the requirement is to display the Accounting Flex Field in an OAF Page.
OAF provides some inbuilt APIs to display the KFF as a concatenated segments or as individual segments.
Approach 1: KFF Field as concatenated segments
In this approach,the KFF will be shown as concatenated segment. See the image below
Approach 2: KFF Field as distinct segments
In this approach,the KFF will be shown as individual segments. See the image below ... kindly ignore the warning message in the image.
Steps to Create a OAF page with KFF
Step 1:
Create VO from GL_CODE_COMBINATIONS table with the following:
VO Name: GLCodeCombinationsVO
Query: select code_combination_id from gl_code_combinations_kfv
Attribute Name: CodeCombinationId
Step 2:
Create an AM and attach GLCodeCombinationsVO to it.
Step 3:
Create a OA Page with two items pointing to same VO attribute. The item will be of type "flex" and there will not be any difference between the 2 items in XML. All the properties will be set in the Controller code.The XML will look something like:
Step 4:
Generate a Controller for the OA Page and set the FlexField Properties for the items in the Process Request as follows:
public void processRequest(OAPageContext pageContext, OAWebBean webBean) {super.processRequest(pageContext, webBean);//Get the handle to the first itemOAKeyFlexBean CCIDlovEnabledKFF = (OAKeyFlexBean)webBean.findIndexedChildRecursive("item3");//Set the KFF item property to have a concatenated segment display.CCIDlovEnabledKFF.useCodeCombinationLOV(true);//Set the KFF NameCCIDlovEnabledKFF.setAttributeValue(FLEXFIELD_NAME, "GL#");//Set the KFF StructureCCIDlovEnabledKFF.setStructureCode("XXX_ACCOUNTING_FLEXFIELD");//Set the VO attribute name to the itemCCIDlovEnabledKFF.setCCIDAttributeName("CodeCombinationId");CCIDlovEnabledKFF.mergeSegmentsWithParent(pageContext);OAKeyFlexBean CCIDlovDisabledKFF =(OAKeyFlexBean)webBean.findIndexedChildRecursive("item2");//Set the KFF item property to have a distinct segment displayCCIDlovDisabledKFF.useCodeCombinationLOV(false);CCIDlovDisabledKFF.setAttributeValue(FLEXFIELD_NAME, "GL#");CCIDlovDisabledKFF.setStructureCode("XXX_ACCOUNTING_FLEXFIELD");CCIDlovDisabledKFF.setCCIDAttributeName("CodeCombinationId");CCIDlovDisabledKFF.mergeSegmentsWithParent(pageContext);//Execute the Query so that we will have some data in VO while we run the page.OAApplicationModule am = pageContext.getApplicationModule(webBean);OAViewObject sampleViewObject =(OAViewObject)am.findViewObject("GLCodeCombinationsVO1");sampleViewObject.executeQuery();}
Step 5:
Run the page and you will have the output as:
when you click the LOV next to the concatenated display of the KFF item, you will get a popup window which will be like image below. You have an option to create a new record as well.
When you click on the LOV next to distinct segments (Company for example) it will behave like a normal LOV and it will bring all Valid values for that Segment from the corresponding Flex field Value set.
Please feel free to post your comments.
For MSCA/OAF consulting kindly contact us at
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
Comments
(52)
Senior Software Engineer
written by Gomathi , August 28, 2008
written by Gomathi , August 28, 2008
Hi Senthil,
Very useful article. I have one doubt in Key Flexfield. I have KFF displayed as individual segment in my page. I want to make one of the segment readonly with some default value. How can I immplement this?..
Eg: In the following KFF, I want to make Account segment readonly with the value 6700.
Company-
Department-
Account- 6700
Sub-Account-
Product
Please mail me the code if possible.
Thanks
Gomathi
Votes: +0
Very useful article. I have one doubt in Key Flexfield. I have KFF displayed as individual segment in my page. I want to make one of the segment readonly with some default value. How can I immplement this?..
Eg: In the following KFF, I want to make Account segment readonly with the value 6700.
Company-
Department-
Account- 6700
Sub-Account-
Product
Please mail me the code if possible.
Thanks
Gomathi
report abuse
vote down
vote up
...
written by Gomathi , August 29, 2008
written by Gomathi , August 29, 2008
Thanks Senthil.. I will try.
Votes: +0
report abuse
vote down
vote up
Display DFF in OAF
written by Sheena , October 29, 2008
written by Sheena , October 29, 2008
hi,
Your example talks about KFF display, how do we do the same for Descriptive flex fields please?
Can you elaborate the steps?
Thanks
Sheena
Votes: +0
Your example talks about KFF display, how do we do the same for Descriptive flex fields please?
Can you elaborate the steps?
Thanks
Sheena
report abuse
vote down
vote up
Making a segment of KFF mandatory
written by Jujaar , October 30, 2008
written by Jujaar , October 30, 2008
Hi Senthil,
Is there a way using which I can make 1 segment of KFF mandatory in OA Fwk?
Regards
Jujaar
Votes: +0
Is there a way using which I can make 1 segment of KFF mandatory in OA Fwk?
Regards
Jujaar
report abuse
vote down
vote up
...
written by Jujaar , October 30, 2008
written by Jujaar , October 30, 2008
Hi Senthil,
Thanks for updates !!!
Yes,I thought so that u have mis read it .
Even I looked at all the methods of OAKeyFlexBean and culdnt find anything relevant.
Thanks anyways.
But did u try $RO$.I tried it once...Dint work..
Cheers
Jujaar
Votes: +0
Thanks for updates !!!
Yes,I thought so that u have mis read it .
Even I looked at all the methods of OAKeyFlexBean and culdnt find anything relevant.
Thanks anyways.
But did u try $RO$.I tried it once...Dint work..
Cheers
Jujaar
report abuse
vote down
vote up
Display DFF in OAF
written by Sheena , October 30, 2008
written by Sheena , October 30, 2008
Hi Senthil
Thanks for your response. My only issue is that the DFF does not display on the page and there is an error but no description on what the error is!
The page is fine as long as the flex item type is not created on the page. The minute I add it, the other items show on the page and there is an 'Error' on the top of the page and the DFF does not show. I followed the steps as per the the OA Developers Guide.
I am trying to display the organization DFF from HR and using Jeveloper 9i. Any insight will be appreciated!
Thanks
Sheena
Votes: +0
Thanks for your response. My only issue is that the DFF does not display on the page and there is an error but no description on what the error is!
The page is fine as long as the flex item type is not created on the page. The minute I add it, the other items show on the page and there is an 'Error' on the top of the page and the DFF does not show. I followed the steps as per the the OA Developers Guide.
I am trying to display the organization DFF from HR and using Jeveloper 9i. Any insight will be appreciated!
Thanks
Sheena
report abuse
vote down
vote up
...
written by Sheena , October 31, 2008
written by Sheena , October 31, 2008
Thanks Senthil for offering to help.
Here is the code from the PG.xml file:
********************
-
-
-
-
-
-
-
-
-
-
-
****************
The code from CO's process request method:
********************
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
System.out.println("in process request1");
String org = pageContext.getParameter("orgName");
OAApplicationModule am = pageContext.getApplicationModule(webBean);
System.out.println("in process request1");
am.invokeMethod("initDetails");
System.out.println("in process req"+org);
}
*******************************
Votes: +0
Here is the code from the PG.xml file:
********************
-
-
-
-
-
-
-
-
-
-
-
****************
The code from CO's process request method:
********************
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
System.out.println("in process request1");
String org = pageContext.getParameter("orgName");
OAApplicationModule am = pageContext.getApplicationModule(webBean);
System.out.println("in process request1");
am.invokeMethod("initDetails");
System.out.println("in process req"+org);
}
*******************************
report abuse
vote down
vote up
...
written by Sheena , October 31, 2008
written by Sheena , October 31, 2008
Senthil,
Once I migrated the code to apps, the page works fine, within jdeveloper it did not.
Thanks !
Sheena
Votes: +0
Once I migrated the code to apps, the page works fine, within jdeveloper it did not.
Thanks !
Sheena
report abuse
vote down
vote up
set valules for key flex segments on an event
written by imran , November 30, 2008
written by imran , November 30, 2008
Hi Senthil,
I am facing an issue regarding keyflexfield , i want to set values for key flex segments upon a lov select event. I have tried almost every relavant method in flexj.keyflexfield.
Interesting fact is if i use setCCId(int), the description shows up but the segment value doesn't appear. I even tried setStorage,setValue,setDisplay for segment, but no help
please suggest/advice. ur help will be highly appreciated.
Thanks,
Imran
Votes: +0
I am facing an issue regarding keyflexfield , i want to set values for key flex segments upon a lov select event. I have tried almost every relavant method in flexj.keyflexfield.
Interesting fact is if i use setCCId(int), the description shows up but the segment value doesn't appear. I even tried setStorage,setValue,setDisplay for segment, but no help
please suggest/advice. ur help will be highly appreciated.
Thanks,
Imran
report abuse
vote down
vote up
...
written by kishor nagbhire , December 09, 2008
written by kishor nagbhire , December 09, 2008
hi SHIVA
i'm a new user of ur site
can u help me on that topic
i want record in GL
'''''' undefined accounting periods in the current accounting calendar '''''''''''
help me
thanks
Votes: +0
i'm a new user of ur site
can u help me on that topic
i want record in GL
'''''' undefined accounting periods in the current accounting calendar '''''''''''
help me
thanks
report abuse
vote down
vote up
Steps to Create a OAF page with KFF
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , March 05, 2009
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , March 05, 2009
Hi Senthilkumar Shanmugam,
Hope u r fine. I followed the Steps to Create a OAF page with KFF as said by u. I am getting the following errror :
java.lang.NullPointerException
at oracle.apps.ak.sampleworks.webui.SampleWorkPGCO.processRequest(SampleWorkPGCO.java:37)
The code in line 37 as per the error is
CCIDl**enabledKFF.useCodeCombinationLOV(true);
Please help me to solve the error.
Votes: +0
Hope u r fine. I followed the Steps to Create a OAF page with KFF as said by u. I am getting the following errror :
java.lang.NullPointerException
at oracle.apps.ak.sampleworks.webui.SampleWorkPGCO.processRequest(SampleWorkPGCO.java:37)
The code in line 37 as per the error is
CCIDl**enabledKFF.useCodeCombinationLOV(true);
Please help me to solve the error.
report abuse
vote down
vote up
Re : Hi, I guess, your program was not able to get handle to the KFF "CCIDl**enabledKFF". Can you please check if the KFF name is correct?
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , March 05, 2009
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , March 05, 2009
Hi this is Jegan. Thanks for u r reply. Where to give the KFF name. U have not mentioned in the steps.
Votes: +0
report abuse
vote down
vote up
Re : Hi, Kindly refer to the folloeing Code Snippet in my article.
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , March 05, 2009
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , March 05, 2009
Can u please give u r gmail id.
In the query to handle to the first item the query u gave is
OAKeyFlexBean CCIDl**enabledKFF = (OAKeyFlexBean)webBean.findIndexedChildRecursive("item3");
My item name is item1. So i changed as
OAKeyFlexBean CCIDl**enabledKFF = (OAKeyFlexBean)webBean.findIndexedChildRecursive("item1");
Now i am getting the following error :
java.lang.ClassCastException: oracle.apps.fnd.framework.webui.beans.OADescriptiveFlexBean
at oracle.apps.ak.sampleworks.webui.SampleWorkPGCO.processRequest(SampleWorkPGCO.java:35)
Please help me.
Votes: +0
In the query to handle to the first item the query u gave is
OAKeyFlexBean CCIDl**enabledKFF = (OAKeyFlexBean)webBean.findIndexedChildRecursive("item3");
My item name is item1. So i changed as
OAKeyFlexBean CCIDl**enabledKFF = (OAKeyFlexBean)webBean.findIndexedChildRecursive("item1");
Now i am getting the following error :
java.lang.ClassCastException: oracle.apps.fnd.framework.webui.beans.OADescriptiveFlexBean
at oracle.apps.ak.sampleworks.webui.SampleWorkPGCO.processRequest(SampleWorkPGCO.java:35)
Please help me.
report abuse
vote down
vote up
...
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , March 05, 2009
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , March 05, 2009
K thanks a lot Senthil.
Votes: +0
report abuse
vote down
vote up
Error
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , March 05, 2009
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , March 05, 2009
Hi senthil,
After the page gets opened the following error occurs :
Error
Flexfield routine KeyFlexfieldDefinitionFactory.createDefinition cannot find flexfield definition for application , and code .
Flexfield routine KeyFlexfieldDefinitionFactory.createDefinition cannot find flexfield definition for application , and code GL#.
Votes: +0
After the page gets opened the following error occurs :
Error
Flexfield routine KeyFlexfieldDefinitionFactory.createDefinition cannot find flexfield definition for application , and code .
Flexfield routine KeyFlexfieldDefinitionFactory.createDefinition cannot find flexfield definition for application , and code GL#.
report abuse
vote down
vote up
...
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , March 05, 2009
written by This e-mail address is being protected from spambots. You need JavaScript enabled to view it , March 05, 2009
I created two Items and changed the Item Style as flex.
I have set the View Instance property as GLCodeCombinationsVO1.
My code is :
/ *====================================================== =====================+
| Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+====================================================== =====================+
| HISTORY |
+====================================================== =====================*/
package oracle.apps.ak.sampleworks.webui;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAKeyFlexBean;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
/**
* Controller for ...
*/
public class SampleWorkPGCO extends OAControllerImpl
{
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "pa;ckagename%");
/**
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
//Get the handle to the first item
OAKeyFlexBean CCIDl**enabledKFF = (OAKeyFlexBean)webBean.findIndexedChildRecursive("item1");
//Set the KFF item property to have a concatenated segment display.
CCIDl**enabledKFF.useCodeCombinationLOV(true);
//Set the KFF Name
CCIDl**enabledKFF.setAttributeValue(FLEXFIELD_NAME, "GL#");
//Set the KFF Structure
CCIDl**enabledKFF.setStructureCode("XXX_ACCOUNTING_FLEXFIELD");
//Set the VO attribute name to the item
CCIDl**enabledKFF.setCCIDAttributeName("CodeCombinationId");
CCIDl**enabledKFF.mergeSegmentsWithParent(pageContext);
OAKeyFlexBean CCIDlovDisabledKFF =
(OAKeyFlexBean)webBean.findIndexedChildRecursive("item2");
//Set the KFF item property to have a distinct segment display
CCIDlovDisabledKFF.useCodeCombinationLOV(false);
CCIDlovDisabledKFF.setAttributeValue(FLEXFIELD_NAME, "GL#");
CCIDlovDisabledKFF.setStructureCode("XXX_ACCOUNTING_FLEXFIELD");
CCIDlovDisabledKFF.setCCIDAttributeName("CodeCombinationId");
CCIDlovDisabledKFF.mergeSegmentsWithParent(pageContext);
//Execute the Query so that we will have some data in VO while we run the page.
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject sampleViewObject =
(OAViewObject)am.findViewObject("GLCodeCombinationsVO1");
sampleViewObject.executeQuery();
}
/**
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
}
}
Votes: +0
I have set the View Instance property as GLCodeCombinationsVO1.
My code is :
/ *====================================================== =====================+
| Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+====================================================== =====================+
| HISTORY |
+====================================================== =====================*/
package oracle.apps.ak.sampleworks.webui;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAKeyFlexBean;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
/**
* Controller for ...
*/
public class SampleWorkPGCO extends OAControllerImpl
{
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "pa;ckagename%");
/**
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
//Get the handle to the first item
OAKeyFlexBean CCIDl**enabledKFF = (OAKeyFlexBean)webBean.findIndexedChildRecursive("item1");
//Set the KFF item property to have a concatenated segment display.
CCIDl**enabledKFF.useCodeCombinationLOV(true);
//Set the KFF Name
CCIDl**enabledKFF.setAttributeValue(FLEXFIELD_NAME, "GL#");
//Set the KFF Structure
CCIDl**enabledKFF.setStructureCode("XXX_ACCOUNTING_FLEXFIELD");
//Set the VO attribute name to the item
CCIDl**enabledKFF.setCCIDAttributeName("CodeCombinationId");
CCIDl**enabledKFF.mergeSegmentsWithParent(pageContext);
OAKeyFlexBean CCIDlovDisabledKFF =
(OAKeyFlexBean)webBean.findIndexedChildRecursive("item2");
//Set the KFF item property to have a distinct segment display
CCIDlovDisabledKFF.useCodeCombinationLOV(false);
CCIDlovDisabledKFF.setAttributeValue(FLEXFIELD_NAME, "GL#");
CCIDlovDisabledKFF.setStructureCode("XXX_ACCOUNTING_FLEXFIELD");
CCIDlovDisabledKFF.setCCIDAttributeName("CodeCombinationId");
CCIDlovDisabledKFF.mergeSegmentsWithParent(pageContext);
//Execute the Query so that we will have some data in VO while we run the page.
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject sampleViewObject =
(OAViewObject)am.findViewObject("GLCodeCombinationsVO1");
sampleViewObject.executeQuery();
}
/**
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
}
}
report abuse
vote down
vote up
...
written by sachin , July 14, 2009
written by sachin , July 14, 2009
hi jegnathan
i was getting a similar error. However when you define item1 and item2 and change the 'item style' to 'flex', the default value for 'type' in section 'Flexfields' of properties is set to 'descriptive'. you need to change this value to 'key'.
senthil - however when i do the above, the page renders, but i get the error message:
Error
Flex VO () of flex bean (item2) is null.
Flex VO () of flex bean (item1) is null.
could you please help me out.
thanks
sachin
Votes: +0
i was getting a similar error. However when you define item1 and item2 and change the 'item style' to 'flex', the default value for 'type' in section 'Flexfields' of properties is set to 'descriptive'. you need to change this value to 'key'.
senthil - however when i do the above, the page renders, but i get the error message:
Error
Flex VO () of flex bean (item2) is null.
Flex VO () of flex bean (item1) is null.
could you please help me out.
thanks
sachin
report abuse
vote down
vote up
...
written by sachin , July 15, 2009
written by sachin , July 15, 2009
Hi Senthil
Yes ... the FlexVO is attached to the AM.
yes am able to get the handle to FlexVO in the controller code.
Regards
sachin
Votes: +0
Yes ... the FlexVO is attached to the AM.
yes am able to get the handle to FlexVO in the controller code.
Regards
sachin
report abuse
vote down
vote up
Varchar2 Formatter
written by adi , November 19, 2009
written by adi , November 19, 2009
Hi Anil,
I have a varchar2 column in a VO. This field will store the credit limit of a customer. I want to display this column in a formatted manner.
like if the column value is 10000 , i want to dispaly it as 10,0000 . I have seen few threads it seems it is not possible to formatte a varchar2 column.
Can u suggest me to overcome this issue
Votes: +0
I have a varchar2 column in a VO. This field will store the credit limit of a customer. I want to display this column in a formatted manner.
like if the column value is 10000 , i want to dispaly it as 10,0000 . I have seen few threads it seems it is not possible to formatte a varchar2 column.
Can u suggest me to overcome this issue
report abuse
vote down
vote up
...
written by adi , November 19, 2009
written by adi , November 19, 2009
Hi Senthil,
I have tried the above befor. the above is right aliging the attribute, but not displaying in the requried format.
Votes: +0
I have tried the above befor. the above is right aliging the attribute, but not displaying in the requried format.
report abuse
vote down
vote up
...
written by Kamleshwar Chopra , November 24, 2009
written by Kamleshwar Chopra , November 24, 2009
SQL mentioned in the VO - select code_combination_id from gl_code_combinations_kfv
will really hit a performance in a prod env since you are not using any CHART_OF_ACCOUNTS_ID filter here.
Plus try to replace the SQL with - select 1 from dual and try, your KFF will still work.
Votes: +0
will really hit a performance in a prod env since you are not using any CHART_OF_ACCOUNTS_ID filter here.
Plus try to replace the SQL with - select 1 from dual and try, your KFF will still work.
report abuse
vote down
vote up
DFFs not displayed on the page initially,but displays if I navigate to personalize page and return
written by Kashyapar , November 25, 2009
written by Kashyapar , November 25, 2009
Hi,
We have extended a VO on the view invoices page in iSupplier to add the flexfield related fields, i.e. attribute_category and atrribute1-15. A flex item is created on the page.But the flefield details are not displayed when the invoice is searched.after the invoice serach if I navigate to the personalization page , using the personalize page link and return to the page without doing anything, the DFFs are displayed. Can you olease suggest what could be the problem.
Thanks
Kashyap
Votes: +0
We have extended a VO on the view invoices page in iSupplier to add the flexfield related fields, i.e. attribute_category and atrribute1-15. A flex item is created on the page.But the flefield details are not displayed when the invoice is searched.after the invoice serach if I navigate to the personalization page , using the personalize page link and return to the page without doing anything, the DFFs are displayed. Can you olease suggest what could be the problem.
Thanks
Kashyap
report abuse
vote down
vote up
...
written by Kamleshwar Chopra , November 26, 2009
written by Kamleshwar Chopra , November 26, 2009
Hey Senthil,
I hope you still remember me....
Anyways just replace the KFF VO query with -> "SELECT 1 FROM DUAL" and keep rest all coding as it is and try.
Cheers,
Kamleshwar Chopra
Votes: +0
I hope you still remember me....
Anyways just replace the KFF VO query with -> "SELECT 1 FROM DUAL" and keep rest all coding as it is and try.
Cheers,
Kamleshwar Chopra
report abuse
vote down
vote up
Set default value to KFF segment dynamically
written by Manoharan , November 27, 2010
written by Manoharan , November 27, 2010
Hi Senthil,
you said to Gomathi,
//Hi Gomathy,
You can set the Default value using the following API oracle.apps.fnd.flexj.Segment.setDisplay() / setValue()
//
But, how can i use it in forms request.... my requirement is, I want to set the default value to the KFF segment1 from other field.... Is it possible ??
My page is classic table based (row by row)
Please advise... It would be great if you can send any piece of code.
Votes: +0
you said to Gomathi,
//Hi Gomathy,
You can set the Default value using the following API oracle.apps.fnd.flexj.Segment.setDisplay() / setValue()
//
But, how can i use it in forms request.... my requirement is, I want to set the default value to the KFF segment1 from other field.... Is it possible ??
My page is classic table based (row by row)
Please advise... It would be great if you can send any piece of code.
report abuse
vote down
vote up
Is there any way to achive DFF alignment in OAF pages?
written by Padmaja , November 30, 2010
written by Padmaja , November 30, 2010
Hi,
I have requirement where I need to add DFF to delivered Oracle application.
But the issue I am facing is when I add this DFF it is left aligned. Is there a any way I can arrange the field in central?
Thanks in advance
Votes: +0
I have requirement where I need to add DFF to delivered Oracle application.
But the issue I am facing is when I add this DFF it is left aligned. Is there a any way I can arrange the field in central?
Thanks in advance
report abuse
vote down
vote up
Item Category KFF
written by DurgarajuK , June 07, 2011
written by DurgarajuK , June 07, 2011
Hi Senthil ,
Hi,
I am new to OAF development. I am developing new OAF page and my requirement is to add Item Category KFF to OAF page. Can you help on this?
Thanks in Advance.
Raju
Votes: +0
Hi,
I am new to OAF development. I am developing new OAF page and my requirement is to add Item Category KFF to OAF page. Can you help on this?
Thanks in Advance.
Raju
report abuse
vote down
vote up
...
written by ankurmdh , June 13, 2011
written by ankurmdh , June 13, 2011
Hi Senthil
I am writing code to display key flex field, I have done the part as per you screenshot 1 but I am stuck on how to display Flex for individual segment(in my case Cost Center).
I search and found that we need to define property in particular format. like SturctureCode|Cost Center in our Item properties.
It is so, how do I need to derive cost center using some pre defined flex methods or only change in Property will work.
Thanks
Ankur
Votes: +0
I am writing code to display key flex field, I have done the part as per you screenshot 1 but I am stuck on how to display Flex for individual segment(in my case Cost Center).
I search and found that we need to define property in particular format. like SturctureCode|Cost Center in our Item properties.
It is so, how do I need to derive cost center using some pre defined flex methods or only change in Property will work.
Thanks
Ankur
report abuse
vote down
vote up
...
written by Rakesh , August 21, 2011
written by Rakesh , August 21, 2011
Hi,
How to make a KFF segment in SIT readonly from form level. Please help me out, if you have a solution.
Votes: +0
How to make a KFF segment in SIT readonly from form level. Please help me out, if you have a solution.
report abuse
vote down
vote up
override the segement value
written by g.ranjith , September 09, 2011
written by g.ranjith , September 09, 2011
hi Senthil,
hot to override segements values in key flex fields.
i am using the following code
for(int l = 0; l < keyflexfield.getSegmentCount(); l++)
{
keyflexfield.setDynamicInsertion(true);
Segment segment = keyflexfield.getSegment(l);
if(oapagecontext.isLoggingEnabled(1))
{
oapagecontext.writeDiagnostics(this, "####### segment.getInputValue()-->" + segment.getInputValue(), 1);
oapagecontext.writeDiagnostics(this, "####### segment.getInputValue()-->" + segment.getValue(), 1);
}
try
{
segment.setDisplayed(true);
segment.setValue("00");
segment.setDisplay("00");
segment.setStorage("00");
continue;
}
catch(Exception e)
{
if(oapagecontext.isLoggingEnabled(1))
{
oapagecontext.writeDiagnostics(this, "####### exception)-->" + e, 1);
}
}
}
colud you please give the solution.
Votes: +0
hot to override segements values in key flex fields.
i am using the following code
for(int l = 0; l < keyflexfield.getSegmentCount(); l++)
{
keyflexfield.setDynamicInsertion(true);
Segment segment = keyflexfield.getSegment(l);
if(oapagecontext.isLoggingEnabled(1))
{
oapagecontext.writeDiagnostics(this, "####### segment.getInputValue()-->" + segment.getInputValue(), 1);
oapagecontext.writeDiagnostics(this, "####### segment.getInputValue()-->" + segment.getValue(), 1);
}
try
{
segment.setDisplayed(true);
segment.setValue("00");
segment.setDisplay("00");
segment.setStorage("00");
continue;
}
catch(Exception e)
{
if(oapagecontext.isLoggingEnabled(1))
{
oapagecontext.writeDiagnostics(this, "####### exception)-->" + e, 1);
}
}
}
colud you please give the solution.
report abuse
vote down
vote up
...
written by sree0410 , April 04, 2012
written by sree0410 , April 04, 2012
Hello,
how can we implement same on a standard self-serice page. I mean i have a requirment like need to invoke the key flexfield from a segment of DFF.
how to do this. I have added the DFF already to OAF page. but no idea how to attach key flex field to segment of that DFF. Any help is highly appreciated.
Votes: +0
how can we implement same on a standard self-serice page. I mean i have a requirment like need to invoke the key flexfield from a segment of DFF.
how to do this. I have added the DFF already to OAF page. but no idea how to attach key flex field to segment of that DFF. Any help is highly appreciated.
report abuse
vote down
vote up
Getting error in KFF
written by swati2012 , August 16, 2012
written by swati2012 , August 16, 2012
I’m trying to add a KFF field in one of the pages.
I’ve set the properties like as below:
Item Style: Flex
Application Short Name: SQLGL
Name: GL#
Type: Key
VO created:
Name: GLCodeCombinationsVO
Query: SELECT CODE_COMBINATION_ID FROM GL_CODE_COMBINATIONS_KFV
Code Added in CO Process Request:
OAKeyFlexBean KFFBean = (OAKeyFlexBean)webBean.findIndexedChildRecursive("mbcDefDistr");
KFFBean.useCodeCombinationLOV(true);
KFFBean.setAttributeValue(FLEXFIELD_NAME, "GL#");
KFFBean.setStructureCode("XX_MBC");
KFFBean.setCCIDAttributeName("CodeCombinationId");
KFFBean.mergeSegmentsWithParent(pageContext);
OAViewObject sampleViewObject = (OAViewObject)am.findViewObject("GLCodeCombinationsVO1");
sampleViewObject.executeQuery();
but when this page is loading, following error is coming, I looked for the same in google and metalink, but the suggestions mentioned over there are not working, can you please give any suggestion on this:
The data that defines the flexfield on this field may be inconsistent. Inform your system administrator that the function: KeyFlexfieldDefinitionFactory.getStructureNumber could not find the structure definition for the flexfield specified by Application = SQLGL, Code = GL# and Structure number =
Votes: +0
I’ve set the properties like as below:
Item Style: Flex
Application Short Name: SQLGL
Name: GL#
Type: Key
VO created:
Name: GLCodeCombinationsVO
Query: SELECT CODE_COMBINATION_ID FROM GL_CODE_COMBINATIONS_KFV
Code Added in CO Process Request:
OAKeyFlexBean KFFBean = (OAKeyFlexBean)webBean.findIndexedChildRecursive("mbcDefDistr");
KFFBean.useCodeCombinationLOV(true);
KFFBean.setAttributeValue(FLEXFIELD_NAME, "GL#");
KFFBean.setStructureCode("XX_MBC");
KFFBean.setCCIDAttributeName("CodeCombinationId");
KFFBean.mergeSegmentsWithParent(pageContext);
OAViewObject sampleViewObject = (OAViewObject)am.findViewObject("GLCodeCombinationsVO1");
sampleViewObject.executeQuery();
but when this page is loading, following error is coming, I looked for the same in google and metalink, but the suggestions mentioned over there are not working, can you please give any suggestion on this:
The data that defines the flexfield on this field may be inconsistent. Inform your system administrator that the function: KeyFlexfieldDefinitionFactory.getStructureNumber could not find the structure definition for the flexfield specified by Application = SQLGL, Code = GL# and Structure number =
report abuse
vote down
vote up
Who to hide VendorNum (Segmen1) on Suppliers OAF Page
written by Norbert , October 26, 2012
written by Norbert , October 26, 2012
Hi guys!
I'm trying to hide the numSupp field on Suppliers OAF Page, because I have a custom controller that take the vat_registration_num and put in numSupp(segment1 in ap_suppliers table).
I getting the error: Invalid value: SEGMENT1 is null.
Please, I need some suggestion!
Regards and thanks!
Votes: +0
I'm trying to hide the numSupp field on Suppliers OAF Page, because I have a custom controller that take the vat_registration_num and put in numSupp(segment1 in ap_suppliers table).
I getting the error: Invalid value: SEGMENT1 is null.
Please, I need some suggestion!
Regards and thanks!
report abuse
vote down
vote up








Hope you remember me, I am from KCT (mechatronics). Thats a nice article, please mail me I would like to have soem doubts clarified on OAF front.
Bye.
TC