Accessing array content methods

This is quite simple to do in C++ from what I remember but its got me stumped so far (it is getting late so maybe my brains slowing down).
I simply want to access an object in my array and use its getValue() function to return the value of that object.
Unfortunately I can't seem to do it at the moment.
I presumed i'd be able to do something like MyArray.get(1).getValue.
Basically im looking for the Java version of MyArray[1].getValue()
Sorry to bother you with such a simple question but the search archive had posts focusing on accessing classes from other classes/packages.
Thanks

jverd,
I haven't set my array to specifically store a
specific object, however I know it always will.
Are you suggesting there is a better way?Declare the type to be as specific as you can.
If you're only sticking Foo objects in there, declare it as Foo[]. If you're sticking Foo and Bar objects in there, but the have a common superclass or implement a common interface Baz, then declare it as Baz[]. BUT only if you want to use the objects as Bazes. If you're going to have to cast it to Foo or to Bar because you want to access methods that only those classes have--that aren't in Baz--then you probably shouldn't be storing them in the same array.
Storing a single type is also a good idea with Collections. However up through 1.4, you can't declare the type that the collection will hold. With 1.5, generics lets you do that.

Similar Messages

  • How do I access array elements in one method from another method?

    Hi all!
    How do I access the array's elements from another method so that method 2 can have access to method 1's array elements? Thanks for any help!
    I am trying to create a simply program that will use a method to create an array and a SEPARATE method that will sort the array's elements (without using java's built in array features). I can create the program by simply having one method and sorting the array within that same method, BUT I want to sort the array from another method.
    Here's my code so far:
    public class ArraySort {
       public static void createArray(int size){
           double myArray[] = new double[size];    //create my new array
           for(int j=0; j < myArray.length; j++)
              myArray[j] = (200.0 * Math.random() + 1.0);   //fill the array with random numbers
       public static void sortArray(){
           // I WANT THIS METHOD TO ACCESS THE ARRAY ELEMENTS IN THE METHOD ABOVE, BUT DON'T KNOW
          //  HOW???? Please help!
        public static void main(String[] args) {
            createArray(4);    //call to create the array
    }Thanks again!
    - Johnny

    Thanks for the help all! I ve managed to get the program working, using java's built in array sort, but when i try to call on the array sort method from WITHIN my main method, nothing happens!
    Can somebody please tell me why I am not able to call on the sort method from within my main class???? Thanks!
    public class ArraySort {
       public void createArray(double[] arrayName, int size){
           double myArray[] = new double[size];  //create new array
           for(int j=0; j < myArray.length; j++)
              myArray[j] = (200.0 * Math.random() + 1.0);    //populate array with
           }                                                 //random Numbers
           sortArray(myArray); 
       } //Sort array(if I delete this & try to use it in Main method --> doesn't work???
       public void sortArray(double[] arrayName){
           DecimalFormat time = new DecimalFormat("0.00");
           Arrays.sort(arrayName);      //sort array using Java's built in array method
           for(int i = 0; i <arrayName.length; i++)
               System.out.println(time.format(arrayName)); //print arary elements
    public static void main(String[] args) {
    ArraySort newArray = new ArraySort(); //create a new instance
    double myArray[] = new double[0]; //create a new double array
    newArray.createArray(myArray,4); //build the array of indicated size
    //newArray.sortArray(myArray); //This will not work???? WHY?????//

  • Web Dynpro ABAP: How to access the content of a mime object?

    Hi everyone,
    does anybody know how to access the content of a mime object of a Web Dynpro component? I added a XML file as mime object to a web dynpro component. Now I want to read the content of this xml file within a method of the component controller. The code would look something like:
    DATA: xml_content type xstring.
    xml_content = read_mime_object("test_123.xml").
    Any ideas?
    Regards,
    Nils

    dude here's the modification that i've done but I can't still access the content of the properties...
               Mail mail = new Mail();
               String message2 = sqlException.getMessage();
               File file = new File("Add.properties");
               Properties props = new Properties();
               props.load(new FileInputStream(file));
               String[] emailadd = {props.getProperty("emailadd","defaultValue")};
               mail.postMail(emailadd,"An error has occurred, Auto-archive was unsuccessful.", message2,"[email protected]");
               Message was edited by:
    ryshi1264

  • Accessing the content of the MediaPlayer for filtering purposes

    Am I correct in assuming that you can access the content of an element in the MediaPlayer so that you can apply a filter directly to it? If this is possible how can this be done? So far all my attempts to access the media content directly have failed. Help needed, Please.

    The framework has a useful utility class (called ListenerProxyElement) which manages the registration of trait add/remove events that Ryan alludes to.  You could subclass ListenerProxyElement and override the processViewChange method, which exposes the DisplayObject as a parameter, to apply your filter.  The ExamplePlayer sample app has a number of examples that use ListenerProxyElement for similar cases (i.e. to non-invasively alter the behavior of a MediaElement).

  • Tool to access portal content objects offline

    Hi All,
    One of the portal desktop rules configured on our Production system was giving a problem logging in.The problem stated the desktop does not exists, though it was created new. So we deleted the specific desktop and the corresponding desktop rule and since then we are not even able to login to the portal even with the admin user.
    From one of the threads, we found found out that one can access the Portal Display rules directly, using such an url
    http://<YOUR_SERVERHOST_NAME>:<YOUR_PORT>/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fadministrator!2fsystem_admin!2fsystem_admin_role!2fcom.sap.portal.system_admin_ws!2fcom.sap.portal.themes!2fcom.sap.portal.portalDisplayRules
    However using this url we get an exception in red as <b>Acess Denined for the object. See details of the exception in the log files.</b>
    How do we Resolve this error, as no one can access this portal and we need to reset the portal desktop rules as this is urgent.
    Is there any other way from where we can reset the desktop rules without logging in to the portal, as we are not able to login in from the admin also?
    Do we have any command line tool from where we can access the Portal Content offline.
    Thanking you well in advance.
    Thanks and Regards
    Laxman.

    Hi Laxman,
    In my opinion; in the next releases portal drive cannot be extended to access pcd content because it is using webdav protocole to access KM. Webdav is a common method used to access files/folders remotely. ( http://www.ietf.org/rfc/rfc4709.txt )
    However, it will be great if a new tool will be released to access pcd remotely. Working with PCD on content administration menus are really hard.
    In your case, if I understand your point properly;
    If you want to develop your portal without affecting end user, I suggest you to use a test server or install developer workplace on your laptop/pc. I frequently use locally installed developer workplace. When I am dealing with end-user critical works, first I try on local server and after seeing that it works, I move it to the portal. You can work on your local server without danger of breaking down the production server. If there are problems with local portal, you can reinstall or restore from backup easily.
    Regards
    Abdul.

  • Trouble displaying array contents

    I have a class that generates random coin values (int) and then another class to assign the random coin values to an array, but when i attempt to display the array contents I get stuff like "Coin value is HOTcoin@18d107f" instead of a simple integer.
              HOTcoin[] coins = new HOTcoin[8];          
              for(int i = 0; i < coins.length; i++) {
                        coins[i] = new HOTcoin();     
                        System.out.println("Coin value is " + coins);
    I'm sure it's something simple. Can someone help me out?
    Thanks..

    How should it know that when you "print" a HOTcoin object that the representation should just be a number, unless you tell it to do that?
    You need to override the toString() method in the HOTcoin class.

  • Attempted access of inaccessible method

    Attempted access of inaccessible method I cant see the problem as I pass a class with a mesh property .
    I am using AS3 and away3D. Everything loads fine .
    Description      Resource      Path      Location      Type
    1195: Attempted access of inaccessible method enemyMesh through a reference with static type ClassEnemyCube.     
          public function moveForward(amt:int,models:Array):void
                       var enemyMesh2:Mesh;
                      for each (var el:ClassEnemyCube in models) 
                      enemyMesh2=el.enemyMesh(); //error
    calls this property
          public function get enemyMesh():Mesh
                      return model5;
                }

    Syntax for accessors (getters and setters) is the same as for properties. So, you loop must be:
    for each (var el:ClassEnemyCube in models)
         enemyMesh2 = el.enemyMesh;
    Not - there are no parenthesis attached to enemyMesh.

  • Error while accessing a public method of applet from javascript.

    Hi,
    I am getting "Object doesn't support this property or method" error
    when accessing a public method of applet from javascript in IE 6 using
    document.applets[0].myMethod();
    The same is working in IE 7.
    Thanks in advance.
    Regards,
    Phanikanth

    I don't know why it happens, but this works for me in both versions:
    <applet ..... name="MyApplet">
    </applet>and in javascript use
    document.MyApplet.myMethod()

  • As a new MacBook user I plug in my USB Flash Drive but don't know how to access its contents. Please help. Thanks.

    as a new MacBook user, when inserting my USB Flash Drive, I do not know how to access its contents. Please help. Thanks.

    Open a new Finder window, Finder > File > New Finder Window, and it should appear on the left under Devices.
    If you don't see it there, or to get it to show up on the Desktop: Finder > Preferences... General tab, check External disks to have it show on the Desktop,  Or Sidebar tab, check External disks under DEVICES.

  • Doubt in working of Arrays.sort method. help needed !!!!

    Hello Friends,
    I am not able to understand output of Arrays.sort method. Here is the detail of problem
    I wrote one program :
    public static void main(String[] args) throws ClassNotFoundException
         Object[] a = new Object[10];
         a[0] = new String("1");
         a[1] = new String("2");
         a[2] = new String("4");
         a[3] = new String("3");
         a[4] = new String("5");
         a[5] = new String("20");
         a[6] = new String("6");
         a[7] = new String("9");
         a[8] = new String("7");
         a[9] = new String("8");
    /* Sort entire array.*/
         Arrays.sort(a);
         for (int i = 0; i < a.length; i++)
         System.out.println(a);
    and output is :
    1
    2
    20
    3
    4
    5
    6
    7
    8
    9
    Question : Does this output is correct? If yes then on which basis api sort an array? I assume output should be 1 2 3 4 5 6 7 8 9 20.
    Can here any one please explain this?
    Thanks in advance.
    Regards,
    Rajesh Rathod

    jverd wrote:
    "20" and "3" are not numbers. They are strings, and "20" < "3" is exactly the same as "BA" < "C"The above is
    ... quote 20 quote less than quote 3 quote...
    but shows up as
    ... quote 20 quote less than quote...
    Weird.

  • Access of undefined method/property through reference with a static type Class

    I get the following error: (it's not word for word but you get the idea)
    Error: Access of undefined method getStatus through reference with a static type Class.
    Here's what's happening in the code. I'm trying to create a User class that is instantiated at the start of my app. I want the User class to have properties like mainStatus, with helper methods like setStatus etc. Pretty simple.
    so on my HardDisk I have my flash_working folder with all my flash projects. I created my class file/package under the directory com.mypackage
    package com.mypackage
        import flash.display.*;
        public class User extends Sprite
            public var mainStatus:int;
            public function User()
                trace("User Created!");
                mainStatus = 0;
            public function setStatus(status:int):void
             mainStatus = status;
        public function getStatus():int
            return mainStatus;
    Ok, so far so good.
    now I created a new .fla file under the root of /flash_working/. The class file is in /com/mypackage/User.as
    in my .fla file I have:
    import com.mypackage.User;
    var myUser:User = new User();
    var i = User.getStatus();
    trace(i);
    That's all the code I have. Could someone please explain why it's giving me that error?
    If I try to access the public var mainStatus through user.mainStatus that gives a similar error saying:
    Error: Access of undefined property mainStatus through reference with a static type Class.
    Thanks for any help!
    jef3189

    the public getStatus() function that you created needs to be referred to through an instance of the class.
    So:
    import com.mypackage.User;
    var myUser:User = new User();
    var i = myUser.getStatus();
    trace(i);
    Also, an aside. You can create a getter/setter for status, to avoid having to do the function as such.
    package com.mypackage
        import flash.display.*;
        public class User extends Sprite
            public var mainStatus:int;
            public function get status():int
                return mainStatus;
            public function set status(value:int):void
                 mainStatus = value as int;
              public function User()
                trace("User Created!");
                mainStatus = 0;
    And then, you can call it as:
    import com.mypackage.User;
    var myUser:User = new User();
    trace(myUser.status);
    EDIT
    I just noticed that you made the variable public as well, which means you can access it without getter/setter or function.
    import com.mypackage.User;
    var myUser:User = new User();
    trace(myUser.mainStatus);

  • Accessing Documentum Content thru KM in portal

    Hi,
        I am trying to connect to Documentum content thru KM in portal. I am looking for a better approach to do the same.
    http://www.emc.com/products/detail/software/content-services-sap-portal-iviews.htm.
    http://www.emc.com/products/detail/software/file-share-services.htm
    As per the above two  links i understand that documentum content can be accessed by Portal iViews. But not sure from where i can find those iViews? and also not sure whether it can be accessed with Windows file share service?
    Could anybody suggest me which approcah is better ? Either thru portal iViews or thru KM repositories?
    1.    Could anybody guide me what SAP Portal iViews can be used to access Documentum Content?
    2. With either the File system repository manager or WEBDAV Repository manager can we access the the documents directly from the Document file share of Documentum?
    for example.. The Documents are in this path
    Document file share\Repositories\.
    Please guide me on this...
    Point will be rewarded for the rightful answers.
    Regards
    Sireesha.

    Hi,
    I agree that it is worth to try a file system repository on this Documentum File Share.
    However I have some concerns about the performance of this kind of integration.
    I would expect that the Documentum File Share is allready a software tier wrapping the
    core documentum api.
    In addition a file system repository has some disadvantages if you are planning to change the repository content both in KM and in the origin (documentum) system.
    If you do that, the KM file system repository has to synchronize itself again and again.
    The repository (and sometimes the whole portal) may slow down dramatically.
    So give it a try but consider to either buy the documentum repository manager or write your own.
    See the following link to a nice code sample:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/fcc4b3c7-0701-0010-55ab-86e3ec0ce275
    Cheers
    Frank

  • How to access Infocube content using an ABAP program

    Hi,
       I am trying to access infocube contents using a ABAP program in BW.
       It is easy to access ODS content as we have NEW DATA or ACTIVE DATA
       tables. Is there any way we can access Infocube content.
       I tried using the FACT table but it has only Keyfigure data.
    thanks
    arshad.

    Hi,
    I would suggest to use a transactionnal cube, even if you do not use BPS to feed it.
    Then, you create a layout in transaction BPS0 (~ similar to a query), and you can access the cube content by simply using the SAP function <b>API_SEMBPS_GETDATA</b>.
    This is easy and fast.
    Regards,

  • Runtime Error when accessing KM Content

    Hi Everyone,
    I am getting Runtime Error when accessing KM Content through Content Administration/KM Content.
    See the below error information.
    Runtime Error
    An exception occured while processing the request.
    Additional information: String index out of range: -28
    Exception ID = 00a67a58-06f5-2b10-b997-9edccc061ca6
    What could be the problem.
    Any help will be appreciated.
    thank you
    regards
    sunil

    hi Romano
    Here is the log trace file text.
    #1.5#001321C84B3300A304DC7AFD00001D50000465605028DB15#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java### faces a problem time in sequence#2#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#11651182th#
    #1.5#001321C84B3300A304DC7AFF00001D50000465605028DBEB#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java### faces the following problem: #2#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#java.lang.IllegalStateException: CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33 did not confirm instance activity for more than 180 sec.#
    #1.5#001321C84B3300A304DC7B0100001D50000465605028DCB3#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java###CBS Instance pulse thread will try to recover#1#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#
    #1.5#001321C84B3300A304DC7B0200001D50000465605028DE21#1237364243036#com.sap.tc.cbs.server.rt.impl.CourteousTimer##com.sap.tc.cbs.server.rt.impl.CourteousTimer######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error##Java###A problem during RUN
    [EXCEPTION]
    #1#java.lang.IllegalStateException: CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33 did not confirm instance activity for more than 180 sec.
         at com.sap.tc.cbs.server.rt.impl.Pulsar.beforeExecution(Pulsar.java:86)
         at com.sap.tc.cbs.server.rt.impl.CourteousTimer.run(CourteousTimer.java:116)
         at java.lang.Thread.run(Thread.java:534)
    #1.5#001321C84B3300A304DC7B0400001D50000465605028DF04#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java### faces a problem time in sequence#2#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#11651183th#
    #1.5#001321C84B3300A304DC7B0600001D50000465605028DFDA#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java### faces the following problem: #2#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#java.lang.IllegalStateException: CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33 did not confirm instance activity for more than 180 sec.#
    #1.5#001321C84B3300A304DC7B0800001D50000465605028E0A1#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java###CBS Instance pulse thread will try to recover#1#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#
    #1.5#001321C84B3300A304DC7B0900001D50000465605028E1FE#1237364243036#com.sap.tc.cbs.server.rt.impl.CourteousTimer##com.sap.tc.cbs.server.rt.impl.CourteousTimer######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error##Java###A problem during RUN
    [EXCEPTION]
    #1#java.lang.IllegalStateException: CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33 did not confirm instance activity for more than 180 sec.
         at com.sap.tc.cbs.server.rt.impl.Pulsar.beforeExecution(Pulsar.java:86)
         at com.sap.tc.cbs.server.rt.impl.CourteousTimer.run(CourteousTimer.java:116)
         at java.lang.Thread.run(Thread.java:534)
    #1.5#001321C84B3300A304DC7B0B00001D50000465605028E2DF#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java### faces a problem time in sequence#2#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#11651184th#
    #1.5#001321C84B3300A304DC7B0D00001D50000465605028E3B5#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java### faces the following problem: #2#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#java.lang.IllegalStateException: CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33 did not confirm instance activity for more than 180 sec.#
    #1.5#001321C84B3300A304DC7B0F00001D50000465605028E473#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java###CBS Instance pulse thread will try to recover#1#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#
    #1.5#001321C84B3300A304DC7B1000001D50000465605028E5D8#1237364243036#com.sap.tc.cbs.server.rt.impl.CourteousTimer##com.sap.tc.cbs.server.rt.impl.CourteousTimer######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error##Java###A problem during RUN
    [EXCEPTION]
    #1#java.lang.IllegalStateException: CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33 did not confirm instance activity for more than 180 sec.
         at com.sap.tc.cbs.server.rt.impl.Pulsar.beforeExecution(Pulsar.java:86)
         at com.sap.tc.cbs.server.rt.impl.CourteousTimer.run(CourteousTimer.java:116)
         at java.lang.Thread.run(Thread.java:534)
    #1.5#001321C84B3300A304DC7B1200001D50000465605028E6B9#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java### faces a problem time in sequence#2#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#11651185th#
    #1.5#001321C84B3300A304DC7B1400001D50000465605028E798#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java### faces the following problem: #2#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#java.lang.IllegalStateException: CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33 did not confirm instance activity for more than 180 sec.#
    #1.5#001321C84B3300A304DC7B1600001D50000465605028E856#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java###CBS Instance pulse thread will try to recover#1#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#
    #1.5#001321C84B3300A304DC7B1700001D50000465605028E9AD#1237364243036#com.sap.tc.cbs.server.rt.impl.CourteousTimer##com.sap.tc.cbs.server.rt.impl.CourteousTimer######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error##Java###A problem during RUN
    [EXCEPTION]
    #1#java.lang.IllegalStateException: CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33 did not confirm instance activity for more than 180 sec.
         at com.sap.tc.cbs.server.rt.impl.Pulsar.beforeExecution(Pulsar.java:86)
         at com.sap.tc.cbs.server.rt.impl.CourteousTimer.run(CourteousTimer.java:116)
         at java.lang.Thread.run(Thread.java:534)
    #1.5#001321C84B3300A304DC7B1900001D50000465605028EAA5#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java### faces a problem time in sequence#2#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#11651186th#
    #1.5#001321C84B3300A304DC7B1B00001D50000465605028EB87#1237364243036#com.sap.tc.cbs.server.rt.impl.Pulsar##com.sap.tc.cbs.server.rt.impl.Pulsar######6575e170137111de9951001321c84b33#Thread[CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33,10,SAPEngine_System_Thread[impl:5]_Group]##0#0#Error#1#/Applications/CBS/Administration#Java### faces the following problem: #2#CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33#java.lang.IllegalStateException: CBS-Pulsar 12432550/ad9cf170-12e8-11de-99b2-001321c84b33 did not confirm instance activity for more than 180 sec.#
    regards
    sunil

  • ALV - access to protected method

    Hello,
    I have a object from class "CL_GUI_ALV_GRID" and want to change the protected attribute "EVT_DELAYED_CHANGE_SELECTION     Constant     Protected" with the method
        CALL METHOD alv_grid->SET_DELAY_CHANGE_SELECTION
          EXPORTING
            time = lv_delay.
    How can I access this protected attribute?
    Thanks in advance,
    Holger

    This will do what you want
    Trick is to define a sub class inheriting the super class where the protected attributes and methods exist in - then you can access the protected methods and attributes.
    If you do this don't forget to call  the SUPER CONSTRUCTOR (of the class you are inheriting from) in your constructor method. Code example shown below.
    Here I want the original and modified table of an alv grid but you can adapt this code to whatever you need.
    Hope it helps.
    create blank screen (100) with a custom container CCONTAINER1 and the following scren logic in it
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    now look at the code here. Note text in Bold
    PROGRAM zdynfieldcat.
    class zcltest definition  deferred.  "For field symbol reference.
    Simple test of dynamic ITAB with user defined (not ddic) fields
    Build dynamic fcat
    Table structure obtained via new RTTI functionality
    use ALV grid to display and edit.
    Create a blank screen 100 with a custom container called CCONTAINER1.
    James Hawthorne
    Define field symbols as these can't be defined in classes
    field-symbols: <dyn_table> type standard table,
                   <g2> type ref to zcltest,
                   <g1> type ref to cl_gui_custom_container,
                   <actual_tab> type standard table,
                   <outtab> type table,
                   <fs1> type ANY,
                   <FS2> TYPE TABLE,
                   <fs3> type table,
                   <fs4> type table,
                   <fs5> type  table.
    <b>class zcltest definition inheriting from cl_gui_alv_grid.
    define this as a subclass so we can access the protected attributes
    of the superclass cl_gui_alv_grid</b>
      public section.
        types:  g4 type ref to cl_gui_custom_container.
        types:  g3  type ref to cl_alv_changed_data_protocol.
        data:   i_parent type g4,
                lr_rtti_struc TYPE REF TO cl_abap_structdescr, "RTTI
        zog like line of lr_rtti_struc->components. "RTTI
        types: struc like zog.
        types: struc1 type table of struc.
        methods:
           constructor
               importing i_parent type g4,
           disp_tab
               importing  p_er_data_changed type g3,
           create_dynamic_fcat
               importing zogt type struc1
               exporting it_fldcat type lvc_t_fcat.
    Protected section.
       data: stab type ref to data,
            wa_it_fldcat type lvc_s_fcat,
            c_index type sy-index.
    endclass.
    <b>class zcltest implementation.
      METHOD constructor.
        CALL METHOD super->constructor
          EXPORTING
            i_appl_events = 'X'
            i_parent      = i_parent.
          endmethod
    method disp_tab.
    *mt_outtab is the data table held as a protected attribute
    in class cl_gui_alv_grid.
        assign me->mt_outtab->* TO <outtab>. "Original data
        assign p_er_data_changed->mp_mod_rows TO <FS1>.
        stab = p_er_data_changed->mp_mod_rows.
        assign p_er_data_changed->mt_inserted_rows to <fs3>.
        assign p_er_data_changed->mt_deleted_rows to <fs4>.
        assign p_er_data_changed->mt_mod_cells to <fs5>.
        assign stab->* TO <fs2>.
    do whatever you want with <outtab>
    contains data BEFORE changes each time.
    Note that NEW (Changed) table has been obtained already by
    call to form check_data USING P_ER_DATA_CHANGED
    TYPE REF TO CL_ALV_CHANGED_DATA_PROTOCOL.
    Entered data is in table defined by <fs2>
    In this method you can compare original and changed data.
    Easier than messing around with individual cells.
    do what you want with data in <fs2> validate / update / merge etc
      endmethod.</b>
      method create_dynamic_fcat.
        loop at zogt into zog.
          c_index = c_index + 1.
          clear wa_it_fldcat.
          wa_it_fldcat-fieldname = zog-name .
          wa_it_fldcat-datatype = zog-type_kind.
          wa_it_fldcat-inttype = zog-type_kind.
          wa_it_fldcat-intlen = zog-length.
          wa_it_fldcat-decimals = zog-decimals.
          wa_it_fldcat-coltext = zog-name.
          wa_it_fldcat-lowercase = 'X'.
          if c_index eq 2.
            wa_it_fldcat-emphasize = 'C411'.
          endif.
          if c_index eq 3.
            wa_it_fldcat-emphasize = 'C511'.
          endif.
          append wa_it_fldcat to it_fldcat .
        endloop.
      endmethod.                    "create_dynamic_fcat
    endclass.                    "zcltest IMPLEMENTATION
    class lcl_grid_event_receiver definition.
      public section.
    methods:
        handle_data_changed
             for event data_changed of zcltest
            for event data_changed of cl_gui_alv_grid
             importing  er_data_changed,
        toolbar
             for event toolbar of zcltest
             importing e_object
             e_interactive,
        user_command
             for event user_command of zcltest
             importing e_ucomm.
    endclass.
    class lcl_grid_event_receiver implementation.
      method handle_data_changed.
    code whatever required after data entry.
    various possibilites here as you can get back Cell(s) changed
    columns or the entire updated table.
    Data validation is also possible here.
        call method <g2>->disp_tab
          EXPORTING
            p_er_data_changed = er_data_changed.
      endmethod.                    "handle_data_changed
      method toolbar.
        data : ls_toolbar type stb_button.
        clear ls_toolbar.
        move 0 to ls_toolbar-butn_type.
        move 'EDIT' to ls_toolbar-function.
        move space to ls_toolbar-disabled.
        move 'Edit' to ls_toolbar-text.
        move icon_change_text to ls_toolbar-icon.
        move 'Click2Edit' to ls_toolbar-quickinfo.
        append ls_toolbar to e_object->mt_toolbar.
        clear ls_toolbar.
        move 0 to ls_toolbar-butn_type.
        move 'UPDA' to ls_toolbar-function.
        move space to ls_toolbar-disabled.
        move 'Update' to ls_toolbar-text.
        move icon_system_save to ls_toolbar-icon.
        move 'Click2Update' to ls_toolbar-quickinfo.
        append ls_toolbar to e_object->mt_toolbar.
        clear ls_toolbar.
        move 0 to ls_toolbar-butn_type.
        move 'EXIT' to ls_toolbar-function.
        move space to ls_toolbar-disabled.
        move 'Exit' to ls_toolbar-text.
        move icon_system_end to ls_toolbar-icon.
        move 'Click2Exit' to ls_toolbar-quickinfo.
        append ls_toolbar to e_object->mt_toolbar.
      endmethod.                    "toolbar
      method user_command.
        case e_ucomm .
          when 'EDIT'. "From Tool bar
            perform set_input.
            perform init_grid.
          when 'UPDA'. "From Tool bar
            perform refresh_disp.
            perform update_table.
          when 'EXIT'. "From Tool bar
            leave program.
        endcase.
      endmethod.                    "user_command
    endclass.                    "lcl_grid_event_receiver IMPLEMENTATION
    program data
    include <icon>.
    define any old internal structure NOT in DDIC
    types: begin of s_elements,
    anyfield1(20) type c,
    anyfield2(20) type c,
    anyfield3(20) type c,
    anyfield4(20) type c,
    anyfield5(11) type n,
    end of s_elements.
    data: wa_element type s_elements,
    wa_data type s_elements.
    Note new RTTI functionality allows field detail retrieval
    at runtime for dynamic tables.
    data:
            grid1 type ref to zcltest,
            grid_handler type ref to lcl_grid_event_receiver,
            c_dec2 type s_elements-anyfield5,
            wa_it_fldcat type lvc_s_fcat,
            it_fldcat type lvc_t_fcat,
            lr_rtti_struc TYPE REF TO cl_abap_structdescr, "RTTI
            lt_comp TYPE cl_abap_structdescr=>component_table,"RTTI
            ls_comp LIKE LINE OF lt_comp, "RTTI
            zog like line of lr_rtti_struc->components,  "RTTI
            struct_grid_lset type lvc_s_layo,
            l_valid type c,
            new_table type ref to data.
            types: struc like zog.
    data:  zogt type table of struc,
            grid_container1 type ref to cl_gui_custom_container,
            g_event_receiver type ref to lcl_grid_event_receiver,
            ok_code like sy-ucomm,
            i4 type int4.
    start-of-selection.
      call screen 100.
    module status_0100 output.
      if grid_container1 is initial.
        create object grid_container1
        exporting
        container_name = 'CCONTAINER1'.
        assign grid_container1 to <g1>.
        create object grid1
         exporting i_parent = grid_container1.
    we need reference to this instance so we can use
    Methods etc of zcltest class and alv (superclass)
    in our event receiver class.
         assign grid1 to <g2>.
        create object grid_handler.
        set handler:
        grid_handler->user_command for grid1,
        grid_handler->toolbar for grid1,
        grid_handler->handle_data_changed for grid1.
    Get the Internal table structure
        lr_rtti_struc ?= cl_abap_structdescr=>describe_by_data( wa_data ).
    Build field catalog just use basic data here
    colour specific columns as well
        zogt[] = lr_rtti_struc->components.
          call method grid1->create_dynamic_fcat
          EXPORTING
            zogt      = zogt
          IMPORTING
            it_fldcat = it_fldcat.
    Create dynamic internal table and assign to field symbol.
    Use dynamic field catalog just built.
      call method cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fldcat
        IMPORTING
          ep_table        = new_table.
      assign new_table->* to <dyn_table>.
        perform populate_dynamic_itab.
        perform init_grid.
        perform register_enter_event.
    set off ready for input initially
        i4 = 0.
        call method grid1->set_ready_for_input
          EXPORTING
            i_ready_for_input = i4.
      endif.
    endmodule.                    "status_0100 OUTPUT
    module user_command_0100 input.
    *PAI not needed in OO ALV anymore as User Commands are handled as events
    *in method user_command.
    *we can also get control if the Data entered and the ENTER is pressed by
    *raising an event.
    Control then returns to method handle_data_changed.
    endmodule.                    "user_command_0100 INPUT
    form populate_dynamic_itab.
    load up a line of the dynamic table
      c_dec2 = c_dec2 + 11.
      wa_element-anyfield1 = 'Tabbies'.
      wa_element-anyfield2 = 'ger.shepards'.
      wa_element-anyfield3 = 'White mice'.
      wa_element-anyfield4 = 'Any old text'.
      wa_element-anyfield5 = c_dec2.
      append wa_element to <dyn_table>.
    endform.                    "populate_dynamic_itab
    form exit_program.
      call method grid_container1->free.
      call method cl_gui_cfw=>flush.
      leave program.
    endform.                    "exit_program
    form refresh_disp.
      call method grid1->refresh_table_display.
    endform.                    "refresh_disp
    form update_table.
    The dynamic table here is the changed table read from the grid
    after user has changed it
    Data can be saved to DB or whatever.
      loop at <dyn_table> into wa_element.
    do what you want with the data here
      endloop.
    switch off edit mode again for next function
      i4 = 0.
      call method grid1->set_ready_for_input
        EXPORTING
          i_ready_for_input = i4.
    endform.                    "update_table
    form set_input.
      i4 = 1.
      call method grid1->set_ready_for_input
        EXPORTING
          i_ready_for_input = i4.
    endform.                    "set_input
    form switch_input.
      if i4 = 1.
        i4 = 0.
      else.
        i4 = 1.
      endif.
      call method grid1->set_ready_for_input
        EXPORTING
          i_ready_for_input = i4.
    endform.                    "switch_input
    form init_grid.
    Enabling the grid to edit mode,
      struct_grid_lset-edit = 'X'. "To enable editing in ALV
      struct_grid_lset-grid_title = 'Jimbos Test'.
       call method grid1->set_table_for_first_display
        EXPORTING
          is_layout       = struct_grid_lset
        CHANGING
          it_outtab       = <dyn_table>
          it_fieldcatalog = it_fldcat.
    endform.                    "init_grid
    form register_enter_event.
      call method grid1->register_edit_event
        EXPORTING
          i_event_id = cl_gui_alv_grid=>mc_evt_enter.
    Instantiate the event or it won't work.
      create object g_event_receiver.
      set handler g_event_receiver->handle_data_changed for grid1.
    endform.                    "register_enter_event

Maybe you are looking for

  • Using the internet on an Ipod touch

    How does the internet work on an Ipod touch? Does it only work through wifi? or can u set up a personal internet account specifically for the ipod that you would pay monthly for?

  • Cant sync iphone or ipod

    When i try to sync my iphone in itunes, it recognizes the device and starts the registration process. The the computer says new hardware in a small bubble in the lower right hand corner.  It indicates that is it a digital still camera and then reboot

  • Hi, is there any function module for se16 transaction?

    Hi help me out, can refer function module RS_TABLE_LIST_CREATE....found it

  • WPR Error message when vendor selected has Ampersand in name

    Got error message: "The ampersand is not allowed in field character BBP document." in WPR when the Vendor selected has '&' in Name. Can anybody help?

  • REAL Solution for " Cant Unmount Disk"

    I have a G% 1.8 PPC. It is Primarily a Protools machine. I have been using it for about 6 years. One of the hdds have been attached for 4years via FW400. I recently upgraded with no problem from 10.4.11 to 10.5.8. At the same time I went from ProTool