Sunday 5 June 2016

OAF - GL Diistribution DFF field on OAF page

This post will details the steps required for enabling the functionality of GL DFF as below - 



First step, create a field on OAF page with item type as 'Flex' in a table or region. Attributes of this Flex item needs to be set as below - 




Segment List property value need to setup as below - 



** Here ACCOUNTING_FLEXFIELD is the name of the accounting flexfield defined for GL and can be obtained using below query - 

select id_flex_structure_code, id_flex_code from fnd_id_flex_structures where id_flex_code = 'GL#';

Above field is created in a Advanced table. If you are using a normal OAF table then you will need to populate the VO Instance name of the flex item as well.


Second step, which needs to be performed is adding following code in the processRequest method of the Controller java file - 

OAApplicationModule am = pageContext.getApplicationModule(webBean);

OAKeyFlexBean kffId = (OAKeyFlexBean)webBean.findIndexedChildRecursive("AccountCol");

// Set the code combination lov
kffId.useCodeCombinationLOV(true);

// Set the structure code for the item key flex
kffId.setStructureCode("ACCOUNTING_FLEXFIELD");

// Set the attribute name to the item
kffId.setCCIDAttributeName("DistCodeCombinationId");

Performing the above mentioned steps will help meet the requirement of creating and displaying the GL DFF field on an OAF page.

1 comment:

  1. In case of flex item in Advance table, how to attach a VO to it ?

    ReplyDelete