How to call prcedures in OAF

Dear All,
i want to call the backeend procedure from OAF.
For this i wrote the code like this:
String errormsg = "";
System.out.println("the value are"+opportunityid+" "+userid+" "+respid+" "+orgid);
OADBTransaction txn = getOADBTransaction();
CallableStatement cs =
txn.createCallableStatement("begin xxcrm_sales_orders_pkg.xxcrm_cancel_sales_order(:1,:2,:3,:4,:5);end;",1);
try
cs.setString(1, opportunityid);
cs.setInt(2, userid);
cs.setInt(3, respid);
cs.setInt(4, orgid);
cs.registerOutParameter(5,Types.VARCHAR);
cs.execute();
errormsg = cs.getString(5);
cs.close();
System.out.println("the error msg is" + errormsg);
throw new OAException(errormsg);
} catch (Exception e)
if (errormsg != null && !errormsg.equals(""))
throw new OAException(errormsg, OAException.ERROR);
The control goes to this block and procedure.
But the procedure content is not updated in table.
This same procedure i run into Backend like this:
declare
l_errormsg varchar2(1000);
begin
xxcrm_sales_orders_pkg.xxcrm_cancel_sales_order('1179',1170,50722,82,l_errormsg);
dbms_output.put_line('the error msg is'||l_errormsg);
end;
when ever i am calling the procedure from Backend its working fine and update the table contrents.
suppose i am calling from OAF,the procedure is calling but don't update the table contents.
I don't know the exact problem.
Please Give the Gudaince.
Thanks in Advance
Anusha

I think you are missing a commit in your statement. After you execute the procedure try issue a commit like this :
txn.commit
Thanks

Similar Messages

  • How to call webservice from OAF

    Hi,
    I need to call a webservice in one of my custom OAF page. I am very new to OAF and Java and have no idea about how webservice works.
    Does anybody has any example of that, are there any setups I need to perform.
    I will appreciate if someone can share the step by step instruction with some example. I think having some example will really help me understand the process.
    Regards
    Hitesh

    Hitesh,
    Nothing out of the box for calling web services. There were a few discussions in the past and you may find some sample there.
    --Shiv                                                                                                                                                                                                                                                                                                   

  • How to call page in OAF

    Hi,
    I have two pages have to call page 2 from page1,how to do this?
    Jain

    Hi,
    if item is button
    set prpty
    Destinatioin URL="OA.jsp?page=/KP/oracle/apps/xxeis/reporting/EisReportSubmitPG?if item is *submitButton*
    *in co write :*
    if(pageContext.getParameter("Submitbtn")!= null)
    pageContext.setForwardURL("OA.jsp?page=/KP/oracle/apps/xxeis/reporting/EisReportSubmitPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    }Regards
    Meher Irk

  • How to call a jsp page from oaf and run in jDeveloper

    Hi all,
    I created sample jsp and then tried.
    String temp = "sample.jsp?";
    pageContext.setForwardURL(temp,
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    It worked.
    But when i tried with one of the custom page that i downloaded from server it is giving error.
    But now i need to call that page.
    Its Code is given on below link:
    Re: how to call a jsp page from oaf
    Please help me to do this.
    Thanks in advance.
    Regards,
    Raj

    Raj,
    1. Hope you have placed the custom jsp page (which you have downloaded from server) under "jdevhome\jdev\myhtml\OA_HTML" directory ?
    2. Try to run the custom jsp page from Jdeveloper directly and check whether its working properly or not ?
    (i.e. add jsp page to any project in Jdeveloper then right click on jsp page and select Run xxx.jsp)
    3. If page errors out then custom jsp page seems require few parameters to run it successfully. Pass all requied parameters and test.
    4. There is no problem in the way you are calling jsp page from OAF page.
    regards,
    Anand

  • How to call APEX form from OAF

    Hi
    WE upgraded from 11i to R12. In 11i we have Apex Forms hanging off Customer forms. The customer forms in R12 became self service/OAF.
    We now need to figure out how to call the old APEX form from new selfservice Customer form
    Can some one help me with this?
    thank you

    Please review https://blogs.oracle.com/stevenChan/entry/new_whitepaper_extending_e_business which will hopefully answer your questions
    regards
    Mike

  • How to call OAF page from plsql

    Hi OAF Guru's,
    I have a requirement to call a OAF page from a plsql procedure/function, I know how to call procedure/function from OAF pages, but I don't have any idea about how to call a OAF page from plsql.
    Any help is appreciated.
    Thanks in Advance.
    Raja.

    Hi,
    What is your exact requirement. Why do you want to call a OA page from PL/SQL. Please share your requirement clearly.
    HTH,
    Syed.

  • How to call OAF standard page from form by passing parameters?

    Hi,
    I have a requirement where I need to call a standard OAF page from Oracle form, I was able to call the page through personalization, but I also want to pass a parameter to the OAF page and query the OAF page using that parameter, could anyone please help?
    Note: Under the forms personalization I wrote the below code for parameters
    Actions --> Parameters--> ='contractLineId='||:OKS_LINES.ID
    Thanks,
    Bharat

    Hi Niladri,
    My requirement was calling the OAF page from standard form (menu), below are the steps that I followed,
    1) Get the OAF page function name
    2) Personalize the form, by calling the OAF page function
    a) Function Code: Give the OAF function code
    b) Parameter: Here pass the parameters
    example: ='contractLineId='||:OKS_LINES.ID
    Note: If you are calling from a custom form you can also try using fnd_function.execute to call the OAF page
    Thanks,
    Bharat

  • How to call webservice using jdev9i

    Hi gurus and experts,
    i need to consume a webservice using oaf. with great effort finally i created stub using axis s/w.
    now i dont know how to use the stub in jdev.where to write the code and what to write.iam strucked :-( .
    since there were no sample tutorial about how to call webservice from jdev9i, iam struggling to make.iam jus a starter.
    and while googling i came to know that stubs can be created using jdev9i .but when i see new-->webservices--web service stub it is greyed out.
    i have 2 questions now:
    1)if stub created using axis can it be used in jdev9i? if yes ,please tell me how? any tutorial links also helps me.
    2)if the stubs should be created only by jdev9i so that webservices can be called using jdev,then please guide me how to make it.
    i need some helping hands from u guys.
    Thanks a lot
    Edited by: 881533 on Oct 25, 2011 2:34 AM
    Edited by: 881533 on Oct 25, 2011 2:37 AM

    Hello sir,
    i got following reply:
    <returnRecordResponse  xmlns="http://xyz" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <returnResult>Error_request</returnResult>
    </returnRecordResponse>
    but correct response is
    <returnRecordResponse  xmlns="http://xyz" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <returnResult>Success</returnResult>
    </returnRecordResponse>
    can you tell me correction in the code which i have put on the forum?or tell me other way to call webservice?

  • Calling function in OAF

    Hi all,
    I am new in OAF. Pls tell how can I call fuction in OAF.
    Thanks
    Vikram.

    import java.sql.CallableStatement;
    import java.sql.SQLException;
    import java.sql.Types;
    import oracle.jdbc.driver.OracleCallableStatement;
    DBTransaction txn = getDBTransaction();
    String sql = "BEGIN :1 := FND_MESSAGE.GET; END;";
    CallableStatement cs = txn.createCallableStatement(sql, 1);
    String messageBuffer = "";
    try
    ((OracleCallableStatement)cs.registerOutParameter(1, Types.VARCHAR, 0, 2000);
    cs.execute();
    messageBuffer = cs.getString(1);
    cs.close();
    catch (SQLException sqle)
    try { cs.close } catch (Exception(e) {}
    throw OAException.wrapperException(sqle);
    }

  • Need Help on calling report in OAF Page

    Hi,
    At present i am wokring EAM Module. Here i need to call one report.
    In my OAF Page one button is there("The name of the button is *Issue*"). After clicking this button i need to fire one report(The name of the report is "Maintenance Picking Slip Issued Report").
    Please help me how to call report? I don't have any idea how to proceed for this.please explain clearly.
    Thanks in advance..
    Thanks,
    Somasekhar.

    Somasekhar,
    you want to call PLSQL Report or XML Publisher report or you want to submit the concurrent request.
    If this XML Publisher report then refer following code for your refrence
    public BlobDomain getXMLData(String as[], String s, String s1, String s2, String s3, String s4, String s5,
    String s6, String s7, String s8, String s9, String s10)
    throws Throwable
    int i;
    int j;
    int k;
    int l;
    int i1;
    int j1;
    int k1;
    int l1;
    int i2;
    int j2;
    int k2;
    OracleCallableStatement oraclecallablestatement;
    ARRAY array;
    int ai[] = new int[as.length];
    i = 0;
    j = 0;
    k = 0;
    l = 0;
    i1 = 0;
    j1 = 0;
    k1 = 0;
    l1 = 0;
    i2 = 0;
    j2 = 0;
    k2 = 0;
    for(int l2 = 0; l2 < as.length; l2++)
    ai[l2] = Integer.parseInt(as[l2]);
    if(s.equals("Y"))
    i = 1;
    if(s1.equals("Y"))
    j = 1;
    if(s2.equals("Y"))
    k = 1;
    if(s3.equals("Y"))
    l = 1;
    if(s4.equals("Y"))
    i1 = 1;
    if(s5.equals("Y"))
    j1 = 1;
    if(s6.equals("Y"))
    k1 = 1;
    if(s7.equals("Y"))
    l1 = 1;
    if(s8.equals("Y"))
    j2 = 1;
    if(s10.equals("Y"))
    k2 = 1;
    i2 = Integer.parseInt(s9);
    DBTransaction dbtransaction = getDBTransaction();
    String s11 = "BEGIN :1 :=EAM_WorkOrderRep_PVT.getWoReportXML(:2, :3, :4, :5, :6, :7, :8, :9,:10,:11,:12,:13); END;";
    oraclecallablestatement = (OracleCallableStatement)dbtransaction.createCallableStatement(s11, 1);
    java.sql.Connection connection = oraclecallablestatement.getConnection();
    ArrayDescriptor arraydescriptor = ArrayDescriptor.createDescriptor("SYSTEM.EAM_WIPID_TAB_TYPE", connection);
    array = new ARRAY(arraydescriptor, connection, ai);
    BlobDomain blobdomain;
    oraclecallablestatement.registerOutParameter(1, 2005);
    oraclecallablestatement.setArray(2, array);
    oraclecallablestatement.setInt(3, i);
    oraclecallablestatement.setInt(4, j);
    oraclecallablestatement.setInt(5, k);
    oraclecallablestatement.setInt(6, l);
    oraclecallablestatement.setInt(7, k1);
    oraclecallablestatement.setInt(8, l1);
    oraclecallablestatement.setInt(10, i1);
    oraclecallablestatement.setInt(11, j1);
    oraclecallablestatement.setInt(9, j2);
    oraclecallablestatement.setInt(12, i2);
    oraclecallablestatement.setInt(13, k2);
    oraclecallablestatement.execute();
    CLOB clob = ((OracleCallableStatement)oraclecallablestatement).getCLOB(1);
    blobdomain = new BlobDomain();
    OutputStream outputstream = blobdomain.getBinaryOutputStream();
    long l3 = clob.length();
    byte abyte0[] = new byte[(int)l3];
    String s12 = clob.getSubString(1L, (int)l3);
    abyte0 = s12.getBytes("UTF-8");
    outputstream.write(abyte0);
    outputstream.close();
    return blobdomain;
    SQLException sqlexception;
    sqlexception;
    try
    oraclecallablestatement.close();
    catch(Exception exception) { }
    throw OAException.wrapperException(sqlexception);
    public void initSearchCriteria()
    log(this, "init search crieria", 1);
    getWorkPlanSearchCriteriaVO().executeQuery();
    Let me know you got your point or not.
    Thanks,
    Kumar

  • How to call Siebel wsdl from EBS R12

    Dear Gurus,
    Is there anyone knows how to call Siebel wsdl file generated from EBS R12, directly without using middleware/weblogic ?
    Please help
    Thanks in advance
    Eldin

    Hi Eldin,
    From where do you intend to invoke the WSDL?
    Through SQl, PL/SQL - By implementing Web Service Call-Out in the database. Refer http://download.oracle.com/docs/cd/B32110_01/web.1013/b28974/devdbase.htm#BDCGJJHD.
    From Forms/OAF page - By using Jdeveloper to develop the proxy/stub, which can subsequently be used in the OAF page/ Forms
    Refer: http://www.oracle.com/webfolder/technetwork/tutorials/obe/forms/webservicefromforms/ws_10_1_3_from_forms.html
    Hope this helps.
    Pls update the thread with your progress.
    Regards,
    Sujoy

  • How to call at PL/SQL package?

    Hi,
    How to call a PL/SQL package from withing a VORowImpl?
    Also what packages need to be imported for this?
    Thanks,
    AD

    Hi,
    Thanks for the replies friends.
    I understand this is not a good practice to call a pl/sql package. I tried as per the OAF standards.
    My requirement is to display the GL String in a region of type table. This is in iExpense and the region is (ReviewBusinessCCardTblRN.xml) i.e. the Review page in the Expense report creation steps.
    The data in this region is not coming directly from one VO. There are two VOs involved in it.
    1> BusinessCCardLinesForReviewVO
    2> ReceiptBasedLinesVO (This is the actual source of data and it contains a SQL statement)
    The "BusinessCCardLinesForReviewVORowImpl" calls methods in "ReceiptBasedLinesVORowImpl" to get all the data.
    So, my approach was to
    1> Extend "ReceiptBasedLinesVO" and add an attribute for the GL String in the SQL statement.
    2> Write a method in the "ReceiptBasedLinesVOExRowImpl" to fetch the GL String.
    3> Extend BusinessCCardLinesForReviewVO and add an attribute for the GL String.
    4> In the extended VO's (BusinessCCardLinesForReviewVOExRowImpl) row impl, call "ReceiptBasedLinesVOExRowImpl" GL String method.
    5> Then use "BusinessCCardLinesForReviewVO" GL string attribute to display in the region.
    Is there anything wrong with this approach?
    But, this does not seem to be working.
    Steps 3, 4, 5 are working as I tested with hard coded values in "BusinessCCardLinesForReviewVOExRowImpl".
    But when I call method in "ReceiptBasedLinesVOExRowImpl" to get the GL String, it does not working. No error returned. The page displays all the values as it was displaying in the standard functionality.
    As this is an urgent requirement, I thought of writting a PL/SQL function which would take CCID from "BusinessCCardLinesForReviewVO" and return the GL String.
    And call this PL/SQL funtion in "BusinessCCardLinesForReviewVOExRowImpl".
    Please help me on this.
    Srini: Could you please give the exact syntax for calling the PL/SQL stored function in VORowImpl.
    Thanks,
    AD

  • How to call a maintenance view  from a program

    Hello Abapers,
    Can anybody explain with some examples. How to call a mainetenance view from a program.
    Thanks
    Ranjith.

    Use FM 'VIEW_MAINTENANCE_CALL'.
    REPORT  zmaintaintest.
    VARIABLES / CONSTANTS                          
    CONSTANTS: 
                    c_action(1) TYPE c VALUE 'U',                                 "Update
              c_viewname TYPE tabname value 'ZEMP_EXAMPLE', "View Name
              c_field(6) TYPE c VALUE 'EMPNO'.                            "Field Name
    INTERNAL TABLES
    DATA: itab_rangetab TYPE STANDARD TABLE OF vimsellist,
              v_empno TYPE zempno,
              wa_rangetab TYPE vimsellist.
    SELECTION SCREEN
    PARAMETERS:     p_empno TYPE   zempno   OBLIGATORY.  "Emplyee ID
    AT SELECTION-SCREEN                                                 
    AT SELECTION-SCREEN.
    Chcking the existence of the user in EMPLOYEE table
      PERFORM validate_employee.
    START_OF_SELECTION                                                  
    START-OF-SELECTION.
    This will restrict the user view so that user can only view/change
    Table data corresponding to his/her Employee ID
      PERFORM define_limited_data_area.
    Displaying table maintenance view for a particular employee ID
      PERFORM call_view_maintenance.
    *&      Form validate_employee
    Validate plant entered in the selection screen
    FORM validate_employee.
      SELECT SINGLE empno     u201CEmployee ID
        FROM zemp_example     u201CEmployee Table
        INTO v_empno
        WHERE empno = p_empno.
      IF sy-subrc <> 0.
        MESSAGE 'Not an Valid User' TYPE 'I'.
      ENDIF.
    ENDFORM.                    "validate_employee
    *&      Form DEFINE_LIMITED_DATA_AREA
    To restrict the user view so that user can see/change table data
    corresponding to his employee ID. Here one internal table is
    getting populated with field name as u201CEMPNOu201D (Key field of the table)
    And value as given by user in Selection Screen and this is passed as
    Parameter in function module 'VIEW_MAINTENANCE_CALL'
    FORM define_limited_data_area.
      CLEAR wa_rangetab.
      wa_rangetab-viewfield  = c_field.
      wa_rangetab-operator  = 'EQ'.
      wa_rangetab-value       = p_empno.
      APPEND wa_rangetab TO itab_rangetab.
    ENDFORM.                    "define_limited_data_area
    *&      Form CALL_VIEW_MAINTENANCE.
    Displaying table maintenance view for a particular employee ID
    FORM call_view_maintenance.
      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'      
        EXPORTING
          action           = c_action
          view_name   = c_viewname
        TABLES
          dba_sellist     = itab_rangetab.
    ENDFORM.                    "call_view_maintenance
    Regards,
    Joy.

  • How to call Subroutines,Standard Text  & using Internal Table in SmartForm

    Hi all,
    need help in the following areas.Its very urgent!
    1.How to CAll Subroutines in Smart Forms
    2.How to CAll Standard Text in Smart Forms
    Situation:
    We have an Internal Table T_SALES with all the data which am going to display in the smartform,How to retrive data from an internal table in Smart forms
    Any Help in this direction would be highly appreciated.
    Regards
    Ramu

    Hi,
      When you are using quantity or currency fields, you have to mentiong the reference fileds in a tab called CURRENCY/QUANTITY FILEDS in the GLOBAL DATA node.
    Specifying a Currency or Quantity Reference
    Use
    In the ABAP Dictionary, you can assign a currency or quantity field to a table field. In the output of these fields, the system can then insert the relevant currency or unit:
    ·        If the value field is in the same table as the corresponding currency or quantity field, the system recognizes the reference automatically, and formats the value field according to the currency or unit in the assigned field.
    ·        If the value field is in a different table from the currency or quantity field, the system cannot recognize this reference automatically.
    In the second case, you must indicate this reference to the system in the form, to ensure that the value field is formatted correctly.
    Procedure
    You want to assign a currency or quantity field in one table (for example, CURTAB) to a value field in another table (for example, VALTAB).
           1.      Create the reference to the currency field by entering the following values:
    -         Field Name: VALTAB-VALUE, if this is the value field of VALTAB that you want to display.
    -         Reference Field: CURTAB-CURRENCY, which is the currency field of CURTAB.
           2.      Under Data Type, specify whether the data type is a currency or quantity.
    Result
    In the output of the PDF-based print form, the system formats the value field VALTAB-VALUE according to the assigned value in the currency or quantity field of the global variable CURTAB-CURRENCY.
    Thanks and Regards,
    Bharat Kumar Reddy.V
    Message was Added by: Bharat Reddy V
    Message was Added by: Bharat Reddy V

  • How to call SAP Webservice in standalone java program

    Hi,
    In our Java application, we want to use the SAP Webservices. I dont know much about authentication mechanism used by SAP. Can any one please help me with any sample code how to Call SAP webservice in Standalone Jave Program. I searched alot on the web regarding this, but helpless. Please help me.
    Thanks,
    Mohan

    Hi Mohan,
    You need an account for the ES Workplace. I'm afraid this is not free, e.g. check [SAP NetWeaver, Composition Subscription|https://www.sdn.sap.com/irj/sdn/subscriptions/composition].
    But I thought you wanted to play with a WSDL [you already had at hand|Sample code to access BAPI Web services from JAVA required;?

Maybe you are looking for

  • How can I permanently clip video without changing filmstrip order?

    I have just recently upgraded from LR1.4 to 4.2 (Windows 7 OS) and one of the features I am most excited about is being able to work with video in LR. I started clipping videos but I know LR is non-destructive. This is great for my photography but wi

  • Best Way To Display Photos On HDTV?

    I would like to display photos on a HDTV (16:9 aspect ratio, 1280x720 pixel max) at the highest possible resolution. The best photo quality, I assume, is obtained by connecting a computer's DVI output (or a networked media server) directly to the HDT

  • How to change the value of Valuation class.

    dear friends: i want to change the value of Valuation class in the material master .but system  warning info occurs . The valuation class cannot be changed Message no. M3 368 Diagnosis You wanted to change the valuation class. However, this is not po

  • Video Streaming is not working!

    Hello, since a couple of days, it's not possible to stream videos from iCloud. e.g. when trying to stream a video (an Episode from a TV Series for example) the video is downloaded on the device, and is using memory space. Then it's not possible to de

  • By clicking add-ons in my tool bar it starts on the existing opened window how can i change it on new window

    By clicking an add-on in tool bar it can't open in new window rather than it occupies the existing window how can I change this.