Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Sunday, March 20, 2016

How to call DB Packages through Callable Statements Registering the out Parameters in OAF


Code Written After Process Form Request:-

public void populateProfiles( OAPageContext pageContext
                            , OAWebBean webBean
                            , String v_FinancialYear
                            , String v_demandType
                            , String V_HeaderID
                            , String v_TransCurr
                            , String v_demandIn
                            , String Fundtype
                            , String ReportCurr
                            , String Qtr
                            )
{
   try
   {
        OAApplicationModule am = pageContext.getApplicationModule(webBean);
        OADBTransaction txn = am.getOADBTransaction();
        // OAViewObject vh = (OAViewObject)am.findViewObject("bgtCompProcessVO1");
       
        CallableStatement cs = null;
        cs = txn.createCallableStatement("begin XXAA_PROCESS_PKG.XXAA_COMP_PROCEED (:1,:2,:3,:4,:5,:6,:7,:8,:9); END;", 0);
       
        cs.setString(1, v_FinancialYear);
        System.out.println("v_FinancialYear:"+v_FinancialYear);
       
        cs.setString(2, v_demandType);
        System.out.println("v_demandType:"+v_demandType);                
       
        cs.setString(3, V_HeaderID);
        System.out.println("V_HeaderID:"+V_HeaderID);
       
        cs.setString(4, v_TransCurr);
        System.out.println("v_TransCurr:"+v_TransCurr);
       
        cs.setString(5, v_demandIn);
        System.out.println("v_demandIn:"+v_demandIn);
       
        cs.setString(6,Fundtype);
        System.out.println("Fundtype:"+Fundtype);
       
        cs.setString(8,ReportCurr);
        System.out.println("ReportCurr:"+ReportCurr);
       
        cs.setString(9,Qtr);
        System.out.println("Qtr:"+Qtr);
       
        cs.registerOutParameter(7, Types.VARCHAR);
        cs.execute();
       
         p_docno = cs.getString(7);
   
        System.out.println("Flag populate: " + p_docno);
     
    }
   
    catch (SQLException sqle)
    {
        sqle.printStackTrace();
    } //End Catch
 
 }



No comments:

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect