KFF in OAF Page-Gyan

download KFF in OAF Page-Gyan

of 4

Transcript of KFF in OAF Page-Gyan

  • 8/7/2019 KFF in OAF Page-Gyan

    1/4

    Key FlexField in Oracle Application Pages

    1

    This article will be useful for creating a key Flex Field in OAF Pages. Step by Step explanation with the

    screenshots will be shown.

    Step 1 Create a Item of type FLEX under a Region Layout(Stack Layout RN)

    Step 2 Create a VO with following Query..

    VO Name GLCodeCombinationsVO

    Query - SELECT CODE_COMBINATION_ID FROM GL_CODE_COMBINATIONS_KFV

    SELECT fif.concatenated_segs_view_name, fif.ID_FLEX_CODE,

    fav.application_short_name

    FROM fnd_id_flexs fif, fnd_application_vl fav

    WHERE fif.id_flex_code ='GL#'AND fif.application_id = fav.application_id

    Step 3 set the property in the Property Inspector as

    View Instance GLCodeCombinationsVO1

    Application Short Name SQLGL

    Name GL#

    Type Key

    Item of type Flex

  • 8/7/2019 KFF in OAF Page-Gyan

    2/4

    Key FlexField in Oracle Application Pages

    2

    Step 3 Placing the below code to the CO.

    Put the below code in the Process Request of CO attached with the KFF

    import oracle.apps.fnd.framework.webui.beans.OAKeyFlexBean;

    OAKeyFlexBean KFFBean = (OAKeyFlexBean)webBean.findIndexedChildRecursive("KFF");

    KFFBean.useCodeCombinationLOV(true);

    //Set the KFF Structure

    KFFBean.setStructureCode("ARGENTINA_ACCOUNTING_FLEX");

    //Set the VO attribute name to the item

    KFFBean.setCCIDAttributeName("CodeCombinationId");

    CCIDlovEnabledKFF.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 4 Run the Page.

  • 8/7/2019 KFF in OAF Page-Gyan

    3/4

    Key FlexField in Oracle Application Pages

    3

    OAKeyFlexBean.useCodeCombinationLOV (boolean false);

    Key Flexfield Segment List : - There are situation where you need to show only few segments.

  • 8/7/2019 KFF in OAF Page-Gyan

    4/4

    Key FlexField in Oracle Application Pages

    4

    Set the Segment List in the below format in the property inspector of the flex bean. If you leave this

    property empty, all segments are rendered.

    The format is: structure code1|segment1's name|segment2's name...||structure code2|segment4's

    name|segment5' name... Segments within a certain structure code are separated by a single pipe, "|",

    while data from a different structure codes is separated by a double pipe, "||".

    The example below lists segments for just one structure code:

    ARGENTINA_ACCOUNTING_FLEX|Company|Department|Account|Sub-Account

    Read-Only Segments

    You can add the read-only token ($RO$) after any of the segments in the list. For example, the ($RO$)

    designator below sets Segment1 in structure code 1 to be read-only: Structure

    code1|Segment1($RO$)|Segment2...

    The example below lists segments for just one structure code:

    ARGENTINA_ACCOUNTING_FLEX|Company($RO$)