Tuesday, June 19, 2012

Creation of dependent pick list or poplist

 Creation fo dependent pick list or poplist

D:\oracle\visappl\fnd\11.5.0\secure\myprojects





]
Creation of BC4J







Creation of AM



Next next

Finish it



Save it and create page






Rebuild page
Run it



Creation of vo


Write  query





Create another vo for polines


select po_header_id,
       po_line_id,
       line_num
       from po_lines_all





Creation of pick list by using items


dependenPick.oracle.apps.po.mgmt.picklist.server.poheadersVO



dependenPick.oracle.apps.po.mgmt.picklist.server.polinesVO











Creation of new controller







Attach vo to am only polinevo



Go to controller.java and write the following code

import dependenPick.oracle.apps.po.mgmt.picklist.server.dependentpickAMImpl;

public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
 {
   super.processFormRequest(pageContext, webBean);
   dependentpickAMImpl obj=(dependentpickAMImpl) pageContext.getApplicationModule(webBean);
   
   if("POLineidevent".equals(pageContext.getParameter(EVENT_PARAM)))
   {
     System.out.println("SAmple");
     
     String pohid=pageContext.getParameter("poheader");
     System.out.println("poheaderid"+pohid);
     obj.XXHndleLines(pohid);      
   }
 }


And writge the code in the AM class file


public void XXHndleLines(String pohid)
 {
   polinesVOImpl vos=getpolinesVO();
   vos.setWhereClause("po_header_id='"+pohid+"'");
   vos.executeQuery();
 }

Change the some properties for dependent lov where when 1st val changes then automatically changes the 2nd value

In poheaders item the following properties are final modifications










Similarly in the polines also



Save it and run the page







Here we can create some defaultdouble region and develop the items below





Creation of items like poheader and poline under region of defaultdouble column














2 comments:

  1. I Appreciate your Post and you can use my solution as well

    Step 1
    ======

    Create Dept_Pop_VO having Following SQL

    Select Deptno,Deptno
    from Dept

    Step 2
    ======

    Create Emp_Pop_VO having Following SQL

    Select Empno,Empno,Deptno
    from Emp


    Step 3
    ======

    Assign Emp_Pop_VO to your page's Associated AM


    Step 4
    ======

    Create messageChoicBean Namely Dept_PopList and Assign Following Properties

    Picklist View Defination: oracle.apps.(your Dept_Pop_VO path).Dept_Pop_VO
    Picklist Display Attribute: Deptno
    Picklist Value Attribute: Deptno

    Step 5
    ======

    Create messageChoicBean Namely Emp_PopList and Assign Following Properties

    Picklist View Instance: Emp_Pop_VO1
    Picklist Display Attribute: Empno
    Picklist Value Attribute: Empno


    Step 6
    ======

    Create PPR on Dept_PopList

    Step 7
    ======

    in ProcessFormRequest On Specified PPR get the value of Dept_PopList i.e Deptno in a variable i.e var_Deptno

    Step 8
    ======

    set where clause of Emp_Pop_VO like this

    OAViewObject var_vo = (OAViewObject) am.findViewObject("Emp_Pop_VO1");
    var_vo.setwhereClause("Deptno = " + var_Deptno);
    var_vo.executeQuery();

    ReplyDelete