Passing different parameters to a method?

Hi,
I am having trouble with a method I created that is supposed to take two Book objects
and copy the variables of one object into the other object. One of the objects
is just a plain Book object while the other is a Book[ ] object (i.e. an element in an
array). I'm sure my syntax is off along with other mistakes. Can anyone offer
suggestions? Here is the code below with the 2 classes. The trouble area
is in bold.
Thank you in advance,
M
public class BookTest {
    static Scanner console = new Scanner(System.in);
    public static void main(String[] args) {
        String title;
        String pub;
        int isbn = 0;
        int nAuthors = 0;
        double price = 0;
        int copies = 0;
        Book text1 = new Book(); // create a book with the default
                                 // constructor
     String[] authors = new String[8]; // create an array to store
                                          // the authors
     // test out the different methods of the Book class
        text1.setTitle("The longest yard");
        text1.setAuthors(authors);
        text1.setPub("Ignatius Press");
        text1.setISBN(22345);
        text1.setPrice(65.00);
        text1.setCopies(100);
        text1.setNumAuth(3);
     // create a library of 100 Book objects
        Book[] bookLibrary = new Book[100];
        for(int i = 0; i < bookLibrary.length; i++)
            bookLibrary[i] = new Book();
        // copy text1 and text2 into the index 0 and 1 of library
        *bookLibrary[0].bookCopy(bookLibrary[0], text1);*
public class Book {
    private String title, publisher;
    private int ISBN, numCopies, numAuthors;
    private double price;
    private String[] authors;
    private Book obj[];
    public Book() {
      authors = new String[8];
      title = "";
      publisher = "";
      ISBN = 0;
      price = 0;
      numCopies = 0;
      numAuthors = 0;  
    public Book(String titl, String[] auth, String pub,
            int isbn, double pr, int copies, int noAuthors) {
        title = titl;
        authors = auth;
        publisher = pub;
        ISBN = isbn;
        price = pr;
        numCopies = copies;
        numAuthors = noAuthors;
    public void setTitle(String titl) {
        title = titl;
    public String getTitle() {
        return title;
    public void setCopies(int copies) {
        numCopies = copies;
    public int getCopies() {
        return numCopies;
    public void setPub(String pub) {
        publisher = pub;
    public String getPublisher() {
        return publisher;
    public void setISBN(int isbn) {
        ISBN = isbn;
    public int getISBN() {
        return ISBN;
    public void setPrice(double pr) {
        price = pr;
    public double getPrice() {
        return price;
    public void setAuthors(String[] auth) {
        authors = auth;
    public String getAuthor() {
        String output = "";
        for(int i = 0; i <= getNumAuth() - 1; i++) {
            output = output + authors[i] + " ";
        return output;
    public void setNumAuth(int num) {
        numAuthors = num * 2;
    public int getNumAuth() {
        return numAuthors;
    *public static void bookCopy(Book obj1, Book obj2)* {
obj1[i].setTitle(obj2.title);
obj1[i].setAuthors(obj2.authors);
obj1[i].setPub(obj2.publisher);
obj1[i].setISBN(obj2.ISBN);
obj1[i].setPrice(obj2.price);
obj1[i].setCopies(obj2.numCopies);
obj1[i].setNumAuth(obj2.numAuthors);

No need to specify that the book is in an array when creating the method. Just make it
*public static void bookCopy(Book obj1, Book obj2)* {
        obj1.setTitle(obj2.title);
        //set the rest of the stuff here
}You can then call it with
Book.bookCopy(books, aBook);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Passing different parameters per index count

    I haven't used LabView for a number of years and forgot way too much. I'm trying to create a simple task for a VI and not having any luck.
    I am using a FOR LOOP and need to pass different parameters to an instrument with each index count. I will use four counts and I have three parameters to pass for each count. The parameters are known and constant. I need to be able to load the paremeters into a structure and then pipe each out to three different functions.
    It seems so simple but I haven't found a way to do this.
    Thanks in advance
    - Bill

    One easy way to do this is to wire the for loop iteration count to a case structure (wire directly to case terminal, and create a case for each iteration).  For this to work you have to know ahead of time how many iterations you will have, what each one will do, and preferably the same data type for each parameter, perhaps a string.
    (What part of Colorado are you in?  I'm in Fort Collins.  Just curious who else is using LabVIEW in my neck of the woods)
    Regards,
    Jon 
    Message Edited by jmcbee on 10-01-2008 03:42 PM
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

  • How to Pass Multiple Parameters To ReportReuest Method in Oracle  BI 11g

    Hi,
    Am integrate Oracle BI Publisher 11g via Web Services in Oracle Forms,For that am developing code in PublicReportServiceClient Class. This worked properly with out passing parameter to the report. so how to pass parameters to the report . If Report is requried some Parameters to generate report.
    If any one knows about How to Passing Multiple Parameters to ReportRequest Methos in Oracle 11g. Pls help me.
    Am trying with the below code for PassParameters to ReportReuest Method in Oracle BI 11g. But by using this code am able to pass only one parameter to the Report, not for multiple Parameter Passing.
    ArrayOfParamNameValue PnameValue=new ArrayOfParamNameValue();
    ParamNameValue Namevalue=new ParamNameValue();
    Namevalue.setName("P_SNO"):
    ArrayOfString aos=new ArrayOfString();
    aos.getItem().add("2");
    Namevalue.setValues(aos);
    PnameValue.getItem().add(Namevalue);
    ReportRequest RepReq = new ReportRequest();
    RepReq.setParmeterNameValues(PnameValue);
    Following method  callRunReport() with an array of parameters used in Oracle Bi 10g,To pass multiple report parameters to ReportRequest method.
    public void callRunReport (String reportPath, String[] paramName, String[] paramValue, Stringusername, String password, String format, String template, String outFile)
    try {
    bip_webservice.proxy.PublicReportServiceClient myPort =new bip_webservice.proxy.PublicReportServiceClient();
    // Calling runReport
    ReportRequest repRequest = new ReportRequest();
    repRequest.setReportAbsolutePath(reportPath);
    repRequest.setAttributeTemplate(template);
    repRequest.setAttributeFormat(format);
    repRequest.setAttributeLocale(“en-US”);
    repRequest.setSizeOfDataChunkDownload(-1);
    if (paramName != null)
    ParamNameValue[] paramNameValue = new ParamNameValue[paramName.length];
    String[] values = null;
    for (int i=0; i<paramName.length; i++)
    paramNameValue[i] = new ParamNameValue();
    paramNameValue.setName(paramName[i]);
    values = new String[1];
    values[0] = paramValue[i];
    paramNameValue[i].setValues(values);
    repRequest.setParameterNameValues(paramNameValue);

    Ramani_vadakadu wrote:
    window.open("http://hq-orapp-03.kuf.com:9704/xmlpserver/~weblogic/kufpec/BTA/KUF_CONF_ITINUD.xdo?_xpf=&_xpt=1&_xdo=%2F~weblogic%2Fkuf%2FBTA%2FKUF_CONF_ITINUD.xdo&_xmode=&_paramsP_BTM_ID="+parseInt(document.getElementById('P3_BTA_ID').value)+"&_xt=KUF_CONF_ITINUD&_xf=pdf&_xautorun=true&id=weblogic&passwd=kuf2011","_blank");
    the above code we are using apex JS to BI publisher calling for report as PDF
    i don't know exactly where your parameters , did you customize my link to multiple parameters
    'http://192.168.0.57:8889/reports/rwservlet?userid=retail/1@xe&destype=cache&desformat=PDF&paramform=no&report=item_cost&P_BATCH_NO='+$v('P138_BATCH_NO'); 

  • Passing input parameters to the method call in ADF task flow.

    Hi,
    I have the following use case:
    There is a task flow with 2 jspx pages. In the first page I have 2 input search parameters and search button. the search button calls the webservice data control execute (GET_ACCOUNTOperation) method .
    Displaying the search results in the same page is not a problem , but my requirement is that the search results are to be displayed in the second page in tabular form.
    To achieve this, I dragged the execute method as the method call in the task flow and specified the input parameters for the method call (right click and add parameters) . I am getting the following exception :
    javax.el.MethodNotFoundException: Method not found: GET_ACCOUNTOperation.execute(java.lang.String, java.lang.String)
         at com.sun.el.util.ReflectionUtil.getMethod(Unknown Source)
         at com.sun.el.parser.AstValue.getMethodInfo(Unknown Source)
         at com.sun.el.MethodExpressionImpl.getMethodInfo(Unknown Source)
         at oracle.adf.controller.internal.util.ELInterfaceImpl.getReturnType(ELInterfaceImpl.java:214)
         at oracle.adfinternal.controller.activity.MethodCallActivityLogic.execute(MethodCallActivityLogic.java:135)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:1035)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:921)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:820)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:552)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:148)
         at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:109)
         at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:78)
         at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:43)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:889)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:379)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    even though the execute method is there and the service is up and running. I am not sure whether its the correct way of doing it. Please shed some light on how to solve this use case
    Some additional info:
    Under the data controls pallete, the GET_ACCOUNTOperation method has a parameters section , which has "part" (java.lang.Object) as
    the input parameter.
    Regards,
    Rampal

    Hi,
    thanks for the quick turn-around. Jdev version that i am using is Studio Edition Version 11.1.1.6.0. And i am using SOAP. Isnt there a way without using a backing bean? I am planning to use it as a portlet. Would'nt creating a backing bean cause a problem in that case?? Also i am confused here . The method that i am dragging is GET_ACCOUNTOperation(Object). I tried passing the hashmap . It gave the following exception :
    javax.el.MethodNotFoundException: Method not found: GET_ACCOUNTOperation.execute(java.util.HashMap)
    Rampal

  • How to run a webdynpro multiple times by passing different parameters each time and save webpages with parameter name?

    Hi Experts,
    I am a BW consultant and new to webdynpro. Not sure how to run RSO_METADATA_REPOSITORY multiple times and by passing different parameter values each time(either taken from an a standard BW table or user provided - anything is fine) and build web pages with parameter name. Need help with direction on where to start.
    Let me step back and explain my requirement:
    In BW we have an object called transformation.
    One way of generating documentation for transformation is highlight transformation and press F1. Then its documentation will be opened as a local web page.
    I need these web pages for all transformations. This is my requirment.
    I came to know that RSO_METADATA_REPOSITORY is beeing used to generate this web page.
    The web link is something like below:
    http://ubw05.xxx.com:8005/SAP/BW/DOC/METADATA/?page=BW_O_D&SystemID=BWPCLNT100&ClassID=TRFN&ID=0KHR6J65AIIUTCJZEC093K6XDFV909PB&objectVersion=A&sap-language=EN&sap-client=100
    When i run this link seperately(not by selecting transformation and pressing F1) i need to enter login credentials to BW system.
    My challenges is how do i pass login credentials and multiple transformation IDs to generate multipe web pages with each page named by transformation ID?
    WHere to start? First of all is RSO_METADATA_REPOSITORY Webdynpro JAVA or webdynpro ABAP or can i use anything?
    Since it is beeing opened as local webpages i assume it is webdynpro JAVa is that correct?
    Thanks,
    Raghu

    hello,
    might be a problem with the version you are using.
    regards,
    the oracle reports team

  • Passing Parameters via Post Method from Webdynpro Java to a web application

    Hello Experts,
    I want to pass few parameters from a web dynpro application to an external web application.
    In order to achieve this, I am referring to the below thread:
    HTTP Post
    As mentioned in the thread, I am trying to create an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map.
    But when I build my DC, I am getting the same error which most of the people in the thread have mentioned:
    Controller XXXCompInterfaceView [Suspend]: Outbound plug (of type 'Suspend') 'Suspend' may have at most two parameters: 'Url' of type 'string' and 'postParams' of type 'Map'.
    I am using SAP NetWeaver Developer Studio Version: 7.01.00
    Kindly suggest if this is the NWDS version issue or is it something else that I am missing out.
    Also, if it is the NWDS version issue please let me know the NWDS version that I can use to avoid this error.
    Any other suggestion/alternative approach to pass the parameters via POST method from webdynpro java to an external web application apart from the one which is mentioned in the above thread is most welcome.
    Thanks & Regards,
    Anurag

    Hi,
    This is purely a java approach, even you can try this for your requirement.
    There are two types of http calls synchronous call or Asynchronous call. So you have to choose the way to pass parameters in post method based on the http call.
    if it is synchronous means, collect all the values from users/parameters using UI element eg: form and pass all the values via form to the next page is nothing but your web application url.
    If it is Asynchronous  means, write a http client in java and integrate the same with your custom code and you can find an option for sending parameters in post method.
    here you go and find the way to implement Asynchronous  scenario,
    http://www.theserverside.com/news/1365153/HttpClient-and-FileUpload
    http://download.oracle.com/javase/tutorial/networking/urls/readingWriting.html
    http://digiassn.blogspot.com/2008/10/java-simple-httpurlconnection-example.html
    Thanks & Regards
    Rajesh A

  • Refresh cristal report sending it different parameters

    I have Business Objects ENTERPRISE XI R2 installed on Redhat Enterprise Linux AS 4 update 4 and running on Apache Tomcat/5.0.27
    Currently we have one Crystal template saved to Enterprise many times with the only difference being the name of the report and one parameter has a different value each time.
    This is not ideal, because everytime we need to change something in the template we need to re-save over every report.
    Idealy we would like to have one report (the template) saved to Enterprise and be able to execute it passing different parameters. execute from where? I don't really mind, Unix shell command, Java SDK or URL as shown below:
    http://<server>:<port>/businessobjects/enterprise115/admin/en/infoobject.cwr
    ?action=-10005&cmd=run&refresh=r_ins&id=<report id>
    I know the Java SDK can do it, but it may be a bit too advanced for me, I can't get a grasp on it.
    What can you reccommend?

    I'd have to ask you to clarify your requirement further, do you need these instances distributed to different folder locations within Enterprise or do you just want to restrict the content that users see and only run the report once?
    The solution I provided will utilise your existing set up i.e. mulitple copies of the same report located in Enterpise however it will give you an easy way to update the report files with any changes you make. Use the enterprise query tool to query the CMS for the FRS location of the reports you wish to modify. Then build a batch file from the results wich will copy your new report over the top of the existing reports using the FRS location returned by the query tool. Note: you will have o modify the FRS location into a UNC path, just replace FRS with the location of your FRS folder.
    Depending on exactly what you are trying to do, you may be able to utilise multipass bursting (row level security) to run the report once and then strip out data depending on who is accessing it.
    As for links to further information, the original solution is undocumented.

  • Abstract method which when implemented will have different parameters

    Hello to all,
    I have an assignment but not looking for someone to do it for me. I am only searching for a suggestion on how to do the following.
    Imagine having an application that needs to provide an estimate of the rent for different buildings.
    Basically I start with by having a class name Building. This class has an abstract method called estimateRent.
    I then create two classes that extend the class Building which are named Apartment and House. Both need to have the method estimateRent.
    However the problem is that the rent for the Apartment is calculated on the nights passed in the flat and the people in it, while the rent for the House is just calculated on a month bases.
    This means the estimateRent method requires to have different parameters depending if it is implemented inside the Apartment class or the House class.
    Now I only know of two options.
    The first option is to not declare the estimateRent method as an abstract method inside the Building class and just implemented inside the Apartment and House with different parameters. I do not like this option since in the future if a new Building comes in then I would like to impose the fact that that object needs to have a calculate method.
    The second option is to make the estimateRent method as abstract inside the Building class however takes a parameter of either a String array or else a Map. Then the estimateRent within the Apartment class would search for the elements tagged as nights and people, and the House class would only search for the elements tagged as months!
    However do not know if there are any other, better ways on how to do this. I am using Java 1.4 however if you only have answers for Java 5.0 then please post them again since I always like to learn something new :)
    Thank You for any comments.
    tx

    The implementation changes, yes.Yes that I could understand in the Strategy Pattern (in the document I read it was being compared with the Template Pattern).
    Then you need to refactor your design.I tought about that, however if you read my first post you will notice that I have different criteria on which the costs need to be estimated. While the costs for a flat are estimated on the people staying in and nights slept there, the costs for the house are based only on the months stayed there regardless of the people living in. Now for me I feel that it is bad programming practice to create one method that can have all the parameters required for any scenario. I mean the following is NOT something I am going to do:
    estimateCosts(int nights, int people, int months ... etc);
    That's not a very elegant way of going about it.
    What is the "Context" going to have?Yep I agree, but so far my limited brain has only come up with that! I am open to any other sugestion! always if i understand it first!
    Basically the Context would better be named as Criteria and it would be an interface as follows:
    interface Criteria{}
    Then I would create two classes that implement the Criteria object as follows:
    class AppartmentCriteria implements Criteria{
    public Result estimateCosts(int nights, int people);
    class HouseCriteria implements Criteria{
    public Result estimateCosts(int months);
    Now when I recieve the inputs, depending on the scenario the Criteria is typecasted and the correct parameters passed and we recieve the Result.
    I feel the above sucks since I am not seeing it as an object oriented way of doing this out! Is there any other sugestions! The refactoring thing I am intrested in! however really I can not see how such a call to that method could be refectored!
    Thank You,
    tx.
    PS: Sun has blocked my other account as well, and this time they did not even send me an email to confirm that I was registered successfuully :( Is there someone I can contact on this? I guess next time I will reply with tx53m :)

  • How does one pass import parameters to a report within a method?

    Hello all,
    Well how does one  pass import parameters to a report which is within a method ...end method.
    for example :
    method 123
    SUBMIT reportname using selection '1000'
    endmethod .
    Here we need to pass values into the selection screen and run the report for those values.
    The values are say 'ABC'   (  tablename "DEF" and field name "HIJ" ).
    I hope the question is clear, awaiting your response 
    Thanks and Regards,
    Sandeep.

    Go to SE24
    Parameters: Give the Parameter name, Typing method is "Type" is the domain type that u are selecting, say for e.g :  Parameter is "P_CONT" , its associated type "CHAR32" etc
    For Select Options:  Parameter name say "S_CUST", Type"importing". For this you need to give an associated type which must be created as "TABLE TYPE " in SE11. That table type needs to have a "LINE TYPE" .
    LINE TYPE is a Structure created with components "SIGN, OPTION, LOW & HIGH" for select-Options.
    NOTE: for a Table type related to Customer data fields "say KUNNR", the line type created must have the Component Type and data Type corresponding to the Data Element associated with "KUNNR" ;i.e: "CHAR" etc.
    See if this is clear to you or revert back in case of any Confusion.

  • Passing different (multi-) values for parameters to drill-through report, based on clicked subtotal in main report

    In Report Builder 3.0, I have made a main report in which the user can filter the underlying dataset using three parameters (all multi-value). The report shows totals grouped by these three parameters, as well as a grand total. What I want is to click
    on a total, which then opens the drill-through report for the corresponding records. I have achieved this for the grand total; the action in the corresponding text box passes all selected values of the parameters to the drill-through report.
    What I cannot figure out is how to make this work right when clicking on a subtotal. When I use the same expression as for the grand total, the same values for the parameters are passed, instead of the subset that apply to the corresponding text box in the
    main report. I expected this to work, because Report Builder /does/ correctly calculate the SUMs for the different levels, even though the expressions are the same.
    My question is: how do I pass different drill-through (multi-) values for parameters, corresponding to the respective subtotals in the main report?
    (FYI: I am using Microsoft SQL Server 2008 R2 and Report Builder 3.0 .)

    Hello Katherine,
    Thanks once more for your quick reply.
    I was aware of the textbox action "Go to report", and how to pass parameters in general. My question concerned how to determine the scope of the passed multi-value parameters (to the values that apply to the respective group/subtotal). The article you linked
    to is informative, but not a solution to my problem.
    A colleague of mine came up with a pragmatic solution: instead of trying to determine the scope of the parameter values, now I "look to the left in the results table". The two screenshots below should illustrate this. (Screenshots are in Dutch. Specific information
    is pixelated.)
    Unfortunately, I am not able to post images. Once my account is verified, I will edit them in. For now, I hope the text speaks for itself enough.
    [Screenshot: Drill-through parameters - 01: Report Builder tablix with subtotals]
    [Screenshot: Drill-through parameters - 02: Textbox properties (selected in screenshot 01) - Action - Go to report]
    The first screenshot shows the tablix in the Report Builder. The second screenshot shows the properties of the textbox selected in the first.
    Notice that I do not pass parameters for the first two columns, but the actual values. I only pass the parameter (containing /all/ user-selected values) for the third column. In the textbox below the selected one, I pass the actual values for the first column,
    and parameters for the last two. In the textbox above the selected one, I pass the actual values for all three columns.
    The only (cosmetic) flaw this approach has is that in the drill-through report, the list of selected parameters might show values that do not occur in the (corresponding part of the) results, and only for those parameters for which the main report passes (all
    user-selected) parameter values, and not the actual values in the results. The results are correct, though.
    If there is a way to directly determine the scope of multi-value parameters for passing to a drill-through report, I would still like know. But for now, this seems to work.

  • Passing parameters to run() method of a thread?

    hello ppl
    is it possible to pass any parameters to the run() method of a thread
    moreover if i create a thread foo the only method that can run is run() ? i know that i can have more methods and just call them via run().
    i mean that if i create the constructor of the foo class then first the constructor will be called and then the run() method.but in this way only the code inside run() will run autonomously(meaning that for example i'll be able to press a button of my gui).
    thx in advance. =)

    not sure I understand the question completely, but you can try the following. Set up whatever arameters your requiring as member variables of your Runnable. Overload the run() method with parameter list you need. In this overloaded method initialize the member variables in your runnable, which can be used in the run() , no arg version,/ Then the last line of the overloaded version call run(), again no-arg version.
    Not really familiar with thread programming, but I dont see why this wont work.
    Hopefully I understood the question correctly, and this is of some help...

  • How I can pass parameters by POST method?

    How I can pass parameters by POST method?
    I use URL Template iView. I checked Requested Method - POST, but when I started the iView the program says:"It's a GET method!"
    I use httpServletRequest.getMethod()in the program.
    Environment: EP6 SP2
    Thank's! 

    Hi Kremena,
    the OSS stands for "Online Service System" - service.sap.com - messages or directly: service.sap.com/message.
    Hope it helps
    Detlev

  • Pass parameters into a method from other methods.

    I m testing  2 related applications with coded ui test and wanna pass a parameter from one method into another.
    how can i do that?
    Thank you in advance.

    Hi mah ta,
    Could you please tell us what about this problem now?
    If you have been solved the issue, would you mind sharing us the solution here? So it would be helpful for other members who get the same issue.
    If not, please let us know the latest information about it.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • What is the better way to pass input parameters between components?

    Hi all,
    I had a dispute with a colleague about passing data between different WDP Development Components. The situation is like this:
    Colleague has a SearchWDP (parent) und I have a BrowseWDP (child). After searching for some objects and clicking a hit in the SearchWDP, the corresponding details should be shown in BrowseWDP, via passing a bunch of parameters such as selected item's id, etc.
    Now which of the following is the better practice:
    - Defining a node in BrowseWDP (child) with isInputParameter set to TRUE, creating a similar node from the same type (simply via ModelBinding, both WDPs are using the same model) in SearchWDP, and defining a mapping between them so that SearchWDP fills the input nodes. From BrowserWDPs perspective, I'd call this Pull method.
    or...
    - Defining a node in BrowseWDP (child) with isInputParameter set to FALSE, creating a setter method in BrowseWDP Interface Controller for the collection (to be passed as parameters) and calling a wdContext.nodeBlaBla().bind(pInputParameterFromModelType). From BrowserWDPs perspective, I'd call this Push method.
    The colleague's argumentation in favor of Push has not convinced me at all and I'd like to ask your opinions. Is there a best practice or recommendation for this scenario? TIA
    ps: Any answer will be rewarded.

    Hi Cuneyt,
    Refer the links below, they are very informative!
    http://help.sap.com/saphelp_nw04s/helpdata/en/22/15a441cd47a209e10000000a155106/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/67/cc744176cb127de10000000a155106/content.htm
    These links are a part of the WebDynpro ABAP documentation, but the concepts are same for WDA and WDJ.
    Considering your scenario, I would recommend the first alternative you have mentioned (if you refer the second link its called External Context Mapping), where component controller context node of component A (SearchWDP) is the source for Interface controller context (same name) of component B (BrowseWDP).
    Thanks.
    Chitrali

  • Using values passed by parameters

    I'm hoping someone can help me understand how to use the value provided in a parameter. I must pass 3 different parameters to 3 differetn output statements.
    I am supplied with the following:
    public class TestProgram {
          * Method to assign parameter num to valueAmt
         public void valueAmt(int num) {
    public static void main(String[] args) {
         //Create an object of type TestProgram to use for the testing
              testProgram testItem = new TestProgram();
              testProgram.valueAmt(133);
              System.out.println .....           
    I am having trouble developing the statement(s) that I need to "pull" the 133 that is provided into a calculation in my System.out line. If is use 'num' in my calculation this does not work - does not find 'num'. I believe I am missing a statement or two.
    Also, as I said, I must do this 3 times for 3 difft amounts. How do I do the 2nd and 3rd amounts - do I create 2 more objects such as testProgram testItem2 = new TestProgram2(), etc?
    Thanks.

    Have you looked at your stack trace to see what the error is?
    It may be a typo, but
    testProgram testItem = new TestProgram();
    should be
    TestProgram testItem = new TestProgram();
    AND
    testProgram.valueAmt(133);
    should be
    testItem.valueAmt(133);
    As far as doing it three times, you could use a loop or simply call testProgram.valueAmt(someVal) from three println statements. Put the call right in the println statement. Although, since valueAmt returns void, it might be better to put the println statement in it and call it three times (loop or otherwise) from main.
    -S.

Maybe you are looking for

  • Solution Extension Contacts in the UK

    Who should partners contact if they want to discuss becoming a solution extension partner in the UK?

  • UoM at sales order is EA...

    Hi, UoM at sales order is EA. while at delivery, I want to display UoM as KG & again at invoice it should be EA. How to configure this? considering 1 EA = 1 KG as conversion maintained at Mat Master. Br, Bala.

  • How to make a screen field as selected when we place the cursor in the fiel

    Hi,    I have a requirement like, needs to be automatically select a screen field value when i place the cursor in that field.     The screen field value should be displayed in blue color as like we select the value using shift-end. when a new value

  • Streaming Netflix via Pro to TV

    Hello, I would like to stream movies from Netflix on the Macbook Pro to my TV. I bought a Moshi Mini Displayport to HDMI Adapter and plugged into the laptop. I then removed the HDMI cable from my DVD player and plugged it into the adapter. I followed

  • Windows Detected a hard disk problem Toshiba Satellite L505-S5988

    It has been about 2 months since I had my new laptop and first I coudnt get the flash cards to work so I finally fixed that and now everytime I start windows an error message comes up and keeps coming up every 10 minutes saying: Windows detected a ha