简体   繁体   中英

Ebs Procedure call from Adf

Hi I am trying to call an ebs procedure from adf application. The procedure takes 3 input parameter and returns 2 o/p. but when I execute cs.executeUpdate() it shows an error Missing IN or OUT parameter at index::6 Could anyone please help me to find it out?

HelperMethod( written in AppModuleImpl)

    public String getEmployeeName(String username, String password) {
    CallableStatement cs = null;
    try {
        cs =
            getDBTransaction().createCallableStatement("begin ? :=APPS.XX_IE_ENTER_DELEGATION.oie_enter_delegation(?,?,?,?,?); end;",
                                                       0);
        cs.setString(1, username);
        cs.setString(2, password);
        cs.setString(3, "31442");
        cs.registerOutParameter(4, Types.INTEGER);
        cs.registerOutParameter(5, Types.VARCHAR);
        cs.execute(); // **Getting Error**
        cs.close(); 
        return cs.getString(3);
    } catch (SQLException e) {
        throw new JboException(e);
    }
}

Button ActionListener

    public void getFromEbs(ActionEvent actionEvent) {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("getEmployeeName");
    Object result = operationBinding.execute();
    System.out.println("Result= " + result); // result will be the output of PL function
}

Since you have added "begin ? := APPS.XX" to the beginning of the statement, it means that you are calling a function and waiting a result from it.

If you are trying to call a procedure instead of a function as you said, you should change it to "begin APPS.XX" .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM