To invoke a stored procedure from within an entity object or an application module, you need to follow the steps below:
1. Create a JDBC CallableStatement with the PL/SQL block containing the stored procedure invocation
2. Bind any variables.
3. Execute the statement.
4. Optionally retrieve the values of any OUT parameters.
5. Close the statement.
Example:
import java.sql.CallableStatement;
import java.sql.SQLException;
import java.sql.Types;
import oracle.apps.fnd.framework.server.OADBTransactionImpl;
String outParamValue = null;
OADBTransaction txn = getDBTransaction();
CallableStatement cs = txn.createCallableStatement("begin xx_pkg.xx_procedure(:1, :2); end;");
{
((OracleCallableStatement)cs.registerOutParameter(2, Types.VARCHAR, 0, 2000);
cs.setString(1, "gyan");
outParamValue = cs.getString(1);
cs.execute();
cs.close();
}
catch (SQLException sqle)
{
cs.close();
}
Some Other Most Useful OAF Tutorials:
- How To Call A Concurrent Program From OA Framework Pages
- How To Change The Header Of An Advance Table Column Dynamically
- How To Create A Submit Button Dynamically In OAF Page
- How To Implement Train In OAF | Implementation Of Train Functionality In OAF
- How To Import Oaf Pages From Unix Server Or Apps server.
- Implement PopList in OA Framework | OAF Tutorials
- Implementation of PPR [Partial Page Rendering] in OAF Page
- OA Framework Interview Questions And Answers - Part1
- VO Extension In OAF | Hiding An Item Conditionally Through SPEL In OAF
Nice information many thanks to the author. It is incomprehensible to me now but in general the usefulness and significance is overwhelming
ReplyDeleteBridal Veil
I will immediately seize your rss as I can't to find your email subscription link or
ReplyDeletenewsletter service. Do you have any? Please let me know so that I could
subscribe. Thanks.