Implementing a object using cofiles

Hi Folks,
Do anyone here has an idea of what are the do's and dont's while importing an object into a server using cofiles or what kind of problems we will be facing.
Here is a case.
A developer has implmeneted an object (no development done from SE38 like...) by importing the cofiles into the development server.Now when I am trying to add some code it is not allowing me.What suprising is INSERT  REPLACE DELETE CANCEL buttons are showing up as in the case of a standard program.It is allowing me to insert the new code after I click on INSERT.Why is it so ?
The imported objects are ZOBJECTS.
Thanks,
K.Kiran.

Hi,
Original System DEV
Req 12345
Program ZXYZ.
Got the cofiles and the data files of the above request from the system.
Imported these cofiles and data files into a differernt system whose Original System is EDC.But still the Original Sys(Go To>>Object Directory entry >> for this program alone is DEV and not EDC even after successful implmentation.
After importing the objects the program is working fine.But sometimes when I am trying to make the changes to this program the extreme left side of the whole code is getting marked as XXX and not letting me change the code and showing me
INSERT REPLACE DELETE CANCEL  buttons which is letting me change the code only when I press the corresponding button.
Sometimes the Basis team has to manually move the request to Quality as the requests won't get moved when done through STMS.
As per the above replies,I have to change the Original Sys from DEV to EDC ie current system but when I am trying to do that by OBJECT DIRECTORY ENTRY this field is in non editable.How to change this programs Origianl system as EDC.
The only solution that is striking to me is to copy this program into a new program so that the Original System wil be EDC.
Kindly Opine.
Thanks,
K.Kiran.

Similar Messages

  • Implementation Business Objects in CAF and developing WDJ application

    Hi Experts,
    I've read some articles about SAP CE CAF from SDN and I'm making some exercises according those guidence. Right now I have a problem and want to get suggestion from you. 
    As you know, from CE 7.1.1, the CAF support importing the Business Object through EJB model. So when develop a WDJ application using caf, we can using these procedures:
    (Implementing business objects in CAF and developing WebDynpro application)
    1) Create business objects or application service.
    2) Generate EJB Implementation class for business objects or app service.
    3) Create a WebDynpro application
    4) Importing the EJB model using the template.
    5) Create the UI for the app.
    My problem is: In the business object or application serivice, if the operation parameter type is integer, after we generate the EJB class, the type will changed to String. After the WDJ UI is created, the application test failed. The integer field could not passed to the BO successfully.
    If all the parameters type are string in the operation, there's no problem.  But when I use Integer or Date, the EJB class will change the type and the WDJ app will failed.
    I've also test the scenario in CE enviroment including 7.3 also failed. So I'm a little confused which step was wrong. I don't know whether you've seen such problem before, if you could give any suggestion, it'll be very appreciated!

    Hi, Winters.
       I got the same program, try to parse into the type which you want in AS operation.
    BR.
    Louis Huang.

  • How to identify various objects used in code

    Hi All,
    Can anyone tell me how can I list down various objects used in a program.
    For example in a report program if I am calling a function module, calling an include program, implementing a class and so on. Now I want to list down the objects used in the above program.
    Thanks in advance,
    Venkat

    This can get you started.
    DATA:
      code_rec(132),
      itab LIKE STANDARD TABLE OF code_rec.
    DATA:
      obj_text(40),
      it_search LIKE STANDARD TABLE OF obj_text.
    PARAMETERS:
      prog        TYPE sobj_name.
    START-OF-SELECTION.
      PERFORM search_table.
      REFRESH itab.
      READ REPORT prog INTO itab.
      CHECK sy-subrc = 0.
      LOOP AT itab INTO code_rec.
        TRANSLATE code_rec TO UPPER CASE.
        LOOP AT it_search INTO obj_text.
          SEARCH code_rec FOR obj_text.
          CHECK sy-subrc EQ 0.
          WRITE:/ 'Found ', obj_text, 'in', code_rec.
        ENDLOOP.
      ENDLOOP.
    *&      Form  search_table
    FORM search_table.
      REFRESH it_search.
      PERFORM add_a_search USING 'CALL FUNCTION'.
    ENDFORM.                    " search_table
    *&      Form  add_a_search
    FORM add_a_search USING  p_text.
      obj_text =  p_text.
      TRANSLATE obj_text TO UPPER CASE.
      APPEND obj_text TO it_search.
    ENDFORM.                    " add_a_search

  • Sorting a vector of objects using attribute of object class as comparator

    i would like to sort a vector of objects using an attribute of object class as comparator. let me explain, i'm not sure to be clear.
    class MyObject{
    String name;
    int value1;
    int value2;
    int value3;
    i've got a Vector made of MyObject objects, and i would sort it, for instance, into ascending numerical order of the value1 attribute. Could someone help me please?
    KINSKI.

    Vector does not implement a sorted collection, so you can't use a Comparator. Why don't you use a TreeSet? Then you couldclass MyObject
      String name;
      int value1;
      int value2;
      int value3;
      // Override equals() in this class to match what our comparator does
      boolean equals (Object cand)
        // Verify comparability; this will also allow subclasses.
        if (cand !instanceof MyObject)
          throw new ClassCastException();
        return value1 = cand.value1;
      // Provide the comparator for this class. Make it static; instance not required
      static Comparator getComparator ()
        // Return this class's comparator
        return new MyClassComparator();
      // Define a comparator for this class
      private static class MyClassComparator implements Comparator
        compare (Object cand1, Object cand2)
          // Verify comparability; this will also allow subclasses.
          if ((cand1 !instanceof MyObject) || (cand2 !instanceof MyObject))
            throw new ClassCastException();
          // Compare. Less-than return -1
          if ((MyObject) cand1.value1 < (MyObject) cand2.value1))
            return -1;
          // Greater-than return 1
          else if ((MyObject) cand1.value1 > (MyObject) cand2.value1))
            return 1;
          // Equal-to return 0.
          else
            return 0;
    }then just pass MyObject.getComparator() (you don't need to create an instance) when you create the TreeSet.

  • Web Dynpro Callable Object : use of RFCs

    Hi All,
    I've to create a callable object using Web dynpro.
    In this web dynpro to display a table data populated by calling RFC and we need to select one row of the table and sent it as output parameter.
    My question is how we gonna set the getDescription Method in this case for creating the Callable Object?
    How we define the execute Method in the Interface Controller.
    Where I should bind the Model to Controller (Component Controller / Interface Controller)
    Can someone explain how we gonna use RFC in Web dynpro while calling it as Callable Object.
    Thanks
    Srikant

    Hi,
    You need to have the SCs for local development of Web Dynpro callable object.
    Refer the following documents for more details:
    <a href="/people/andre.truong/blog/2006/06/26/working-with-the-apis-of-caf-guided-procedures-nwdi-or-local-development with the APIs of CAF Guided Procedures: NWDI or Local Development?</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f7be53bb-0b01-0010-1c96-be3cb6799c1b">How to Get NW04s SP7 Guided Procedure APIs for Local Development</a>
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3f07a7a-0601-0010-ebbd-b9cfb445b814">Implementing a Web Dynpro Callable Object</a>
    Let me know if this solves your issue.
    Thanks,
    Dipankar

  • Problem occured when create a tree table for master-detail view objects using SQL queries?

    I am programming a tree table for master-detail view objects using SQL queries and these 2 view objects are not simple singel tables queries, and 2 complex SQL are prepared for master and view objects. see below:
    1. Master View object (key attribute is SourceBlock and some varaible bindings are used for this view object.)
    SELECT  cntr_list.SOURCE_BLOCK,                   
            sum(                   
             case when cntr_list.cntr_size_q = '20'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr20 ,                   
            sum(                   
             case when cntr_list.cntr_size_q = '40'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr40 ,                   
             sum(                   
             case when cntr_list.cntr_size_q = '45'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr45                    
    FROM (       
        SELECT yb1.BLOCK_M as SOURCE_BLOCK,       
               scn.CNTR_SIZE_Q,        
               count(scn.CNTR_SIZE_Q) AS cntr_qty        
        FROM  SHIFT_CMR scm, SHIFT_CNTR scn, YARD_BLOCK yb1, YARD_BLOCK yb2       
        WHERE       
        scm.cmr_n = scn.cmr_n             
        AND (scm.plan_start_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS')                 
        OR scm.plan_end_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS'))                 
        AND scm.shift_mode_c = :ShiftModeCode                           
        AND scm.end_terminal_c = :TerminalCode      
        AND scm.start_terminal_c = yb1.terminal_c                  
        AND scm.start_block_n = yb1.block_n                  
        AND substr(scn.start_location_c,(instr(scn.start_location_c,',',1,5)+1),instr(scn.start_location_c,',',1,6)-(instr(scn.start_location_c,',',1,5)+1)) BETWEEN yb1.slot_from_n AND yb1.slot_to_n                  
        AND scm.end_terminal_c = yb2.terminal_c                  
        AND scm.end_block_n = yb2.block_n                  
        AND substr(scn.end_location_c,(instr(scn.end_location_c,',',1,5)+1),instr(scn.end_location_c,',',1,6)-(instr(scn.end_location_c,',',1,5)+1)) BETWEEN yb2.slot_from_n AND yb2.slot_to_n           
        AND scn.status_c not in (1, 11)             
        AND scn.shift_type_c = 'V'             
        AND scn.source_c = 'S'       
        GROUP BY yb1.BLOCK_M, scn.CNTR_SIZE_Q       
    ) cntr_list       
    GROUP BY cntr_list.SOURCE_BLOCK
    2. Detail View object (key attributes are SourceBlock and EndBlock and same varaible bindings are used for this view object.)
    SELECT  cntr_list.SOURCE_BLOCK, cntr_list.END_BLOCK,                
            sum(                     
             case when cntr_list.cntr_size_q = '20'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr20 ,                     
            sum(                     
             case when cntr_list.cntr_size_q = '40'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr40 ,                     
             sum(                     
             case when cntr_list.cntr_size_q = '45'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr45                      
    FROM (         
        SELECT yb1.BLOCK_M as SOURCE_BLOCK,     
               yb2.BLOCK_M as END_BLOCK,  
               scn.CNTR_SIZE_Q,          
               count(scn.CNTR_SIZE_Q) AS cntr_qty          
        FROM  SHIFT_CMR scm, SHIFT_CNTR scn, YARD_BLOCK yb1, YARD_BLOCK yb2         
        WHERE         
        scm.cmr_n = scn.cmr_n               
        AND (scm.plan_start_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS')                   
        OR scm.plan_end_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS'))                   
        AND scm.shift_mode_c = :ShiftModeCode                             
        AND scm.end_terminal_c = :TerminalCode        
        AND scm.start_terminal_c = yb1.terminal_c                    
        AND scm.start_block_n = yb1.block_n                    
        AND substr(scn.start_location_c,(instr(scn.start_location_c,',',1,5)+1),instr(scn.start_location_c,',',1,6)-(instr(scn.start_location_c,',',1,5)+1)) BETWEEN yb1.slot_from_n AND yb1.slot_to_n                    
        AND scm.end_terminal_c = yb2.terminal_c                    
        AND scm.end_block_n = yb2.block_n                    
        AND substr(scn.end_location_c,(instr(scn.end_location_c,',',1,5)+1),instr(scn.end_location_c,',',1,6)-(instr(scn.end_location_c,',',1,5)+1)) BETWEEN yb2.slot_from_n AND yb2.slot_to_n             
        AND scn.status_c not in (1, 11)               
        AND scn.shift_type_c = 'V'               
        AND scn.source_c = 'S'         
        GROUP BY yb1.BLOCK_M, yb2.BLOCK_M, scn.CNTR_SIZE_Q         
    ) cntr_list         
    GROUP BY cntr_list.SOURCE_BLOCK, cntr_list.END_BLOCK
    3. I create a view link to create master-detail relationship for these 2 view objects.
    masterview.SourceBlock (1)->detailview.SourceBlock (*).
    4. I create a tree table using these 2 view objects with master-detail relationship.
    When I set default value for variable bindings of these 2 view objects and the matching records exist, tree table can work well. I can expand the master row to display detail row in UI.
    But I need to pass in dymamic parameter value for variable bindings of these 2 view objects, tree table cannnot work again. when I expand the master row and no detail row are displayed in UI.
    I am sure that I pass in correct parameter value for master/detail view objects and matching records exist.
    Managed Bean:
            DCIteratorBinding dc = (DCIteratorBinding)evaluteEL("#{bindings.MasterView1Iterator}");
            ViewObject vo = dc.getViewObject();
            System.out.println("Before MasterView1Iterator vo.getEstimatedRowCount()="+ vo.getEstimatedRowCount());
            System.out.println("Before MasterView1Iterator ShiftModeCode="+ vo.ensureVariableManager().getVariableValue("ShiftModeCode"));
            vo.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
            vo.ensureVariableManager().setVariableValue("DateTo", dateTo);
            vo.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
            vo.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
            vo.executeQuery();
            System.out.println("MasterView1Iterator vo.getEstimatedRowCount()="+ vo.getEstimatedRowCount());
            DCIteratorBinding dc1 = (DCIteratorBinding)evaluteEL("#{bindings.DetailView1Iterator}");
            ViewObject vo1 = dc1.getViewObject();
            System.out.println("Before DetailView1Iterator vo1.getEstimatedRowCount()="+ vo1.getEstimatedRowCount());
            System.out.println("Before DetailView1Iterator ShiftModeCode="+ vo1.ensureVariableManager().getVariableValue("ShiftModeCode"));
            vo1.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
            vo1.ensureVariableManager().setVariableValue("DateTo", dateTo);
            vo1.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
            vo1.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
            vo1.executeQuery();
            System.out.println("after DetailView1Iterator vo1.getEstimatedRowCount()="+ vo1.getEstimatedRowCount());
    5.  What's wrong in my implementation?  I don't have no problem to implement such a tree table if using simple master-detail tables view object, but now I have to use such 2 view objects using complex SQL for my requirement and variable bindings are necessary for detail view object although I also think a bit strange by myself.

    Hi Frank,
    Thank you and it can work.
    public void setLowHighSalaryRangeForDetailEmployeesAccessorViewObject(Number lowSalary,
                                                                              Number highSalary) {
            Row r = getCurrentRow();
            if (r != null) {
                RowSet rs = (RowSet)r.getAttribute("EmpView");
                if (rs != null) {
                    ViewObject accessorVO = rs.getViewObject();
                    accessorVO.setNamedWhereClauseParam("LowSalary", lowSalary);
                    accessorVO.setNamedWhereClauseParam("HighSalary", highSalary);
                executeQuery();
    but I have a quesiton in this way. in code snippet, it is first getting current row of current master VO to determine if update variables value of detail VO. in my case, current row is possibly null after executeQuery() of master VO and  I have to change current row manually like below.
    any idea?
                DCIteratorBinding dc = (DCIteratorBinding)ADFUtil.evaluateEL("#{bindings.SSForecastSourceBlockView1Iterator}");
                ViewObject vo = dc.getViewObject();           
                vo.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
                vo.ensureVariableManager().setVariableValue("DateTo", dateTo);
                vo.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
                vo.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
                vo.executeQuery();
                vo.setCurrentRowAtRangeIndex(0);
                ((SSForecastSourceBlockViewImpl)vo).synchornizeAccessorVOVariableValues();

  • How to implement Com-Objects?

    Hello,
    I use an ActiveX software which should be implemented in LabView. Now I want to know, if it is possible to implement Com-Objects from this ActiveX software in my LabView Application. When it is possible, where can I find this Com-Objects? Of course the ActiveX components are already implemented in LabView.

    hello mobmon,
    create an "Automation refnum" - control on your frontpanel (can be found under the "Refnum" palette), then select your object or browse for it (right klick "Select ActiveX class"). after that you have to wire the control with the "Automation open" and "Close Reference" functions from the "ActiveX" palette. After that you have access to methods an properties.
    hope it works
    chris
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • Persistenance for Java Objects Using Toplink

    Hi All Happy New Year
    I am trying the a tutorial in Jdeveloper 10.1.3.0.4 called
    Provide Persistenance for Java Objects Using Toplink.
    I have followed the instructions and get the following error.
    com.evermind.reflect.UndeclaredExceptionTypeException: oracle.oc4j.rmi.OracleRemoteException
         at __Proxy1.persistEntity(Unknown Source)
         at acme.ejb.session.EmpSessionClient.main(EmpSessionClient.java:29)
    oracle.oc4j.rmi.OracleRemoteException: Invocation error: java.lang.NoSuchMethodException: acme.ejb.session.EmpSession.persistEntity(java.lang.Object)
    The release notes mention TopLink POJO's Must Implement java.io.Serializable When Returned From a Session Bean's Remote Interface (4902787) When creating a session bean facade for TopLink POJO objects, you must implement java.io.Serializable for each of the TopLink POJO objects returned from the SessionBean facade through a remote interface. This is typically required when using ADF Swing, a EJB Sample Client, or when your EJB Session Bean resides on a separate application server from the client. You can also tell you you need to implement java.io.Serializable when you get the following exception:
    com.evermind.reflect.UndeclaredExceptionTypeException:
    /oracle.oc4j.rmi.OracleRemoteException/
    at __Proxy1.[Your Class Name Here] (Unknown Source)
    The workaround is to manually edit each POJO object to implement java.io.Serializable.
    I have only one POJO which is declared as follows:
    public class EmpInfo implements Serializable {
    Can anybody help me understand what I need to do to get it to work?
    Many Thanks in Advance

    Hi,
    can you send me your test scenario/project at anuj dot k dot jain at oracle dot com. I tried reproducing this but was unable to do so.
    Thanks,
    anuj dot k dot jain at oracle dot com

  • Intersecting Objects using Java

    Hullo everyone,
    I've got a problem at the moment so I've decided to turn to these forums once again for some helpful insight as 2 + hours of Googling hasn't helped me in the slightest. I'm trying to create a mini-scale Katamari game (hopefully you're familiar with it, basically it's one ball rolling over other balls to grow in size) on Java and I've finally got all my graphics and move directions in place. Now though I can't seem to get the collision to work...
    I'm trying to make the Katamari circle intersect with the little circle items on the playing field but currently the ball circle just ghosts over them. So basically I'm trying to get a circle to collide with other circles but I have no idea where to start. :S
    My circle items contain int x, y and radius fields and have been automatically set to their respective sizes by the game.
    I was thinking of working something out like:
    boolean testIntersection(Item item)
    if (distance between katamari ball and item <= radius of ball + radius of item)
    return true;
    else return false;
    But whenever I put something like that in, it still doesn't detect collision. Any thoughts or help on this would be very much appreciated. :)

    If you use object that implement Shape, then there is a contains and a collision implemented in the Shape interface.
    Aside from that, you need to calculate from the center point of both your objects to get a true distance:
    if your objects use an upper left corner for the drawing location and that is what your x and y represent, then you need to translate that to the center of your object. The distance between you objects can be given by:
    sqrt((X2-X1)^2 + (Y2-Y1)^2)
    Where X1, X2, Y1, and Y2 are center coordinates of your object.
    Note this well always be a positive value.
    The tolerance of your distances for an intersection would be R1+R2 so you will get the resulting conditional:
    if((R1+R2)<sqrt((X2-X1)^2 + (Y2-Y1)^2) {
      //what ever collision code you want
    }Please note, that you may want to include equality into your conditional and use the "<=" comparator, to include the condition that they "kiss".
    Also please note that these values need to be implemented in double, rather than int to do away with errors introduced by integer math and when you do implement using double, then double introduces it's own set of errors due to incapability to absolutely represent values not inherently reproducible by the double type. To over come that you may want to implement using a delta value or "close enough:
    {code}
    if(delta < abs(((R1+R2)-sqrt((X2-X1)^2 + (Y2-Y1)^2)) {
    //what ever collision code you want
    {code}

  • Implement Naming convention using code inspector

    Hi,
    We have to implement naming convention using code inspector,if anybody has already done it plz help
    me inunderstanding the problem.
    help is appreciated.

    We're also using the code inspector for naming conventions.
    Try this link:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/nw/how to build a new check for the code inspector
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/evaluating the quality of your abap programs and other repository objects with the code inspector

  • Implementing 3D Object

    Implementing 3D Object
    Hi, I am taking an introductory Java course at school, and I need some help with implementing one class to another.
    I am trying to put Kuma.java (3D object) into KumaPanel.java (above the buttonPanel), but I have no clue how. Would it be easier if I just write one class instead of trying to link these two together?
    Here are my codes:
    Kuma.java:
    import java.awt.Frame;
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.behaviors.vp.OrbitBehavior;
    import com.sun.j3d.utils.geometry.*;
    import com.sun.j3d.utils.universe.*;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    import com.sun.j3d.loaders.objectfile.ObjectFile;
    import com.sun.j3d.loaders.*;
    public class Kuma extends Applet
        static boolean application = false;
           public static void main(String[] args)
                application = true;
             Frame frame = new MainFrame(new Kuma(), 640, 480);
         public void init()
              setLayout(new BorderLayout());
              Canvas3D c = new Canvas3D(SimpleUniverse.getPreferredConfiguration());
             add("Center", c);
             SimpleUniverse universe= new SimpleUniverse(c); // setup the SimpleUniverse, attach the Canvas3D
             BranchGroup scene = createSceneGraph();
             universe.getViewingPlatform().setNominalViewingTransform();
            scene.compile();
            universe.addBranchGraph(scene); //add your SceneGraph to the SimpleUniverse
              //Rotate the cube
              OrbitBehavior cameraRotate = new OrbitBehavior(c);
              cameraRotate.setSchedulingBounds(new BoundingSphere());
              universe.getViewingPlatform().setViewPlatformBehavior(cameraRotate);
        public BranchGroup createSceneGraph()
             BranchGroup root = new BranchGroup();
             TransformGroup tg = new TransformGroup();
            Transform3D t3d = new Transform3D();
                try
                    Scene s = null;
                    ObjectFile f = new ObjectFile ();
                  f.setFlags (ObjectFile.RESIZE | ObjectFile.TRIANGULATE | ObjectFile.STRIPIFY);
                   if (application == false)
                        java.net.URL neuron = new java.net.URL (getCodeBase(), "walk.obj");
                        s = f.load (neuron);
                        tg.addChild (s.getSceneGroup ());
                   else
                        String s1 = "walk.obj";
                        s = f.load (s1);
                        tg.addChild (s.getSceneGroup ());
               catch (java.net.MalformedURLException ex){
               catch (java.io.FileNotFoundException ex){
               // create an ambient light
               BoundingSphere bounds = new BoundingSphere (new Point3d (0.0, 0.0, 0.0), 100.0);
               Color3f ambientColor = new Color3f (1.0f, 1.0f, 1.0f);
               AmbientLight ambientLightNode = new AmbientLight (ambientColor);
               ambientLightNode.setInfluencingBounds (bounds);
               root.addChild (ambientLightNode);
               root.addChild(tg);
              t3d.setTranslation(new Vector3f(100.0f, 0.0f, -100.0f));
               return root;
    KumaPanel.java:
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Container;
    import java.awt.FlowLayout;
    import java.awt.Font;
    import java.awt.image.BufferedImage;
    import javax.imageio.ImageIO;
    import java.io.File;
    import java.io.IOException;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class KumaPanel extends JFrame implements ActionListener, KeyListener{
         JPanel buttonPanel = new JPanel();
         public static int WIDTH = 800;
         public static int HEIGHT = 600;
         KumaPanel()
              ///Create a Content Window
              setSize(WIDTH, HEIGHT); //setting the size of the window
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//for closing the window
              setTitle("Nazo Nazo"); //title of the window
              Container contentPane = getContentPane();
              contentPane.setBackground(Color.blue); //background color of the panel
              ///Create a White Button Panel
              contentPane.setLayout(new BorderLayout());
              buttonPanel.setLayout(new FlowLayout()); //set layout type to FlowLayout
              buttonPanel.setBackground(Color.black); //background to white
              contentPane.add(buttonPanel,BorderLayout.SOUTH); //add buttonPanel on contentPanel
              ///Create First Button with Kuma Ranger on it
              ImageIcon smiley1 = new ImageIcon("kuma.jpg");
              JButton firstButton = new JButton("kuma");
              firstButton.setIcon(smiley1);
              firstButton.setBackground(Color.white);
              buttonPanel.add(firstButton);          //add button to buttonPanel
              firstButton.addActionListener(this);
              ///Create First Button with Mrs.Smile on it
              ImageIcon smiley2 = new ImageIcon("inu.jpg");
              JButton secondButton = new JButton("inu");
              secondButton.setIcon(smiley2);
              secondButton.setBackground(Color.white);
              buttonPanel.add(secondButton);          //add button to buttonPanel
              secondButton.addActionListener(this);
              ///Create First Button with Mrs.Smile on it
              ImageIcon smiley3 = new ImageIcon("usa.jpg");
              JButton thirdButton = new JButton("usa");
              thirdButton.setIcon(smiley3);
              thirdButton.setBackground(Color.white);
              buttonPanel.add(thirdButton);          //add button to buttonPanel
              thirdButton.addActionListener(this);
         public static void main(String[] args)
              KumaPanel iDemo = new KumaPanel();
              iDemo.setVisible(true);
         public void actionPerformed(ActionEvent e) {
              Container contentPane = getContentPane(); //getting the contentPane of the window
              if (e.getActionCommand().equals("inu")) {
                   contentPane.setBackground(Color.green);
                   System.out.println("I have pressed the GREEN smiley...");
              else if (e.getActionCommand().equals("kuma")) {
                   contentPane.setBackground(Color.red);
                   System.out.println("I have pressed the RED smiley...");
              else if (e.getActionCommand().equals("usa")) {
                   contentPane.setBackground(Color.yellow);
                   System.out.println("I have pressed the YELLOW smiley...");
              else
                   System.out.println("There is an error.");
         @Override
         public void keyPressed(KeyEvent e) {
              // TODO Auto-generated method stub
         @Override
         public void keyReleased(KeyEvent e) {
              // TODO Auto-generated method stub
         @Override
         public void keyTyped(KeyEvent e) {
              // TODO Auto-generated method stub
    }Thank you!

    cider wrote:
    I am trying to put Kuma.java (3D object) Not exactly. It's an Applet, and this distinction is important.
    into KumaPanel.java (above the buttonPanel), and this is a JFrame, another important distinction.
    but I have no clue how. Would it be easier if I just write one class instead of trying to link these two together?In general, no. You want to keep things that are logically distinct in their own classes and files. BUT, combining what you have posted here unfortunately is like combining oil and water. Since Kuma is an Applet, it uses AWT GUI components which don't mesh well with KumaPanel's Swing components. Also, an Applet is Root container as is a JFrame. Both of them are sort of like final destinations for components and don't readily "go in" to something else. You need to combine something that is compatible with the other and easily goes into something else. For instance if Kuma where a JPanel, it would be be easy to put it into a JFrame somewhere.
    I suggest that you go through the Java Swing tutorials to get a better appreciation of java GUI programming before trying to tackle something like what you are trying to do here.

  • Reset CAN Network Object using NI-XNET

    This post
    http://forums.ni.com/t5/Automotive-and-Embedded-Networks/How-can-I-reset-a-NI-CAN-network-object-wit...
    mentions that there is a better way to reset an NI CAN network object using the NI-XNET API. Can someone please share how to do this using XNET? What's the equivalent of ncReset in XNET?
    Thanks.

    Sima,
    Unfortunately, XNET does not have an implementation of a board reset.  There certainly are cases in which one would be useful, so you can always fill out a Product Suggestion.  If you do decide to do that, which I definitely encourage you to do, be sure to include as many specifics about the scenario as you can to show that you really do need a board reset and not just an XNET clear.  Hopefully this feature will get implemented in the future with this feedback, and I'm sorry there isn't a better solution right now.
    Best,
    Jen W
    Applications Engineer
    National Instruments

  • Implementing SPI protocol using PXI-7833R

    Hello everyone,
    I'm trying to implement SPI protocol using PXI-7833R, so that it should behave as a SPI master and should be able to communicate with a SPI device (treated as slave).
    Now I already found an example, but the problem is, this example uses cRIO-9103 as FPGA target and in my case I'm going to use PXI-7833R as FPGA target, and when I'm changing the target (from cRIO-9103 to PXI-7833R), I dont know how to map I/O's listed under 'Chassis I/O' (under cRIO) to the new target (which is PXI-7833R).
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

    Hi All,
    Somehow I was able to change the target (from cRIO to PXI-7833R).... but now I'm getting an error while trying to compile the code.
    The error description is:
    "Multiple objects are requesting access to a resource through a resource interface from both inside and outside the single-cycle Timed Loop, which is not supported.
    Place all objects requesting access to the resource interface either inside or outside the single-cycle Timed Loop."
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • Report to check authorization object used in customized programs

    Hi Guys,
    An auditor came and he raised a question to us, he asked whether all of our customized transactions and programs are maintained with authorization checks? The question is how can we check what authorization objects are used for our customized programs and transaction codes? The developer did not maintain the objects used for that program in SU24 table. Is there a program or a report to show us all the authorization object used for a customised program or transaction? Example : T-code MIGO we can check in SU24 table for all the authorization object used. How do we check for customized tcodes? Please advise. Thanks!
    Edited by: Jarod Tan on Nov 25, 2010 9:42 AM

    Note that some programs are built in such a way that no (visible) auth check is necessary, or even desired at all.
    To determine the necessity of an auth check, you should check that starting it has an entry point (tcode, rfc, service) which is appropriately restricted. The rest (whether and where and how a further check is evaluated) is entirely dependent to what the program actually does.
    Well designed applications generally have centralized functions and methods, and the checks are in there or a "base check" they use.
    Others again use the same in UI programming to determine the visibility of functions, to make the application more intuitive for the user. This on it's own is however not a sufficient auth check to rely on.
    Code review is an art form!
    Cheers,
    Julius

  • Dynamic Creation of Objects using Tree Control

    I am able to Create Dynamic Objets using List control in
    flex,but not able to create objects using TreeControl,currently iam
    using switch case to do that iam embedding source code please help
    me how to do that
    <?xml version="1.0" encoding="utf-8"?>
    <!--This Application Deals With How to Create Objects
    Dynamically -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:XML id="treeDP">
    <node label="Controls">
    <node label="Button"/>
    <node label="ComboBox"/>
    <node label="ColorPicker"/>
    <node label="Hslider"/>
    <node label="Vslider"/>
    <node label="Checkbox"/>
    </node>
    </mx:XML>
    <mx:Script>
    <![CDATA[
    import mx.core.UIComponentGlobals;
    import mx.containers.HBox;
    import mx.controls.*;
    import mx.controls.VSlider;
    import mx.controls.Button;
    import mx.controls.Alert;
    import mx.core.UIComponent;
    import mx.controls.Image;
    import mx.managers.DragManager;
    import mx.events.DragEvent;
    import mx.controls.Tree;
    import mx.core.DragSource
    import mx.core.IFlexDisplayObject;
    /*This function accepts the item as on when it is dragged
    from tree Component */
    private function ondragEnter(event:DragEvent) : void
    if (event.dragSource.hasFormat("treeItems"))
    DragManager.acceptDragDrop(Canvas(event.currentTarget));
    DragManager.showFeedback(DragManager.COPY);
    return;
    else{
    DragManager.acceptDragDrop(Canvas(event.currentTarget));
    return;
    /*This Function creates objects as the items are Dragged
    from the TreeComponent
    And Creates Objects as and When They Are Dropped on the
    Container */
    private function ondragDrop(event:DragEvent) : void
    if (event.dragSource.hasFormat("treeItems"))
    var items:Array =event.dragSource.dataForFormat("treeItems")
    as Array;
    for (var i:int = items.length - 1; i >= 0; i--)
    switch(items
    [email protected]())
    case "Button":
    var b:Button=new Button();
    b.x = event.localX;
    b.y = event.localY;
    b.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    myCanvas.addChild(b);
    break;
    case "ComboBox":
    var cb:ComboBox=new ComboBox();
    myCanvas.addChild(cb);
    cb.x = event.localX;
    cb.y = event.localY;
    cb.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    break;
    case "ColorPicker":
    var cp:ColorPicker=new ColorPicker();
    myCanvas.addChild(cp);
    cp.x = event.localX;
    cp.y = event.localY;
    cp.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    break;
    case "Vslider":
    var vs:VSlider=new VSlider();
    myCanvas.addChild(vs);
    vs.x = event.localX;
    vs.y = event.localY;
    vs.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    break;
    case "Hslider":
    var hs:HSlider=new HSlider();
    myCanvas.addChild(hs);
    hs.x = event.localX;
    hs.y = event.localY;
    hs.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    break;
    case "Checkbox":
    var check:CheckBox=new CheckBox();
    myCanvas.addChild(check);
    check.x = event.localX;
    check.y = event.localY;
    check.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    break;
    else {
    var Component:UIComponent =
    event.dragSource.dataForFormat("items") as UIComponent ;
    Component.x = event.localX;
    Component.y = event.localY;
    Component.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
    myCanvas.addChild(Component);
    /*How to move the Objects within the Container */
    public function mouseMoveHandler(event:MouseEvent):void{
    var
    dragInitiator:UIComponent=UIComponent(event.currentTarget);
    var ds:DragSource = new DragSource();
    ds.addData(dragInitiator,"items")
    DragManager.doDrag(dragInitiator, ds, event);
    ]]>
    </mx:Script>
    <mx:Tree dataProvider="{treeDP}" labelField="@label"
    dragEnabled="true" width="313" left="0" bottom="-193" top="0"/>
    <mx:Canvas id="myCanvas" dragEnter="ondragEnter(event)"
    dragDrop="ondragDrop(event)" backgroundColor="#DDDDDD"
    borderStyle="solid" left="321" right="-452" top="0"
    bottom="-194"/>
    </mx:Application>
    iwant to optimize the code in the place of switch case
    TextText

    Assuming your objects are known and what you need are simply
    variable names created by the program, try using objects as
    associative arrays:
    var asArray:Object = new Object();
    for (var n:int = 0; n < 10; n++) {
    asArray["obj" + n] = new WHAT_EVER();

Maybe you are looking for

  • FM to delete / clear payment block in Sales Order

    Hi, Could any one tell me the FM to delete payment block in the Sales Order in the Billing Plan. My requirement is, on any given date, if the payment is due,  remove the payment block for the sales order. The Payment block value is in FPLT-FAKSP fiel

  • HT203167 can't find downloaded movies on ipad

    I paid for and dowloaded 2 movies to my ipad. Did not get a chance to watch. When I went to video' my movies are not there. How do I find them on  my ipad?

  • Dreamweaver Update Issue

    Hi I am using CS3 and used the command server behaviour to set up an update function on a webpage. It is to update multiple records. I am getting the following error Microsoft VBScript compilation error '800a0408' Invalid character /myLists_Add.asp,

  • Installing CS3 Upgrade Version on a NEW PC

    Hello, I've had a lot of problems contacting Adobe and hope you can help me. I'm getting a new PC soon and want to install my copy of CS3 Design Standard. The disk here is an upgrade disk as I had the original creative suite (also an upgrade disk). B

  • Creating/Calling Grouped screens

    Hi experts, we have multiple module pool programs and we are trying to group many commonly used dynpros together in another program.Any hints on how to create such common programs and how should that be called in individual programs. Regards, Dan