Key
Flex Field(KFF) in OAF
Now
we are going to learn about how to call the KFF in OAF.
The
below query will give the required information about flex field.
SELECT fif.application_id,
fif.id_flex_code,
fif.id_flex_name,
fif.application_table_name,
fif.description,
fifs.id_flex_num,
fifs.id_flex_structure_code,
fifse.segment_name,
fifse.segment_num,
fifse.flex_value_set_id
FROM fnd_id_flexs fif,
fnd_id_flex_structures fifs,
fnd_id_flex_segments fifse
WHERE fif.application_id = fifs.application_id
AND fif.id_flex_code = fifs.id_flex_code
AND fifse.application_id = fif.application_id
AND fifse.id_flex_code = fif.id_flex_code
AND fifse.id_flex_num = fifs.id_flex_num
AND fif.id_flex_code LIKE 'GL#'
AND fif.id_flex_name LIKE 'Accounting Flexfield';
Step1: -
Create a work space and project with the package
sangu.oracle.apps.po.KFFPrj
Step2: -
Create an Application Module.
Name: - KFFAM
Package: - sangu.oracle.apps.po.KFFPrj.server
Step3:-
Create a view object.
Name: - KFFVO
Package: - sangu.oracle.apps.po.KFFPrj.server
Query: - SELECT code_combination_id
FROM gl_code_combinations_kfv
Note: -
Generate the java files.
Step4: -
Attach the VO to AM.
Step5: -
Create new page.
Name: - KFFPG
Package: - sangu.oracle.apps.po.KFFPrj.webui
Step6:-
Attach the AM to the Page Layout Region of a page.
Give the window title and title.
Step7: -
Create new Stack Layout Region Under Page Layout Region
Step8: -
Create new item of type Flex under Stack
Layout Region.
And set the below properties.
ID: - KffItem
Prompt: - KFF
View Instance: - KFFVO1
Application Short Name: - SQLGL
Name: - GL#
Type: - Key
Step9:-
Create a controller for the page.
Right click on pageLayout region== > set
new controller.
Name: - KFFCO
Package: - sangu.oracle.apps.po.KFFPrj.webui
Step10:
-
Write Following Code in KFFCO
processRequest
/*
For Copy Paste */
public
void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
OAKeyFlexBean kffBean =
(OAKeyFlexBean)webBean.findIndexedChildRecursive("KffItem");
if(kffBean != null)
{
//
Set the code combination lov
kffBean.useCodeCombinationLOV(true);
//set
the structure code for the item key flex
kffBean.setStructureCode("FED_AFF");
//Set
the attribute name to the item
kffBean.setCCIDAttributeName("CodeCombinationId");
//Execute
the Query
KFFAMImpl
am = (KFFAMImpl)pageContext.getApplicationModule(webBean);
KFFVOImpl
vo = (KFFVOImpl)am.findViewObject("KFFVO1");
if(!vo.isPreparedForExecution())
{
vo.executeQuery();
}
}
}
Step11:-
This finishes the calling kff in OAF run the page to see the output.
how to apply this method in Custom Web ADI ... please share if u can .. thnks
ReplyDeleteI am trying to assign a value to a LOV in a stacked layout within a page. I am getting an error. Do you have any hints how I can achieve that?
ReplyDelete