Pass Paramters from AM to CO

All
I have a AM and CO. I'm currently invoking a AM procedure from the CO using am.invokeMethod("ValidateAmount"). This is working fine. But now I need to return a value from this "ValidateAmount" AM function to the CO and then pass that value to another page as a paramter.
I tried the below code.
Current Code
// AM Code
public void ValidateAmount( )
{ String creditAmount
--- code to validate --
// CO Code
am.invokeMethod("ValidateAmount");
Changed Code
//AM Code
public Object ValidateAmount( )
{ String creditAmount
--- code to validate --
return creditAmount;
//CO Code
String totalCreditAmount = (String) am.ValidateAmount();
When I compile I'm getting the error "Error(172,47): method ValidateAmount not found in interface oracle.apps.fnd.framework.OAApplicationModule".
It was a working code and now after I changed, I got the error. Is something I did wrong ?
Thanks
Edited by: Vasu on Sep 8, 2011 3:50 PM

Amit
I'm currently using like below
Code in AM_
public Object[ ] ValidateAmount( )
Object objectAmount[] = new Object[2];
float totalCreditAmount = 0;
float totalRebillAmount = 0;
/* Calculation Code */
objectAmount[0] = Float.toString(totalCreditAmount);
objectAmount[1] = Float.toString(totalRebillAmount);
return objectAmount;
Code in CO_
Object objectAmount[ ] = am.invokeMethod("ValidateAmount");
String totalCreditAmount= objectAmount[0].toString();
String totalRebillAmount = objectAmount[1].toString();
I'm getting the below error
Error(183,47): incompatible types; found: java.io.Serializable, required: java.lang.Object[]
Am I doing something wrong here ? Can you pls provide sample code to use the Hastable and return it ?
Thanks

Similar Messages

  • Pass parameter from dynamic navigation iView to WebDynpro iView

    Hi All,
    I know there are a lot of threads dealing with passing paramters from EP to WebDynpro using EPCM but actually I didn´t find a solution for my problem.
    I have in the dynamic navigation area of the SAP Portal an iView based on a JSP dynpage. In the corresponding JSP I fire an EPCM-event:
    EPCM.raiseEvent("urn:test.de:wochenb" , "passDataToWebDynpro" , evtData);
    In the content area there is a WebDynpro iView. In this WebDynpro-application I subscribe to the event in the wdDoInit-method of a view:
    WDPortalEventing.subscribe("urn:test.de:wochenb" , "passDataToWebDynpro" ,wdThis.wdGetDataFromJSPDynpageAction());
    and I have an event-handler:
    public void onActionDataFromJSPDynpage(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String dataObject )
        //@@begin onActionDataFromJSPDynpage(ServerEvent)
         IWDMessageManager manager = wdComponentAPI.getMessageManager();
         manager.reportSuccess("EPCM event testing " + dataObject);
      //@@end
    My problem is now that the event is fired correctly by the JSP Dynpage but the event-handler of the WebDynpro is never executed.
    As info: the domain of the J2EE-Server the webdynpro-application is deployed to is identical to the J2EE-Server the portal runs on.
    Can anybody help ?
    Thanks !
    Bernd

    Hi All,
    I found the solution by myself.
    For information: Click in the dynamic navigation fires the event und forces the content afterwards to refresh. During the refresh the WebDynpro subscribes to the event in the wdDoInit-Method. This is to late because the event is fired before the refresh.
    My solution is to use a setTimeout before the event-triggering in the dynamic navigation iView.
    Regards,
    Bernd

  • Process Flow - Pass paramters between activities

    Need to pass argument from one mapping/component to next piece. What is the way. Process Flow Editor does not seem to show OUT paramters.
    Pasting from a previous post
    Hi,
    I have a requirement to pass output parameter from a Mapping as input to another Mapping. These Mappings are tied together through a Process Flow.
    Start Proc1 -> Map1 -> Map2 -> Proc2 -> End
    Proc 1 will produce an output that will be used by Map1, and then Map1 will produce an oputput to be used by Map2, and so on till Proc2.
    Also, Mapping Output Parameter is not showing up in the Process Flow.
    What is the way to pass a parameter from one Mapping to next one one in a Process Flow?
    Any answers are most welcome.
    - Jojo
    Message was edited by:
    user467494
    Message was edited by:
    user467494
    Message was edited by:
    user467494
    Message was edited by:
    user467494

    Hi,
    What I have is a wrapper procedure that does a select from a control table. I would like to use this wapper procedure to drive the rest of the mapping by passing the parameter through the process flow.
    It makes no sense to do the same select directly as this would be bypassing the wrapper/interface routine.
    Would still prefer to have the ability to pass parameters between activities.
    Would anybody who is presently close to OWB be in a position to answer that. It is important if we want to continue to use OWB to provide us benefits than headaches.
    - Jojo

  • Passing parameters from 1 jsp to another

    1. Passing String parameter P2 from Filter.jsp to POLGENMA106.jsp thro'
    <instance of NavigatorBar>.setTargetUrl
    ("POLGENMA106.jsp?P2=<%=strTitle%>")
    2. Problem faced :
    Value is not passed properly.
    3. Reason :
    When I press Next record in the NavigatorBar,
    the string "POLGENMA106.jsp?P2<%=strTitle%>" gets appended with
    "?<View name>_NAVIGATE=NEXT" internally instead of "&<View name>_NAVIGATE=NEXT" assuming that we r not passing any paramters.
    Is there any method by which we can pass paramters explicitly after instantiating NavigatorBar bean.
    4. Code in Filter.jsp:-
    <% strTitle = request.getParameter("P2"); %>
    <center><h2><%=strTitle%></h2></center>
    <jsp:useBean id="RowQuery" class="oracle.jbo.html.databeans.RowsetNavigator" scope="request">
    <%
    Object[] params = new Object[1]; params[0] = strVSCode;
    RowQuery.initialize(application, session , request, response, out, "pol_PMode_Pol_PModeModule.
    ComVsStaticValueView1"); RowQuery.setReleaseApplicationResources
    (true);
    RowQuery.getRowSet().getViewObject().setWhereClauseParams(params);
    RowQuery.getRowSet().getViewObject().executeQuery();
    RowQuery.getRowSet().first();
    %>
    </jsp:useBean>
    <jsp:useBean class="oracle.jbo.html.databeans.NavigatorBar" id="tb" scope="request" />
    <%
    tb.setTargetUrl("POLGENMA106.jsp?P2=<%=strTitle%>");
    tb.initialize(application,session, request,response,out,"pol_PMode_Pol_PModeModule.ComVsStaticValueView1");
    String sImageBase = (String)session.getValue("ImageBase");
    tb.getContainer().setImageBase(sImageBase);
    tb.getContainer().addSeparator(sImageBase + "/FNDIWDVD.gif");
    tb.getContainer().addButton(sImageBase + "/query.gif" , "ComVsStaticValueView1_Query.jsp", "Go to Query Form");
    tb.getContainer().addButton(sImageBase + "/browse.gif" , "ComVsStaticValueView1_Browse.jsp", "Go to Browse Form");
    tb.getContainer().addButton(sImageBase + "/addnew.gif" , "ComVsStaticValueView1_Insert.jsp", "Insert a New Record");
    tb.getContainer().addButton(sImageBase + "/editrec.gif" , "ComVsStaticValueView1_Edit.jsp", "Edit Current Record");
    tb.render();
    %>
    <br>
    One way of doing this is to put P2 in the session so that it can be accessed by POLGENMA106.jsp but this method is not preferable.
    Please Clarify.
    thanks,
    Archana
    null

    John Jdev :Are you using JDeveloper 3.0 or 3.1?
    ... I assume 3.0.
    Archana : Yes.
    Jdev : Are you trying to test this within JDeveloper 3.0?
    ... I assume so, but if not...please let me know.
    Archana : No, Iam not testing it within Jdev 3.0. I've deployed it in Java Web server 2.0 and Iam getting these parameters from the request.
    Jdev : You should note that JDeveloper 3.0
    supports running and debugging ONE JSP, not
    chained JSP/Servlets.
    Archana : Okay. But I din't test it using Jdev. Actually the NavigatorBar bean appends the implicit parameters "<view name>_NAVIGATE" to the JSP name specified in the setTargetUrl(), without checking if the string supplied to setTargetUrl() has a paramter already, that is the problem. So instead of appending "&<view name>_NAVIGATE", it goes as "?<view name>_NAVIGATE".
    Kindly provide a solution for this.
    Thank U !
    null

  • Unable to pass variables from IRPT to on demand MDO in MII v12.2

    Hi all,
    Here is what I am trying to achieve - to pass an order input value from front end and fetch the results through on demand MDO.
    STEP 1: Created a BLS transaction with input parameter order and tested it to get Output XML - SUCCESSFUL.
    STEP 2: Created an On-Demand MDO object pointing to the BLS transaction, tested it by passing the value to input parameter in Dynamic Query Parameters - SUCCESSFUL.
    STEP 3: Created an MDO Query Template in SELECT mode pointing to the MDO object created, there are 2 things which I noticed. when I pass the value to OBJECT PARAMETER, it worked fine and when I pass it to PARAMETERS it Doest not work. I just used the object parameter because it worked for me.
    STEP 4: Created an Applet with MDO Query Template and Grid Display template. Tried passing the value using setParam(1, order). I found 3 different variations:
         Result 1: If Object Parameter in MDO Query is not set to any default value - "No Data Available" is seen on applet.
         Result 2: If Object Parameter is set to some valid default value say 123, irrespective of what I pass from UI setParam, I always see the data of 123.
         Result 3: If Object Parameter is set to some valid default value say 123 and in addition to that, I add Filter expression [val1] = [ param (dot)1 ] in my MDO select query, then when I pass 123 from UI, I see the result and when I pass someother input I see empty table, however now I can see the columns with empty table.
    Can someone tell me where I am going wrong?
    Any help is highly appreciated.

    Hi Michael,
    I am using the ramup version 12.2 and want to explore all the new features available in 12.2 and came downloaded the example project of MII 12.2 avaiable here. while doing that I came across an example of onDemand MDO query for pulling the data from Tag quieries and making it dymanic by passing speed or quality or perfomance parameters, however it just showed me only quality results always, I coudn't test it properly because it was a tag query so I created my own scenario and it didnt work from UI as expected.
    so wanted to know if I am going wrong somewhere before I conclud it is a bug.

  • Passing values from a FORM to another FORM

    Hi,
    I have to pass values from FORM "A" to FORM "B". What is the best way to do this?\
    Can I use a GLOBAL variable?
    Thanks,
    Marc.

    I think he meant the global namespace.
    You set a :global_your_name_here to a value and that value is available in your entire application. See the help file section on the global namespace for more information.
    Forms parameters are parameters that you form picks up from the outside when it starts. The calling entity must supply them in the URL or they will be set to null. You set them up in the object navigator in the Parameters node.

  • Script fails when passing values from pl/sql to unix variable

    Script fails when passing values from pl/sql to unix variable
    Dear All,
    I am Automating STATSPACK reporting by modifying the sprepins.sql script.
    Using DBMS_JOB I take the snap of the database and at the end of the day the cron job creates the statspack report and emails it to me.
    I am storing the snapshot ids in the database and when running the report picking up the recent ids(begin snap and end snap).
    From the sprepins.sql script
    variable bid number;
    variable eid number;
    begin
    select begin_snap into :bid from db_snap;
    select end_snap into :eid from db_snap;
    end;
    This fails with the following error:
    DB Name DB Id Instance Inst Num Release Cluster Host
    RDMDEVL 3576140228 RDMDEVL 1 9.2.0.4.0 NO ibm-rdm
    :ela := ;
    ERROR at line 4:
    ORA-06550: line 4, column 17:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    ( - + case mod new not null &lt;an identifier&gt;
    &lt;a double-quoted delimited-identifier&gt; &lt;a bind variable&gt; avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    &lt;a string literal with character set specification&gt;
    &lt;a number&gt; &lt;a single-quoted SQL string&gt; pipe
    The symbol "null" was substituted for ";" to continue.
    ORA-06550: line 6, column 16:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    ( - + case mod new not null &lt;an identifier&gt;
    &lt;a double-quoted delimited-identifier&gt; &lt;a bind variable&gt; avg
    count current exists max min prior sql stddev su
    But when I change the select statements below the report runs successfully.
    variable bid number;
    variable eid number;
    begin
    select '46' into :bid from db_snap;
    select '47' into :eid from db_snap;
    end;
    Even changing the select statements to:
    select TO_CHAR(begin_snap) into :bid from db_snap;
    select TO_CHAR(end_snap) into :eid from db_snap;
    Does not help.
    Please Help.
    TIA,
    Nischal

    Hi,
    could it be the begin_ and end_ Colums of your query?
    Seems SQL*PLUS hs parsing problems?
    try to fetch another column from that table
    and see if the error raises again.
    Karl

  • Passing values from javascript in pop up window to parent jsp

    Hi
    I am trying to pass values from a pop up window to the main window that popped this child window , with the idea to have the parent window refresh itself with value from pop up window.But the values are not going through.I do a request on the hidden variable but when the parent
    jsp refreshes , the variable is still null...
    The following is the code i have .
    Parent jsp:a.jsp
    <form name='summary'>
    <input type=hidden name=customerid value="">
    <input type="button" class="textButton" name="action" value="customerlist" onClick="javascript:openWin('b.jsp','800','350')">
    <script>
    function openWin(loc, w, h) {
    var newWin = window.openloc,"HTML",'dependent=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=' + w + ',height=' + h);
    newWin.window.focus();
    </SCRIPT>
    <%
    String optionVal = request.getParameter("customerid");%>
    var user = "<%= optionVal%>";
    </form>
    child jsp- b.jsp (pop up window)
    <script>
    function closer(){
    var val = document.formname.id.selected.value;
    window.opener.document.summary.customerid.value = val;
    window.opener.location.reload();
    </script>
    <form name = formname>
    <input type="text" name="id" value = ''>
    <input type="button" class="textButton" value="select"
    onClick="closer();window.close();">
    </form>
    Any ideas on what i am missing
    Thanks
    Arn

    use window.opener.document.forms[0].filedname.value = 'value u need to set'

  • Pass parameters from JSP Dyn Page to WDJ Application

    Hi,
    I am trying to pass parameters from my JSPDyn Page to WDJ Application.
    I am using NWDS 7.1 EHP1
    My code is :
    function to_WEBDYNHK()
          EPCM.relaxDocumentDomain();
          EPCM.doNavigate
        ('ROLES://pcd:portal_content/Himanshu.Himanshu/TestDynUIApp?DynamicParameter="hkparam%3Dqwertyuio"');
    This method is being called on click of a button.
    hkparam is the parameter in question.
    The JSPDyn page is an iView and the WDJ application is a page and both have been assigned to a role.
    In the properties of the WDJ Page, I have removed DymanicParameter from "Do not Forward These Parameters To Web Dynpro" property.
    However I am getting null as the value of hkparam in my WDJ application.
    The code used is :
    IWDRequest request = WDProtocolAdapter.getProtocolAdapter().getRequestObject();
           String param1= request.getParameter("hkparam");
    What seems to be missing here.
    Please help.
    I went through the documentation on SDN but it does not seem to help.
    TIA,
    Himanshu

    Hi Himanshu,
    Try this code.
    EPCM.doNavigate("ROLES:portal_content/Himanshu.Himanshu/TestDynUIApp?hkparam=Dmypass1123")
    if the parameter is hkparam and the value to be passed is Dmypass1123. You need not change any design time property of the WD page, and WDProtocolAdapter should retrive the parameter.
    Regards,
    Vishweshwara P.K.M.

  • Problem in passing data from one .jsp page to another .jsp page

    i have a problem here
    Actually i have 2 jsp pages. What im trying to do here is actually i want to pass data from the first jsp page to the second for updating
    The first jsp page contains data that user wants to update in the form of table.
    <td><img src = "edit.gif" alt = "edit" border="0" ><td>
    <TD><%= Name %></td>
    <TD><%= rs.getInt("Age") %></td>
    <TD><%= rs.getString("Gender") %></td>
    So this page displays the data that users wants to update plus one image button (edit button). So when user clicks this button, all the data in this page will be brought to the second .jsp page called updatePersonal for updating.
    The problem here is that it is not displaying the existing data in the second .jsp page.
    The second page basically contains forms
    <INPUT TYPE="text" NAME="FirstName" maxlength="30" value = "<%=FirstName%>">
    Can someone please help me. I really dont know what to do..How do i get the data displayed in the text field that is passed from the first .jsp page..thankx in advance

    Please modify below code to:
    td><img src = "edit.gif" alt = "edit" border="0" ><td>
    -----------------modified code
    td><a href="updatePersonal.jsp?FirstName=<%=rs.getString(FirstName")%">&LastName=<%=rs.getString("LastName")%>&Age=<%=rs.getInt("Age")%>&Gender=<%=rs.getString("Gender")%>"><img src = "edit.gif" alt = "edit" border="0" ></a><td>
    I'm sure it works</a>

  • Passing parameters from java jdbc to pl/sql

    I’m calling stored procedures from java jdbc… but looking for nicer interfaces in terms of passing data. Has anyone come up with a good way to pass data from java jdbc to pl/sql without passing a million parameters? I’m thinking here of some type of structure like pl/sql rowtype or table index type or something else. Has anyone tried to create typed objects in oracle databases and access them from java?
    Thanks, Patrick Caldwell

    Hi Patrick,
    Yes, I have created an Oracle object type, which I successfully returned to a java class, from a PL/SQL stored function, using JDBC. Environment was J2SE 1.3.1, with Oracle 8.1.7.4 on SUN [sparc] Solaris 7 with Oracle's JDBC (thin) driver. It was a while ago, so I don't remember the details very clearly, but I recall being able to figure it out quite easily using the Oracle documentation and the sample code available at Oracle's Technet Web site.
    Hope this has helped you.
    Good Luck,
    Avi.

  • Passing value from javascript function to servlet

    Hello everybody,
    i need to pass parameter from javascript function to servlet.
    what i wrote is :
    function callPopulateServlet(t)
    var h =document.NewRequest.services;
    var y = t.selectedIndex;
    alert(h.options[y].value);
    var id=h.options[y].value;
    <%session.setAttribute("id",id);%> // am getting error at this point
    document.NewRequest.submit();
    with this id am quering values from database through servlet.
    any body knows plz help me.
    thanks,
    anil.

    this is the error am getting
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  • Passing Value from Crystal Report (special function) to Business View parameter

    Friends,
                 Í have a scenario where i need to pass value from Crystal Report to a Business view's parameter.
    Eg : CurrentCEUsername (func in crystal report)-- gives login user  which i should pass to parameter in a Business view (used in the same report).
    Will be able to explain more if required.
    Thanks in Advance,
    Bharath

    I guess you got the picture wrong.  User_id is not a report_level parameter .
    In Data Foundation, below query is used..
    select Acc_Number, Account_Group,User_id  from Accounts where user_id={?User_id}
    where in {?User_id}  is the BV parameter...
    The Filter was a solution. But it takes long time to Query all the data from DB and then filter at BV level.
    How do i pass the CurrentCEUsername to {?User_id}
    Value should ve CurrentCEusername always. so that query will be
    select Acc_Number, Account_Group,User_id  from Accounts where user_id=CurrentCEusername
    It will restrict the data pulled from DB to BV .. right?

  • How can I pass paramters to next page with session protection on?

    Hi, guys:
    I encounter a problem of session protection problem. In a report page I set up a column of "map" link, so I can pass several parameters extracted from the same row to the new page where I can show map. I was using javascript popup2, and it worked well.
    javascript:popUp2('f?p=&APP_ID.:3006:&SESSION.::&DEBUG.::P3006_H_OFFENDER_NAME,P3006_H_OFFENDER_ID,P3006_H_ADDRESS_LATITUDE,P3006_H_ADDRESS_LONGITUDE,P3006_H_PHYSICAL_LATITUDE,P3006_H_PHYSICAL_LONGITUDE,P3006_H_ADDRESS,P3006_H_PHYSICAL_ADDRESS:#Offender Name#,#Offender ID#,#Address Latitude#,#Address Longitude#,#Physical Latitude#,#Physical Longitude#,#Address#,#Physical Address#','650','450');However, I am required to set all of pages, items with session protection now. after that I got problem as:
    Attempt to save item P3006_H_OFFENDER_NAME in session state during show processing, item has Internal Only protection.
    Contact your application administrator.
    So I changed it as redirect a page in application, and try to pass less parameters and query other parameters, but I got the similar problem:
    Attempt to save item P3006_H_OFFENDER_ID in session state during show processing, item has Internal Only protection.
    Contact your application administrator.
    I notice most of solutions would be turning the session protection as unrestricted for these items, but I am not allowed to do this. Is there any way that I can pass parameters from a row in a report while session protection is on?
    Thanks a lot!
    Sam

    I can quickly show you what I've done to solve for this:
    First, create a PL/SQL Anonymous block, application level process of type "On Demand"  Here is an example of what I'm using - I named the process is SIMPLE_SSP (name is important later)
    declare
    l_url varchar2(1000);
    s_url varchar2(2000);
    begin
    l_url := wwv_flow.g_x01; -- the apex name is g_x01 - note the key in the key value we pass later in javascript
    s_url := apex_util.prepare_url(p_url => l_url,p_checksum_type => 'SESSION'); -- and here's where we get checksum
    htp.p(s_url); -- and here's where we return it
    end;
    Next, I create a javascript function that can be called in the link
    function redir_ssp(p1,p2,p3) {
    var param1 = p1;
    var param2 = p2;
    var param3 = p3;
    // notice when creating our Ajax object we reference the Application process by name
    var ajaxReq = new htmldb_Get(null, &APP_ID., 'APPLICATION_PROCESS=SIMPLE_SSP', 0);
    var sURL = 'f?p=&APP_ID.:4:&SESSION.::::P4_PARAM1,P4_PARAM2,P4_PARAM3:'+param1+','+param2+','+param3;
    // notice the 'x01' literal mirrors the built in apex var we used above. x01, x02, x03 ... etc match their counterparts.
    // you can use many parameters as long as you deal with them in the proc the same way
    ajaxReq.addParam('x01',sURL);
    var retURL = ajaxReq.get(); // and the htp.p is passed into the ajax get which is then returned in the retURL
    //alert(retURL); // for debug
    window.location.href = retURL; //this is the redirect.
    Finally in the link
    &lt;a href="#" onclick="Javascript:redir_ssp(p1,p2,p3)"&gt;link text&lt;/a&gt;
    This can be easily altered to use in a pop up.

  • Pass value from Java to Perl

    Anyone knows how to pass value from Java to Perl program?

    Did you write the perl program? Can you change it? Or are you trying to interface to something that already exists? This will limit your options, of course.
    Anyway the first option is simple. The java program does this:
    System.out.println("This is a line of input.");The perl program does this:
    while(<>)and in that block, $_ is assigned to each line of input.
    Then you can invoke both like this:
    $ java MyJavaProgram | perl MyPerlProgram.pl

Maybe you are looking for