DMS: Objectlink to more than 50 inspection methods(QMBDOC) gives dump

Dear All,
I have a requirement of attaching more than 50 objectlink for inspection methods to one document info records.
So when i attach 40 to 50 inspection methds by BDC program or manualy & then i again try to attach one more inpection method object by clicking on F4 it gives a Runtime error  RAISE_EXPECTION
Short Text: Exception condition "INVALID_DYNPROFIELD" raised.
A RAISE statement in the program "SAPLSHL2" raised the exception
condition "INVALID_DYNPROFIELD".
Since the exception was not intercepted by a superior
program, processing was terminated.
Is there any note to be applied for this.
I got a note:896655, which says i can attach upto 100 object links to a DIR, but this is giving a error after 40-50 object links when ever i click F4 for attaching more.if i manually put value in the inspection method name it takes it & also saves it.
Please advice.
Regards
Nishant..

Dear Nishant,
please check if the notes 880077 and 885977 are implemented. These notes solve several object link related issues too.
Further please check the settings for object links in your customizing.
First of of it is necessary to maintain the correct screen numbers for all needed objects within the customizing. Therefore go to transaction SPRO and select
Cross-Application Components
  > Document Management
      > Control Data
          > Maintain Screen for Object Link
Here you can enter all needed SAP objects with the name and
the related screen number. If you do not know the object or the screen number you can display a list of all SAP standard objects in transaction SE80 under function group CV130 ("Screens").
So for material master you maintain the following entry:
SAP object    Screen    Description    Auth.
MARA            201       material master      1
Please note that the system automatically adds the leading "1" which is displayed in function group CV130 under
"Screens". So for object MARA you just have to enter 201 instead of 1201.
The value "1" in the column "Auth." is necessary to grant that always the latest dynpros and authorizations were used when linking this object to an document info record. This will avoid different problems by displaying linked documents from the object side.
The next step is to decide which objects should be used in the different document types. Therefore please go to transaction DC10 and choose the relevant document type. Afterwards please select "Define object links". Here you can
add all needed objects only by entering the object. The correct screen number is taken automatically. Also note the blue information buttons in the upper right corner which contain further necessary informations about the possible settings of the current screen.
After doing these settings in customizing you should be able to link the maintained objects to document info records and oppositely.
Important notes regarding the object link functionalities are:
880077:  Performance problem using object links
885977:  Extension to note 867241 on object links
926060:  Extension of note 885977 for object link Purchase Order
960202:  Object Links Deleted While Adding New Objects
1002648: Wrong behaviour while using RFC_CHANGE_DOCUMENT_MASTER
Best regards,
Christoph

Similar Messages

  • Post more than Costing Method to MAC

    Hi All,
    can i post more than costing method to mac at the same time
    assume that i have two warehouses ,one = standard method and the onther = Actual method and i want to post the inventory transactions to the MAC
    is it possible
    thanks
    best regards
    Amr Hussien

    Hi Amr
    You cant post one transaction with two different costing methods. ie. If you have inventory transaction then you can post this only with one cost method. However, you can (THOUGH NOT RECOMMENDED AND HAS POSSIBILITY OF ERROR) do post certain transactions say production with one cost method and inventory with actual. The cost that is picked up by MAC is the one that comes in as GL Cost. The GL Cost is picked up based on the costing method defined in the fiscal policy. Each time you run the GL Cost Update you would have to change this and then run the GL Cost Update.
    Regards
    Girish

  • Making an int() return more than one method?

    hey people. i need an int, for example,
    public int someInt(){
    return 1000;
    }to return more than one number. To clarify, i need to be able to call the int() and it return me three different values. Is this possible?

    BigDaddyLoveHandles wrote:
    Word origins: guru
    Hmmm... "Heavy, weighty"
    Reminds me of a t-shirt my brother has. He's a rather portly gentlemen. The shirt has a picture of Buddha and the caption, "I have the body of a god."

  • More than one, OneToOne relation gives problem

    This is my bean class structure
    @Entity
    @Table(name="TBL_PRODUCTS")
    public class TblProducts implements Serializable
       @Id
       @Column(name="PRODUCT_ID")   
       private BigDecimal productId;
       @Column(name="PRODUCT_NAME")   
       private String productName;
       @JoinColumn(name="BRAND_NAME")   
       private String brandname;
       @OneToOne(fetch=FetchType.LAZY,mappedBy="tblProducts")   
       private TblCellphone tblCellphone;
       @OneToOne(fetch=FetchType.LAZY,mappedBy="tblProducts")
       private TblTelevision tblTelevision;
    @Entity
    @Table(name="TBL_CELLPHONE")
    public class TblCellphone implements Serializable
       @Id
       @Column(name="PRODUCT_ID")   
       private BigDecimal productId;
    private String camera;
    @OneToOne(optional=false)
         @JoinColumn(name="PRODUCT_ID")   
    private TblProducts tblProducts;
    @Entity
    @Table(name="TBL_TELEVISION")
    public class TblTelevision implements Serializable
       @Id
       @Column(name="PRODUCT_ID")
       private BigDecimal productId;
       @Column(name="SCREEN_SIZE")
       private String screenSize;
       @OneToOne(optional=false)
       @JoinColumn(name="PRODUCT_ID")   
       private TblProducts tblProducts;
    } Here Tblproduct is my product table , I need to make a relation with all other subcategory products table.
    But when I try to add the more than one OneToOne relation with product table it gives following error
    java.lang.NullPointerException
       at org.hibernate.cfg.OneToOneSecondPass.doSecondPass(OneToOneSecondPass.java:135)
       at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
       at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:296)
       at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
       at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1233)
       at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
       at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:869)
       at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:407)
       at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
       at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source) is there any help how to overcome this problem
    By
    Thiagu.m

    You could read the spool directly from table TSP01
    SELECT *
      INTO TABLE SPOOL_TABLE
      FROM TSP01
      WHERE RQIDENT IN R_SPOOL
        AND RQOWNER IN R_OWNER
        AND RQCRETIME IN R_DATUM.
    Greetings,
    Blag.

  • Combining more than one method

    Hi all,
    I am trying to combine the below method 3 times and piece together the resulting characters (ieAAA),
    Random rand = new Random();
    int num = rand.nextInt(10);
    char myChar = (char) ('A' + num);
    System.out.println("The random string is: "+myChar);
    I have tried,
    Random rand = new Random();
    int num1 = rand.nextInt(10);
    int num2 = rand.nextInt(10);
    int num3 = rand.nextInt(10);
    char myChar1 = (char) ('A' + num1);
    char myChar2 = (char) ('A' + num2);
    char myChar3 = (char) ('A' + num3);
    System.out.println("The random string is: " myChar1, myChar2, + Char3 )
    Obviously does not work. Any suggestions?
    Stona

    well, the problem is that you are using commas in the last statement, try this:
    Random rand = new Random();
    int num1 = rand.nextInt(10);
    int num2 = rand.nextInt(10);
    int num3 = rand.nextInt(10);
    char myChar1 = (char) ('A' + num1);
    char myChar2 = (char) ('A' + num2);
    char myChar3 = (char) ('A' + num3);
    System.out.println("The random string is: " +myChar1 + myChar2 + myChar3);Or if you want, it may be:
    Random rand = new Random();
    String string = "";
    for (int i = 1; i <= 3; i++) {
         int num = rand.nextInt(10);
         char myChar = (char) ('A' + num);
         string = string + myChar;
    System.out.println("The random string is: " + string);

  • Accessing image in more than one method

    Hi,
    I am trying to create an image manipulation system. For the purposes of the example I am trying to load an image into the system, and then within one method, call another to manipulate the image.
    I am having problems with the accessing of the image. Here is the code:
    public class imageRead3 {
    public static Image blur(String begin) {
        String end = "blur_pred_1280.jpg";                                        
        ImageDecoder input = ImageFile.createImageDecoder(begin);
        ImageEncoder output = ImageFile.createImageEncoder(end);
        float sigma = 1.0f;
        BufferedImage inputImage = input.decodeAsBufferedImage();
        Kernel kernel = new GaussianKernel(sigma);
        System.out.println("Convolving with a " + kernel.getWidth() +
             "x" + kernel.getHeight() + " kernel...");
        ConvolveOp blurOp = new ConvolveOp(kernel);
        IntervalTimer timer = new IntervalTimer();
        timer.start();
        BufferedImage outputImage = blurOp.filter(inputImage, null);
        System.out.println("Gaussian blur finished [" +
          timer.stop() + " sec]");
        output.encode(outputImage);
        return outputImage;
      public static Vector doSomething() throws IOException {
         String begin = "pred_1280.jpg";
         Image image = blur(begin);  //This is where I am having problems.  I want to use this method to run a gaussian blur over the image.  I then want to use that blurred image within this method.
         int w = image.getWidth(), h = image.getHeight();
         ....do something with blurred image
      public static void main(String[] args){     
        try {
          doSomething();
        catch ( Exception e ) {
         return;
      }Now the blur method saves the blurred image file to disk. I want to be able to access it without saving it to disk first. Is there any way I can do this?
    With thanks
    N.

    Well you got two potions
    1 - pas it as an argument
    2 - put it in member variable of the class.
    but the best to do will be define a good class to represent your image and then write method on that class to manipulate it.
    You can use the constructor to create an object of it and load the image and the call other methods to manipulate the image

  • Error message that no virtual memory pops up & crashes when application is run for more than 1 hour

    My application uses VISA serial operations. It has arrays to store data collected from various devices. I reinitialise the arrays each time the index reaches 50.
    Data acquisitions is carried out in separate threads by invoking the runVI method.
    When i run the application on Win XP continuaously for more than 1 hour it gives an error message that no more virtual memory to complete the task and the system hangs up.
    I open the serial port only once and close it when the application is terminated. But serial read/write operations are done continuaously
    Is the error caused due to memory leakage? How can i solve the problem. It's very urgent and i shall be thankful if i ge
    t the help.

    Yes, it sounds like a memory leakage (either that or you're trying to run an advanced app on an old computer w/ little memory and a small hard drive).
    Things to try:
    1. Ensure it's only labview, and not say labview and another application interacting. This isn't a likely case, but you never know what people have on their boxes and I've seen some weird things with virus scanners. Hit Ctrl-Shift-Esc to get the task manager. Go to processes and watch the memory consumption (click Memory twice to sort in descending order) of the various processes. If labview keeps rising, you've got a leak.
    2. If only a reasonable amount of memory is being used, double check your page file settings (read virtual memory).
    From the Control Panel
    Select System
    Select
    Advanced Tab
    Under Performance, select the Settings button
    Select Advanced Tab
    Under Virtual Memory, let windows dynamically adjust the page file (and any XP speed tweakers out there can now chime in about how wrong this is. This essentially allows windows to keep upping the virtual memory as needed by various processes.
    3. Find the leak. In LV Tools->Advanced->Profile VIs. Turn on memory stats. Start the profiler. Start your vi. If the vi crashes labview totally, you'll have to keep hitting snapshot to find the leaky vi (the one that's memory keeps growing).
    4. Upload the vi to the forum so we can give it a looksee.
    G'luck
    2006 Ultimate LabVIEW G-eek.

  • ORA-01704:String literal too long with update of more than 4000 chars

    Hi,
    I want to update a table column in Oracle Database(version 10) with more than 4000 chars.
    The datatype of the table column is NCLOB.
    I want to achieve this with one single line of update query as below,
    update mytable set MY_DESCRIPTION = 'longdesc' where ID = '111' ;
    But there's a problem, if the 'longdesc' is more than 4000 chars, it gives the error , "ORA-01704:String literal too long"
    How can I achieve this in sql developer ?
    I dont want to do this using stored procedures, I want to do this update using only sql statement.
    Please help.
    thanks,
    sudhakar

    Hello Sudhakar,
    I am afraid, this will never work by SQL.
    Just because an SQL-Statement must not contain a string literal over 4,000 characters (or did that change lately?).
    Maybe you can bypass the limit with PL/SQL ... but you will certainly run into the 32K limit sooner or later
    regards
    Peter

  • How to send more than one parameter from FORM to REPORT?

    Dear all,
    i can send one parameter from FORM to REPORT. but when i send more than one parameter it gives error: frm 41214 unable to run report.
    here is the code i think the error is in the following line of procedure:
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_date_from='||v_date_from||'p_date_to='||v_date_to);
    where to place the parameters and is there any space is required?
    Thanks
    Muhammad Nadeem

    Dear Saeed Iqbal,
    thanks for you reply.
    dear i am using Form 10g run_product is not supported in this version.
    i am using RUN_REPORT_OBJECT.
    PROCEDURE rep_gl_ledger IS
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(50);
    v_date_from date;
    v_date_to date;
    v_detail_id_from varchar2(100);
    v_detail_id_to varchar2(100);
    v_voucher_type varchar2(100);
    --req_no char(17);
    BEGIN
    v_date_from :=      :ledger_para.p_date_from;
    v_date_to :=      :ledger_para.p_date_to;
    v_detail_id_from :=      :ledger_para.p_detail_id_from;
    v_detail_id_to :=      :ledger_para.p_detail_id_to;
    v_voucher_type :=      :ledger_para.p_voucher_type;
    repid := find_report_object('gl_ledger');
    --repid := find_report_object('REPORT80');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_online_FRHome');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_date_from='||v_date_from||'p_date_to='||v_date_to);
    --SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no');
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    /* Display report in the browser */
    WEB.SHOW_DOCUMENT('http://'||:GLOBAL.G_IP||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?','_blank');
    ELSE
         message('Error when running report');
    END IF;
    END;
    Regards:
    Muhammad Nadeem

  • Inspection method error in Ale

    Dear All,
    I am use ALE idoc to transfer inspection plan fron one client to another.
    While sending inspection plan i am getting an error that no valied version of inspection method found.
    But when i have checked this inspection metod , it is there with released version.
    For one material plan get uploaded with this inspection method but gives error for another material inspection plan for same method
    regards
    Edited by: amol shahane on May 26, 2009 11:51 AM

    Hi amol
    use ALE idoc to transfer inspection plan fron one client to another.
    While sending inspection plan i am getting an error that no valied version of inspection method found
    Check the date of Creation of Version of Inspection Method that you are trnasfering.This must be prior to that of Creation of inspection plan.
    For one material plan get uploaded with this inspection method but gives error for another material inspection plan for same method
    check the valide from date of this Inspection plan in MAPL
    for said material plan it must be prior.
    Regards
    Sujit S Gujar

  • Report output more than 255

    Hi,
    I want to print my report more than 255 characters..
    i was taken line size more than 255 but it gives error.
    Please give me the appropriate answer.

    hI..
    THIS FROM  <b>SAP HELP</b>.
    <b>REPORT <rep> LINE-SIZE <width>.</b>
    This statement determines the width of the output list of program <rep> as <width> characters. If you set <width> to zero, the system uses the width of the standard list.
    <b>The maximum line width is 1,023 characters.</b>
    <b>A line can be up to 255 characters long</b>. However, if you intend to print the list, note that most printers cannot print lists wider than 132 characters. If you want to print the list directly while creating it, the page width must comply with one of the existing print formats. Otherwise, the system will not print the list (see Print Parameters). Make sure not to choose a list width exceeding 132 characters, unless you create the list for display only.
    While creating the list, the system field SY-LINSZ contains the current line width. To adapt the list width to the current window width, see Lists with Several Pages.

  • How to enhance table control in DMS. Need to display doknr more than 25 cha

    Hi there.
    In transaction IL03 - document tab - I need to display a doknr which is longer than 25 characters.
    I search for exit/enhancement for DMS - saplcv140/control SUB_DOC, but cant find anything.
    If it is not possible to enhance this field, i would like to add a new field (more than 25 char) and fill in the long doknr.
    The documents that are attached contains both an internal docnumber(from the external system) and an external docnumber (functional location type of number). It is very important to show external documentno in the table control.
    Actually in the table DRAW the external dok number is in the field MRK_FILEP. Can this field somehow get in the tablecontrol?
    Anybody has experience with docno longer than 25 characters? Or how to enhance tablecontrol sub_doc (screen 0204) in fuction group CV140.
    Br,
    Liselotte.

    The BAdI CRM_BADI_RF_Q1O_SEARCH is for enhancing OneOrder based searches. Not for business partners.
    The BAdI CRM_BUPA_IL_SEARCH is the way to go. I just checked in our system.
    In the method SEARCH_CRITERIA_INITIAL check if your field is supplied in IS_PARAMETERS. If yes return CV_IS_NOT_INITIAL = 'X'.
    Then in SEARCH_PARTNERS you delete the entries from table CT_PARTNER_KEYS according to your parameter.
    However this is not very performant. If you have a search with criteria only of your own for the BAdI SAP coding will first select everything and then you filter out.
    Anyway, it is much faster to implement than a new search...
    cheers Carsten
    Edited by: Carsten Kasper on Nov 18, 2008 7:44 PM

  • Why cant I call a getResultSet method more than 1

    Why cant I call the getRSS method more than 1 time from my page?
    I have a class called methods class, here is the code:
    public class methodsClass {
        public java.sql.Connection objConn = null;
        public String query = null;
        public java.sql.PreparedStatement statement = null;
        public java.sql.ResultSet objRS = null;
        /** Creates a new instance of methodsClass */
        public methodsClass() {}
         public ResultSet getRSS(String sql)
            String strSQL = sql;
            try
                Class.forName("oracle.jdbc.driver.OracleDriver");
                objConn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:CCD","system", "Abcd1234");
                statement = objConn.prepareStatement(strSQL,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
                objRS = statement.executeQuery();
            catch (Exception e)
                System.err.println("Error in getRSS method");
                e.printStackTrace();
            return objRS;
        public void killConn()
            try
                    objRS.close();
                    System.out.println("Resultset is closed");
                    statement.close();
                    System.out.println("Statement is closed");
                    objConn.close();
                    System.out.println("Connection is closed");
                catch(Exception e)
                System.err.print("Unable to kill all objects");
                e.printStackTrace();
    //END OF CLASS***************************************** I call the method from the following jsp:
    <%
    String eqCat = "Tracked Vehicle";
    String strSQL = "SELECT DISTINCT * FROM robert WHERE eqcategory = '"+eqCat+"'";
    methodsClass mc = new methodsClass();
    ResultSet objRS = mc.getRSS(strSQL);
    java.lang.System.out.println(strSQL);
    %>
         <select name="selectBox">
         <% while(objRS.next()){
             out.println("<option value='"+objRS.getString("eqtype")+"'>"+objRS.getString("eqtype")+"</option>");
               mc.killConn();
    %> The above works fine.
    If I try to call the getRSS function again on this page I get the following error:javax.servlet.ServletException: Exhausted Resultset
    I tried to call it like so:
    newNameSQL = "Select * from robert where eqtypes = 'someVariable'";
    newNameRS = mc.getRSS(strSQL);
    <%=newNameRSS.getString("something");%>I cant understand why I get this error, I am closing the rs,conn and statement in the killConn method.
    TIA!

    I did that but still the same error. The problem is when I attempt to open up another resultset on the same page I get the Exhausted ResultSet error. I have even eliminated the class file altogether by doing this:
      String eqCat = "Tracked Vehicle";
      String strSQL = "SELECT DISTINCT eqtype FROM robert WHERE eqcategory = '"+eqCat+"'";
      Class.forName("oracle.jdbc.driver.OracleDriver");
      Connection objConn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:CCD","system", "Abcd1234");
      PreparedStatement statement = objConn.prepareStatement(strSQL,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
      ResultSet objRS = statement.executeQuery();
      System.out.println(strSQL);
    //The above works fine and then below I add this and the error comes back
         <select name="cs_popup_name_1" onchange="CSURLPopupShow(/*CMP*/'cs_form_name_1', /*CMP*/'cs_popup_name_1', 'Main');">
         <% while(objRS.next()){
            String eq = objRS.getString("eqtype");
             out.println("<option value='"+eq+"'>"+eq+"</option>");
    objRS.close();
    objConn.close();
    statement = null;
    strSQL = null;
    strSQL = "SELECT * FROM robert";
      Class.forName("oracle.jdbc.driver.OracleDriver");
      objConn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:CCD","system", "Abcd1234");
      statement = objConn.prepareStatement(strSQL,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
      ResultSet rs = statement.executeQuery();
      System.out.println(strSQL);
    //If I leave the field below commented out I get no errors, but if I comment it out I get the error
    <a href="#" onmouseover="showImg('<%=rs.getString("img1")%>')">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Building a method with more than one result data

    Hi, everyone:
    I'm a little shy to ask this question, however, it's been hanging in my mind for so long, so I think I'd rather make a confession on it. You may laugh at me if you want, I'm ready for that, but I more look forward to that someone can really give me the light, or even the link, or some hint....
    For your ease of reading, I give the question first, and my whole story behind:
    When I need a method which can provide more than one result( in other words, multiple outputs), how can I do it in Java? As I know, either you pass and object, or the result of the function is an object will do , for the object contains the datas you want, but that means your needs for those data have to be defined in object format in advance, won't that be inconvinient? Or Java has a better solution for that?
    //And here's the whole story....
    I began my career as a programmer by starting with LabVIEW, it's a graphical programming language made by National Instrument, and it's powerful on DAQ, and industrial field. One of the most important issues on design is to devide your system into multiple functions( in its own term: subVI), I think it's just like applying structured analysis method.
    When we dealing with functions in LabVIEW, a programmer can define his own function with mulitiple inputs and outputs, for example, I can design a function called SumAndDevide, which accepts two input ( two variables to be summed and devided) and gives two results( result of summing and that of deviding).
    The methodology has its power, at least it provide the functional decomposition, and you can compose a suitable solution in certain circumstance even they are not the smallest unit function. And testing is easy. It affects me so large that I look the trail of it when I come to other programming languages. In COBOL( well, that is a VERY old COBOL version ), I was scared to find there is no protection to the inner data on the performed sections, while making a outside subroutine to be called is cubersome and really a hard work. When I came to Delphi, I knew that using the result of a function cannot satisfy me, for it give only one output, even you can define it as variant, but I think it's vague to realize. So I use the difference of called by value and called by reference to handle the problem, that is: a value parameter for the input, and a variable paramter for the output.
    Well, when I came to Java, I am stunned again, now there is no passing by reference mechanism in Java, otherwise you have to pass it as an object, but that means when you need multiple outputs, the output has to be defined in object form in advance. And that will be very inconvinient!! I tried to find some solutions, but I can't. So is there any way that in Java you can define a method with multiple output? or Java handles the problem in totally different way?
    Any comments will be appreciated!!
    Thanks!!
    aQunx from Taiwan

    You missed the most common OO solution - separation of concerns and implementation hiding.
    If you have a function which returns a string, that is one method of the object that provides the service.
    If you have a function which returns a real, that is a different method of the object.
    If both functions require common code, move that into a private method which is called by both. If the method is costly, cache the result.
    eg an aerodynamics properties class, which could be done as a multivalued return of (lift, drag), refactored to independent lift() and drag() methods, which delegate to an interpolate() method, which caches the interpolated value and uses mach, pressureHeight and _alpha to determine whether it should recalculate:  /**
       * Calculates the aerodynamic drag force at a given mach, alpha and pressure height.
      public double drag (final double aMach, final double aPressureHeight, final double aAlpha) {
        interpolate(aMach, aPressureHeight, aAlpha);
        return _drag;
       * Calculates the aerodynamic lift force at a given mach, alpha and pressure height.
      public double lift (final double aMach, final double aPressureHeight, final double aAlpha) {
        interpolate(aMach, aPressureHeight, aAlpha);
        return _lift;
      private void interpolate (final double aMach, final double aPressureHeight, final double aAlpha) {
        if (aMach != _mach) {
          setMach(aMach);
          _pressureHeight = Double.NaN;
        if (aPressureHeight != _pressureHeight) {
          setPressureHeight(aPressureHeight);
          _alpha = Double.NaN;
        if (aAlpha != _alpha) {
          setAlpha(aAlpha);
    ... actual interpolation happens in the private setXXX methods.

  • Method called more than once - and dies with EXC_BAD_ACCESS error

    Hi,
    In my app, I have 4 views with their respective viewControllers. In the appDelegate.m, I provide methods that allows to switch to any of these views. Following is code for switching to the editView:
    -(void) flipToEditView {
    [self populateTheList]; // populate an array
    EditViewController *anEditVC = [[EditViewController alloc] initWithNibName:@"EditView" bundle:nil];
    [self setEditVC:anEditVC];
    [viewController.view removeFromSuperview];
    [self.window addSubview:[editVC view]];
    [anEditVC release]; }
    The view is not switched - and moreover, this method is called more than once; and the app dies with EXCBADACCESS!
    2009-08-23 14:54:40.648 iNotate[2128:20b] Album (before): x= 0 y=20 width=320 height=460
    2009-08-23 14:54:40.653 iNotate[2128:20b] Album (after): x= 0 y= 0 width=320 height=480
    warning: Couldn't find minimal bounds for "_sigtramp" - backtraces may be unreliable
    (gdb) bt
    #0 -[iNotateAppDelegate flipToEditView] (self=0x523690, _cmd=0x9563) at /Users/sam/MY_FILES/iPhone Apps/app/Classes/iNotateAppDelegate.m:116
    #1 0x00008661 in -[FirstView editAction] (self=0x546a30, _cmd=0xac94) at /Users/sam/MY_FILES/iPhone Apps/app/FirstView.m:25
    #2 0x30a4eee6 in -[UIApplication sendAction:to:from:forEvent:] ()
    #3 0x30ab0d36 in -[UIControl sendAction:to:forEvent:] ()
    #4 0x30ab11fe in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
    #5 0x30ab0544 in -[UIControl touchesEnded:withEvent:] ()
    #6 0x30a67917 in -[UIWindow sendEvent:] ()
    #7 0x30a56fff in -[UIApplication sendEvent:] ()
    #8 0x30a561e0 in _UIApplicationHandleEvent ()
    #9 0x31565dea in SendEvent ()
    #10 0x3156840c in PurpleEventTimerCallBack ()
    #11 0x94a713c5 in CFRunLoopRunSpecific ()
    #12 0x94a71aa8 in CFRunLoopRunInMode ()
    #13 0x31566600 in GSEventRunModal ()
    #14 0x315666c5 in GSEventRun ()
    #15 0x30a4eca0 in -[UIApplication _run] ()
    #16 0x30a5a09c in UIApplicationMain ()
    #17 0x000027e8 in main (argc=1, argv=0xbffff068) at /Users/sam/MY_FILES/iPhone Apps/app/main.m:14
    Current language: auto; currently objective-c
    (gdb) continue
    2009-08-23 14:54:55.885 iNotate[2128:20b] >>>>>>>>>>>>>>>>>> populateTheList
    (gdb) bt
    #0 -[iNotateAppDelegate flipToEditView] (self=0x523690, _cmd=0x9563) at /Users/sam/MY_FILES/iPhone Apps/app/Classes/iNotateAppDelegate.m:116
    #1 0x00008661 in -[FirstView editAction] (self=0x5457b0, _cmd=0xac94) at /Users/sam/MY_FILES/iPhone Apps/app/FirstView.m:25
    #2 0x30a4eee6 in -[UIApplication sendAction:to:from:forEvent:] ()
    #3 0x30ab0d36 in -[UIControl sendAction:to:forEvent:] ()
    #4 0x30ab11fe in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
    #5 0x30ab0544 in -[UIControl touchesEnded:withEvent:] ()
    #6 0x30a67917 in -[UIWindow sendEvent:] ()
    #7 0x30a56fff in -[UIApplication sendEvent:] ()
    #8 0x30a561e0 in _UIApplicationHandleEvent ()
    #9 0x31565dea in SendEvent ()
    #10 0x3156840c in PurpleEventTimerCallBack ()
    #11 0x94a713c5 in CFRunLoopRunSpecific ()
    #12 0x94a71aa8 in CFRunLoopRunInMode ()
    #13 0x31566600 in GSEventRunModal ()
    #14 0x315666c5 in GSEventRun ()
    #15 0x30a4eca0 in -[UIApplication _run] ()
    #16 0x30a5a09c in UIApplicationMain ()
    #17 0x000027e8 in main (argc=1, argv=0xbffff068) at /Users/sam/MY_FILES/iPhone Apps/app/main.m:14
    (gdb) continue
    2009-08-23 14:55:22.493 iNotate[2128:20b] >>>>>>>>>>>>>>>>>> populateTheList
    Program received signal: “EXCBADACCESS”.
    (gdb) continue
    What's happening here?
    Sam!

    -(void) flipToEditView {
    [self populateTheList]; // populate an array
    EditViewController *anEditVC = [[EditViewController alloc] initWithNibName:@"EditView" bundle:nil];
    [self setEditVC:anEditVC];
    [viewController.view removeFromSuperview];
    [self.window addSubview:[editVC view]];
    [anEditVC release]; }
    }<---- is this } matched elsewhere?

Maybe you are looking for