Problem with shared objects synchoronization.

I encountered a small problem with shared objects.
I'm working on a program that creates chat rooms of a fixed
size of 30 users. When the 31th user comes, a new room is created.
The idea is that the client first connects to the first room
and checks if it's full by connecting to shared objects. If it is
full, connection is closed and process is reapeated on a new
instance of the application.
I use a function to connect to an instance, which takes as a
parameter a number (1 for instance room_1, 2 for room_2, etc). The
function itself creates the necessary Netconnection and
sharedObject objects.
If a room is full, Netconnections and sharedObjects are
closed and function is called again with another number.
I have no problem for connecting to the first room, but after
closing the first connection and connecting to the new room, there
seem to be some problems with the shared objects (especially,
OnSync doesn't seem to execute again after the connection to the
shared objects of the new instance).
I was wondering if you had any ideas what could cause this.
Is it the use of the same variable names for connecting at two
different shared objects?
Here is the function :
function initStreams(room) {
client_nc = new NetConnection();
client_nc.connect("rtmp://192.168.0.4/Elearning/room_"+room);
in_ns = new NetStream(client_nc);
in_ns2 = new NetStream(client_nc);
Replay_video.attachVideo(in_ns);
out_ns = new NetStream(client_nc);
out_ns2 = new NetStream(client_nc);
in_ns.play("my_recorded_stream");
users_name = SharedObject.getRemote("users_name",
_root.client_nc.uri, false);
users_name.connect(_root.client_nc);
users_language = SharedObject.getRemote("users_language",
_root.client_nc.uri, false);
users_language.connect(_root.client_nc);
users_picture = SharedObject.getRemote("users_picture",
_root.client_nc.uri, false);
users_picture.connect(_root.client_nc);
users_finger = SharedObject.getRemote("users_finger",
_root.client_nc.uri, false);
users_finger.connect(_root.client_nc);
I you need more info, I can post more of the code on the
forum.
Any help would be really appreciated

I don't see any onStatus events in the code you posted above.
If you're defining the onstatus event outside the function, that's
the problem. When you define the shared object, you also need to
define it's onStatus event handler.
Also, you really should wait for the onStatus event of the
netConnection before you connect your sharedObjects. If you try to
connect the SO before the netConnection is established, the SO will
never connect.

Similar Messages

  • Problems with Shared Objects - WIERD (or i'm just plain o'l stupid)

    Using F8, AS2.0
    What I am trying to do is to store an array inside of a slot
    in a Local
    Shared Object.
    (snippet from function)
    // leaderboardShare is the Local Shared Object
    // the variable scores is passed through this function
    // if no array exists, create one
    if (this.leaderboardShare.data[this.userId] == null) {
    trace("{SharedLearning.setLeaderboardScore} no score data
    for this user
    exists, creating scores array");
    // create a new array to hold scores for this userId
    var myScores = new Array();
    myScores.push(score);
    this.leaderboardShare.data[this.userId] = myScores;
    // traces out the newly added score, (325)
    trace("{SharedLearning.setLeaderboardScore} scores in userId
    array: " +
    this.leaderboardShare.data[this.userId]);
    } else {
    trace("{SharedLearning.setLeaderboardScore} score data
    exists, adding
    current score to array ");
    // traces out existing data in userId slot (325)
    trace("{SharedLearning.setLeaderboardScore} scores in userId
    array: " +
    this.leaderboardShare.data[this.userId]);
    // traces out Number
    trace("score is type: " + typeof(score));
    // temp array to hold data from existing LSO scores
    var myScores:Array =
    this.leaderboardShare.data[this.userId];
    // traces 325
    trace("myScores (before): " + myScores);
    // temp variable to hold latest score passed through (dont'
    really need
    this)
    var newScore:Number = score;
    // add latest score to current score array
    myScores.push(newScore);
    // TRACES 325, NaN
    trace("myScores (after): " + myScores);
    // overwrite existing scores array in LSO with new set of
    scores
    this.leaderboardShare.data[this.userId] = myScores;
    I know I can do this with any other object, what gives? why
    would the LSO
    even care what i'm passing to it. Who cares that it's not a
    number, the
    array doesn't care what you stick into it.
    I'm truly confused.
    Any help will help me drink less tonight after i'm finished

    Nevermind....
    I found a block of code above it that was making it crap out.

  • My host name changes every few days, since Xmas adding a macbook its changed 6 times. Do I need to stop this? Does it cause problems with sharing between the iMac and macbook?

    my host name changes every few days, since Xmas adding a macbook its changed 6 times. Do I need to stop this? Does it cause problems with sharing between the iMac and macbook?

    There are several possible causes for this problem.
    1. Two (or more) computers on the local network have the same Bonjour name, such as "X's-MacBook-Pro.local".
    2. You have two simultaneous connections to the same local network: probably Ethernet and Wi-Fi. If applicable, disconnect the Ethernet cable or turn off Wi-Fi.
    3. A Mac wakes from sleep due to network traffic. This is due to a bug in OS X that may only affect some models.
    4. A device that gets its network address from the router wakes from sleep, and the address it was using before has been assigned to another device.
    5. A third-party wireless router has incompatible settings or firmware. In that case, refer to the manufacturer or ISP for support. Restarting the router may help, temporarily.
    6. See also this support article.
    Rename the computer in the Sharing preference pane.

  • TPC 2012 - Problems with shared variable

    Hi,
    I tried to program simmilar thing to this one http://zone.ni.com/devzone/cda/tut/p/id/5548 on TPC 2012. But it doesn't work.I can see that both programs on my laptop and TPC are working(I've added an additional counter with display), but I cannot see any effect on TPC when I change the value of shared variable on my laptop. I use LabView 8.6 with Touch Panel Module. My question is what are the exact steps to run such application on TPC2012? Are they the same as for TPC 2006?
    I've noticed following issues:
    1.I cannot deploy the program from Project Manager(there is an information that maybe TPC Service is not started. - I've found such information about TPC Service http://digital.ni.com/public.nsf/allkb/DE177828D27A14A48625734E00768B66 but in fact I cannot find Start » All Programs»National Instruments » NI TPC Service » NI TPC Service Manager 1.0 Does it mean, that the TPC Service is not installed and the programm with shared varibles won't be working or can I start it somehow in another way? Do I need to have TPC service installed on TPC2012?
    Until now, I've built the project and sent it through FTP to TPC(the folder was /TEMP) and then started it.
    2.Ping works OK
    Thank you in advance for any hints how to solve this problem.
    Martin

    Well no problem, but I'm frustrated with this issue... I've tested many things and nothing. Just to help someone else as I in the future, these are my sources:
    http://forums.ni.com/t5/LabVIEW/TPC-2012-Problems-with-shared-variable/m-p/1009631/highlight/false#M...
    http://digital.ni.com/public.nsf/allkb/28536DE7E2D9E98B8625770B00738920?OpenDocument
    http://zone.ni.com/reference/en-XX/help/372507B-01/lvtpcgsm/tpc_install_sharvar/
    http://zone.ni.com/reference/en-XX/help/372507C-01/lvtpcgsm/tpc_install_sharvar/
    http://digital.ni.com/public.nsf/allkb/23532363F4905EC28625727A00730B80?OpenDocument
    http://forums.ni.com/t5/FieldPoint-Family/TPC-2006-Not-Listed-in-Targets-and-Devices/td-p/566325
    http://forums.ni.com/t5/LabVIEW/MAX-can-t-detect-TPC-2106T/td-p/831524
    http://zone.ni.com/devzone/cda/tut/p/id/5868
    http://digital.ni.com/public.nsf/websearch/28B748B9697B79E18625725A00009066?OpenDocument
    http://digital.ni.com/public.nsf/websearch/D1726990DCEB82E4862570F20069C57D?OpenDocument
    http://digital.ni.com/public.nsf/allkb/3B469103BBDD4CE48625726000665B36
    I hope find some hint..
    Fabian León
    Certified LabVIEW Associate Developer

  • Problem with embedded objects

    Hi,
    I have problem with embedded objects which contained embedded objects.
    When I create an Object in the persistent memory and commit this object I get the following error:
    ORA-22805: cannot insert NULL object into object tables or nested tables
    In the constructor of my persisten object I create the embedded members in the transient memory:
    ATestPersObj::ATestPersObj() : m_count(0), m_lang(NULL), m_cost(NULL) {
      m_lang = new AEnumLanguage_OraType();
      m_cost = new AAmount_OraType();
    }Or when I dereference a reference I get this error:
    ORA-00600: internal error code, arguments: [kokeicadd2], [16], [5], [], [], [], [], []
    Can somebody give me a hint?
    I've defined the following Type:
    CREATE OR REPLACE TYPE AENUM_ORATYPE AS OBJECT (
                             VALUE  NUMBER(10,0)
                           ) NOT FINAL ;
    CREATE OR REPLACE TYPE AENUMLANGUAGE_ORATYPE UNDER AENUM_ORATYPE (
                           ) FINAL " );
    CREATE OR REPLACE TYPE ACURRENCY_ORATYPE AS OBJECT (
                             ISONR          NUMBER(5,0)
                           ) FINAL ;
    CREATE OR REPLACE TYPE AAMOUNT_ORATYPE AS OBJECT (
                             CCY        ACURRENCY_ORATYPE,
                             LO32BITS   NUMBER(10,0),
                             HI32BITS   NUMBER(10,0)
                           ) NOT FINAL ;
    CREATE OR REPLACE TYPE ATESTPERSOBJ AS OBJECT (
                             COUNT    NUMBER(4),
                             LANG     AENUMLANGUAGE_ORATYPE,
                             COST     AAMOUNT_ORATYPE   
                           ) FINAL ;
    oracle::occi::Ref<ATestPersObj> pObjR = new(c.getConnPtr(), "TTESTPERSOBJ") ATestPersObj();
    pObjR->setCount(i+2001);
    pObjR->setLang(AEnumLanguage(i+1));
    pObjR->setCost(AAmount(ACurrency(), 2.5));
    c.commit();
    c.execQueryRefs("SELECT REF(a) FROM TTESTPERSOBJ a", persObjListR);
    len = persObjListR.size();
    {for (int i = 0; i < len; i++) {  
      oracle::occi::Ref<ATestPersObj> pObjR = persObjListR;
    pObjR->getCount();
    pObjR->getLang();
    c.commit();
    With kind regards
    Daniel
    Message was edited by:
    DanielF
    Message was edited by:
    DanielF

    Hi,
    I have problem with embedded objects which contained embedded objects.
    When I create an Object in the persistent memory and commit this object I get the following error:
    ORA-22805: cannot insert NULL object into object tables or nested tables
    In the constructor of my persisten object I create the embedded members in the transient memory:
    ATestPersObj::ATestPersObj() : m_count(0), m_lang(NULL), m_cost(NULL) {
      m_lang = new AEnumLanguage_OraType();
      m_cost = new AAmount_OraType();
    }Or when I dereference a reference I get this error:
    ORA-00600: internal error code, arguments: [kokeicadd2], [16], [5], [], [], [], [], []
    Can somebody give me a hint?
    I've defined the following Type:
    CREATE OR REPLACE TYPE AENUM_ORATYPE AS OBJECT (
                             VALUE  NUMBER(10,0)
                           ) NOT FINAL ;
    CREATE OR REPLACE TYPE AENUMLANGUAGE_ORATYPE UNDER AENUM_ORATYPE (
                           ) FINAL " );
    CREATE OR REPLACE TYPE ACURRENCY_ORATYPE AS OBJECT (
                             ISONR          NUMBER(5,0)
                           ) FINAL ;
    CREATE OR REPLACE TYPE AAMOUNT_ORATYPE AS OBJECT (
                             CCY        ACURRENCY_ORATYPE,
                             LO32BITS   NUMBER(10,0),
                             HI32BITS   NUMBER(10,0)
                           ) NOT FINAL ;
    CREATE OR REPLACE TYPE ATESTPERSOBJ AS OBJECT (
                             COUNT    NUMBER(4),
                             LANG     AENUMLANGUAGE_ORATYPE,
                             COST     AAMOUNT_ORATYPE   
                           ) FINAL ;
    oracle::occi::Ref<ATestPersObj> pObjR = new(c.getConnPtr(), "TTESTPERSOBJ") ATestPersObj();
    pObjR->setCount(i+2001);
    pObjR->setLang(AEnumLanguage(i+1));
    pObjR->setCost(AAmount(ACurrency(), 2.5));
    c.commit();
    c.execQueryRefs("SELECT REF(a) FROM TTESTPERSOBJ a", persObjListR);
    len = persObjListR.size();
    {for (int i = 0; i < len; i++) {  
      oracle::occi::Ref<ATestPersObj> pObjR = persObjListR;
    pObjR->getCount();
    pObjR->getLang();
    c.commit();
    With kind regards
    Daniel
    Message was edited by:
    DanielF
    Message was edited by:
    DanielF

  • Problem with inherited Objects

    Hi,
    I have a problem with inherited objects inside Flex using
    wsdl as the source of the object. The AS-classes are generated
    inside Flex Builder 3.
    Inside the wsdl I have 2 complex types:
    <complexType abstract="true" name="PersistentObject">
    <sequence>
    <element name="id" nillable="true" type="xsd:string"/>
    <element name="insertTimeStamp" nillable="true"
    type="xsd:dateTime"/>
    <element name="insertUsername" nillable="true"
    type="xsd:string"/>
    <element name="updateTimeStamp" nillable="true"
    type="xsd:dateTime"/>
    <element name="updateUsername" nillable="true"
    type="xsd:string"/>
    </sequence>
    </complexType>
    and
    <complexType name="Contact">
    <complexContent>
    <extension base="tns3:PersistentObject">
    <sequence>
    <element name="birthday" nillable="true"
    type="xsd:dateTime"/>
    <element name="firstName" nillable="true"
    type="xsd:string"/>
    <element name="lastName" nillable="true"
    type="xsd:string"/>
    <element name="middleName" nillable="true"
    type="xsd:string"/>
    <element name="newPassword" nillable="true"
    type="xsd:string"/>
    <element name="password" nillable="true"
    type="xsd:string"/>
    <element name="title" nillable="true"
    type="xsd:string"/>
    <element name="username" nillable="true"
    type="xsd:string"/>
    </sequence>
    </extension>
    </complexContent>
    </complexType>
    The classes in actionscript seem plausable:
    public class PersistentObject
    * Constructor, initializes the type class
    public function PersistentObject() {}
    public var id:String;
    public var insertTimeStamp:Date;
    public var insertUsername:String;
    public var updateTimeStamp:Date;
    public var updateUsername:String;
    and
    public class Contact extends PersistentObject
    * Constructor, initializes the type class
    public function Contact() {}
    public var birthday:Date;
    public var firstName:String;
    public var lastName:String;
    public var middleName:String;
    public var newPassword:String;
    public var password:String;
    public var title:String;
    public var username:String;
    When I want to retreive an object of type Contact, it seems
    that only a couple of entries are filled. While debugging the flex
    XMLDecoder, I noticed something strange. It seems, like the decoder
    is expecting the result xml data to be in alphabetical order:
    birthday, firstname, lastname, etc. But since the object is
    inherited, the data that is actually received contains elements
    from the parent class: birthday, firstname, id, inserttimestamp,
    The resulting object has just birthday and firstname filled,
    which is somehow wrong. This seems to be a problem inside the
    parser itself. What can I do?

    I am having a problem with an extended class as well.
    When I step through the code, everything is going fine and the decoder (mx.rpc.xml::XMLDecoder) sees that the class is an extension and wants to get the values for the superclass first.  When it gets into getApplicableValues(), it's looking for the values to be in the order of the definition which would be ok if the values collection didn't include the values from the subclass as well!  It goes through the whole definition and doesn't find anything for the superclass because the values aren't where it expects them.  When it pops back up to the subclass and starts to decode those values, it finds them because the definition order and values order match.
    Is this a known issue?  Or, am I misunderstanding something?
    Thanks,
    Chuck

  • Problem with activeX objects

    hi all,
    i am having a problem with activeX objects.
    my activeX ( Tree View) is wrking fine with windows2000
    but when i am trying the same code with XP its saying dll missing.
    do these activeX depends on OS also..
    plz help me.

    hey Vishwas!
    did you register the .dll?
    do you work with vb.net?
    which ServicePack do you have in Windows XP?
    greetz
    Matthias

  • What is the problem with converting objects with gradients to gradient mesh?

    What is the problem with converting objects with gradients to gradient mesh?

    slange,
    There may arise some smaller corruption states that may be cured by what you did, as you can see in the list. Sometimes, restarting thrice is needed.
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save curent artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to 3 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • I have too many problems with UserKeyMD Object

    Hi everybody!!!......
    I've too many problems with UserKeyMD object, this don't work, I have a Application which create the DataBase structure, but when try it for create the user key on "x" field in "ABC" table (x field is present on table, is db_Alpha with 8 chars, subtype is st_None) is raised the problem.
    I try to create this way the key (VB example):
    Dim oUserKeysMD As SAPbobsCOM.UserKeysMD
    Set oUserKeysMD = oCompany.GetBusinessObject(oUserKeys)
    oUserKeysMD.TableName = sTableName
    oUserKeysMD.KeyName = sKeyName
    oUserKeysMD.Unique = BoYesNoEnum.tYES
    oUserKeysMD.Elements.ColumnAlias = sFieldName
    oUserKeysMD.Add '<- here problem is raised
    System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserKeysMD)
    I'm work in Delphi .Net and translate the source code of my function to VB.
    P.D.:this source code at least work 2 times, but does not use it until today, I do not know because no longer it works now but. 
    excuse my ingles is very bad
    thanks
    regards
    Francisco Troncoso
    Chile.
    Message was edited by: Francisco Troncoso

    Hi, I using this names for my tables, fields and keys.
    the table name is:
    AOTI
    the fields names are:
    codigo alpha editsize 8
    decrip alpha editsize 40
    tipo   alpha editsize 1 - valid values W, C - Default Value C
    grupo1 alpha editsize 1 - valid values Y, N - Default Value N
    grupo2 alpha editsize 1 - valid values Y, N - Default Value N
    grupo3 alpha editsize 1 - valid values Y, N - Default Value N
    grupo4 alpha editsize 1 - valid values Y, N - Default Value N
    grupo5 alpha editsize 1 - valid values Y, N - Default Value N
    grupo6 alpha editsize 1 - valid values Y, N - Default Value N
    grupo7 alpha editsize 1 - valid values Y, N - Default Value N
    grupo8 alpha editsize 1 - valid values Y, N - Default Value N
    all fields have subtype none and the key name is :
    AOPK1
    ColumnAlias is codigo, when I try to create the table, fields and key with MetaDataOperatios example I have not problems but I try to create with my application I have the error.
    Regards,
    Franciso.

  • Help with shared objects...again...

    Okay, I've been looking at a really good tutorial for shared objects in AS2, and I think I've gotten the basic concept down of how they work... now the problem lies in just integrating it into what I already have, which is making my brain hurt.  Basically its for a quiz game, which will have a dynamic scoreboard.  I want the scores in the shared object to update when the submit button is pressed, and then have the new values loaded into text boxes.  Displaying the values is going to be the easy part, its just updating them is what my brain doesnt want to wrap itself around.  Here is the array I have at the moment (yes, horribly inefficient, but the last time I actually did any coding before this was over 2 years ago when I was still a computer science major... with all of 4 actual Comp Sci courses under my belt -_-)
    scores= new Array();
    names= new Array();
    insert=function() {
         var newscore;
         var newname;
         newscore=0
         newscore=_global.correct;
         if (newscore > scores[0]) {
             scores[14]=scores[13];
             scores[13]=scores[12];
             scores[12]=scores[11];
             scores[11]=scores[10];
             scores[10]=scores[9];
             scores[9]=scores[8];
             scores[8]=scores[7];
             scores[7]=scores[6];
             scores[6]=scores[5];
             scores[5]=scores[4];
             scores[4]=scores[3];
             scores[3]=scores[2];
             scores[2]=scores[1];
             scores[1]=scores[0];
             scores[0]=newscore;
             names[14]=names[13];
             names[13]=names[12];
             names[12]=names[11];
             names[11]=names[10];
             names[10]=names[9];
             names[9]=names[8];
             names[8]=names[7];
             names[7]=names[6];
             names[6]=names[5];
             names[5]=names[4];
             names[4]=names[3];
             names[3]=names[2];
             names[2]=names[1];
             names[1]=names[0];
             names[0]=newname;
             else if (newscore > scores[1]) {
             scores[14]=scores[13];
             scores[13]=scores[12];
             scores[12]=scores[11];
             scores[11]=scores[10];
             scores[10]=scores[9];
             scores[9]=scores[8];
             scores[8]=scores[7];
             scores[7]=scores[6];
             scores[6]=scores[5];
             scores[5]=scores[4];
             scores[4]=scores[3];
             scores[3]=scores[2];
             scores[2]=scores[1];
             scores[1]=newscore
             names[14]=names[13];
             names[13]=names[12];
             names[12]=names[11];
             names[11]=names[10];
             names[10]=names[9];
             names[9]=names[8];
             names[8]=names[7];
             names[7]=names[6];
             names[6]=names[5];
             names[5]=names[4];
             names[4]=names[3];
             names[3]=names[2];
             names[2]=names[1];
             names[1]=newname;
    Continues all the way down to scores[14]
    Now, if I wanted this to pull data from the shared object, would I just put user_so.score[3]=user_so.score[2] for instance?  Or would I run the array and just update the new valued individually once the array insertion function completes?  THe problem with the latter is that it's not directly accessing the shared object so I'd need to find a way to pull them out into other variables first, and this is about the point where my brain just decides to short out on me and stop working alltogether...yay...
    So yea, any help on this would be much appreciated.
    also, would the array have to be declared within the shared object as well?  If so, how would I do that exactly?  Probably something so simple but the fact that it's shared objects is throwing me off...

    Ok, the shared object WAS working just fine until I had the banner start referencing it.  Then the quiz began giving me syntax errors like crazy, and even when the banner isnt runnit it gives me issues.
    user_so.data.soArray[0]=scores[0];
    user_so.data.soArray[1]=scores[1];
    user_so.data.soArray[2]=scores[2];
    user_so.data.soArray[3]=scores[3];
    user_so.data.soArray[4]=scores[4];
    user_so.data.soArray[5]=scores[5];
    user_so.data.soArray[6]=scores[6];
    user_so.data.soArray[7]=scores[7];
    user_so.data.soArray[8]=scores[8];
    user_so.data.soArray[9]=scores[9];
    user_so.data.soArray[10]=scores[10];
    user_so.data.soArray[11]=scores[11];
    user_so.data.soArray[12]=scores12];
    user_so.data.soArray[13]=scores[13];
    user_so.data.soArray[14]=scores[14];
        _global.player= "Input Name";
        player.text=_global.player;
        _global.correct= 0;
        phrase=" ";
    gotoAndStop (1);
    these are the lines it's telling me I need an on handler for, which I do have, at the very start of the entire code.
    Ive counted the brackets and those seem to line up, but I'll double check again.  The code is on the submit button itself (yes I know it's poor coding form, but this is how I learned it and what I'm used to, and since I'm on a bit of a time schedule now isn't the time to completely re-learn the proper conventions and etiquite of coding in flash).
    on (release) {
        if (user_so.data.tname!=undefined){
            user_so.data.tname = _global.player;
            user_so.data.newscore = _global.correct;
            insert=function() {
        var newscore;
        var newname;
        newscore=0
        newscore=_global.correct;
        if (newscore > scores[0]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=scores[5];
            scores[5]=scores[4];
            scores[4]=scores[3];
            scores[3]=scores[2];
            scores[2]=scores[1];
            scores[1]=scores[0];
            scores[0]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=names[5];
            names[5]=names[4];
            names[4]=names[3];
            names[3]=names[2];
            names[2]=names[1];
            names[1]=names[0];
            names[0]=newname;
            else if (newscore > scores[1]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=scores[5];
            scores[5]=scores[4];
            scores[4]=scores[3];
            scores[3]=scores[2];
            scores[2]=scores[1];
            scores[1]=newscore
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=names[5];
            names[5]=names[4];
            names[4]=names[3];
            names[3]=names[2];
            names[2]=names[1];
            names[1]=newname;
        else if (newscore > scores[2]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=scores[5];
            scores[5]=scores[4];
            scores[4]=scores[3];
            scores[3]=scores[2];
            scores[2]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=names[5];
            names[5]=names[4];
            names[4]=names[3];
            names[3]=names[2];
            names[2]=newname;
            else if (newscore > scores[3]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=scores[5];
            scores[5]=scores[4];
            scores[4]=scores[3];
            scores[3]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=names[5];
            names[5]=names[4];
            names[4]=names[3];
            names[3]=newname;
            else if (newscore > scores[4]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=scores[5];
            scores[5]=scores[4];
            scores[4]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=names[5];
            names[5]=names[4];
            names[4]=newname;
            else if (newscore > scores[5]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=scores[5];
            scores[5]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=names[5];
            names[5]=newname;
            else if (newscore > scores[6]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=scores[6];
            scores[6]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=names[6];
            names[6]=newname;
                else if (newscore > scores[7]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=scores[7];
            scores[7]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=names[7];
            names[7]=newname;
                    else if (newscore > scores[8]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=scores[8];
            scores[8]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=names[8];
            names[8]=newname;
                        else if (newscore > scores[9]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=scores[9];
            scores[9]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=names[9];
            names[9]=newname;
                            else if (newscore > scores[10]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=scores[10];
            scores[10]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=names[10];
            names[10]=newname;
                                else if (newscore > scores[11]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=scores[11];
            scores[11]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=names[11];
            names[11]=newname;
                                    else if (newscore > scores[12]) {
            scores[14]=scores[13];
            scores[13]=scores[12];
            scores[12]=newscore;
            names[14]=names[13];
            names[13]=names[12];
            names[12]=newname;
                                    else if (newscore > scores[13]) {
            scores[14]=scores[13];
            scores[13]=newscore;
            names[14]=names[13];
            names[13]=newname;
                                        else if (newscore > scores[14]) {
            scores[14]=newscore;
            names[14]=newname;
        else {
            user_so.data.tname = _global.player;
            user_so.data.newscore = _global.correct;
            scores[0]=user_so.data.newscore;
            names[0]=user_so.data.tname;
    user_so.data.soArray[0]=scores[0];
    user_so.data.soArray[1]=scores[1];
    user_so.data.soArray[2]=scores[2];
    user_so.data.soArray[3]=scores[3];
    user_so.data.soArray[4]=scores[4];
    user_so.data.soArray[5]=scores[5];
    user_so.data.soArray[6]=scores[6];
    user_so.data.soArray[7]=scores[7];
    user_so.data.soArray[8]=scores[8];
    user_so.data.soArray[9]=scores[9];
    user_so.data.soArray[10]=scores[10];
    user_so.data.soArray[11]=scores[11];
    user_so.data.soArray[12]=scores12];
    user_so.data.soArray[13]=scores[13];
    user_so.data.soArray[14]=scores[14];
        _global.player= "Input Name";
        player.text=_global.player;
        _global.correct= 0;
        phrase=" ";
    gotoAndStop (1);

  • Issue with Shared Objects

    Hi all,
    I've a problem with a program working on Shared Objects technology.
    We have a Job, scheduled in 18 parallelism, and each one writes into the SHM controlled by a SHMA Class.
    At jobs ending, a program reads content from the area and sends an automatic e-mail with the results.
    Everything works well if the writer program is executed on-line.
    Otherwise, in background, seems that nothing is stored in the SHM.
    Here's the code executed by the writer program:
    FORM shared_memory_access  TABLES  it_fehler STRUCTURE rpfausg.
      DATA: errors_reference TYPE REF TO data.
      DATA: lx_pterl00       TYPE REF TO zcx_pterl00_collector.
      TRY.
    * --> Get SHM Access
          CALL METHOD zcl_pterl00_collector_root=>build
            EXPORTING
              invocation_mode = cl_shm_area=>invocation_mode_explicit.
    * --> It's ok?
          IF zcl_pterl00_collector_root=>area_exists EQ 'X'.
    * --> Fill Data:
            GET REFERENCE OF it_fehler[] INTO errors_reference.
            CALL METHOD zcl_pterl00_collector_root=>fill_area_with_data
              EXPORTING
                error_messages_dref = errors_reference.
          ENDIF.
        CATCH zcx_pterl00_collector INTO lx_pterl00.
          MESSAGE lx_pterl00 TYPE 'S' DISPLAY LIKE 'E'. "Non-blocking -> JOBS
      ENDTRY.
    ENDFORM.                    " SHARED_MEMORY_ACCESS
    Here is the section from the class handling the attachment to the SHMA:
    METHOD if_shm_build_instance~build.
      DATA: lx_collector TYPE REF TO zcx_pterl00_collector.
    * --> Automatic building of instance:
      TRY.
          CALL METHOD get_handle_for_update( inst_name ).
        CATCH zcx_pterl00_collector INTO lx_collector.
          MESSAGE lx_collector TYPE 'X'.
        CATCH: cx_shm_no_active_version.
          TRY.
              CALL METHOD get_handle_for_write( inst_name ).
            CATCH zcx_pterl00_collector INTO lx_collector.
              MESSAGE lx_collector TYPE 'X'.
          ENDTRY.
        CATCH: cx_shm_inconsistent.
          zcl_pterl00_collector=>free_area( ).
          TRY.
              CALL METHOD get_handle_for_write( inst_name ).
            CATCH zcx_pterl00_collector INTO lx_collector.
              MESSAGE lx_collector TYPE 'X'.
          ENDTRY.
      ENDTRY.
    ENDMETHOD.
    I cannot explain why multiple jobs do not populate the area...

    Hi Rob,
    if your requirement is to have many (18) active processes all updating the shared object, and very few simply reading the shared object, then versioning is probably not what you require.
    Versioning allows readers to continue to attach and read the active shared object instance while the updater gets their own instance of the shared object. When the updater does a detach_commit the old instance becomes obsolete and all new requests to attach will be diected to the new instance. The old instance will be cleaned up by garbage collection once all of its readers have detached.
    If your programs primarily attach for update then you will decrease performance with versioning because a new instance needs to be created at every attach for update.
    Perhaps you should just retry the attach for update after a small period of time has passed?
    If, on the other hand, you do have lots of other readers of the shared object you may well still find that it is more efficient not to have versioning. I build a web shop catalogue using shared objects and found that versioning severly hampered performance. This was because, once the catalogue was initialised, updaters were pretty rare but readers were constant.
    BTW make sure you keep the locks on the object as short as possible. Do all your preparation work first, then attach for update, update, detach as quick as possible.
    Cheers
    Graham Robbo

  • Problem With Business Object and printing job

    Hello,
    We are encountering a problem with the application "Business Objects FINANCE", and we would need your help quickly.
    In the application , itu2019s impossible to print Consolidated Subsidiaries nor the Securities Held. If we try so, the application freezes and we can't do anything but killing the application via the task manager.
    Though, other states can be printed without problem.
    We tried on several different PCs, and the problem occured equally on each one.
    The version installed is 10.5, and we can do any tests that you think would be useful to diagnose problem.
    Our society is AUBAY SA, and our credential to enter in your support website are : S0005386617
    In attachment youu2019ll find a screenshot of the event viewer from the server where the application is install.
    Thanks in advance for your answer,
    best regards.

    check the export parameters of the event triggering workflow.
    If there is a problem, try instantiating the object in your wf based on the key.
    Also check if the wf is able to import the data.
    regards,
    Sandeep Josyula

  • Problem with Business object attributes in UWL Workitem description

    Hi All,
    I have developed a workflow which sends the workitem for two level approvals. Once the workflow is triggered workitem sent to the respective user for approval. When user opens the workitem in inbox he can see all the data which comes from the 'Z'  Business object in R/3 and he can approve the same. Everything works fine when this process happens in R/3 system.
    The problem comes when user opens this workitem in UWL or this workitem is sent to user mail ID executing  'SWN_SELSEN' report, all the attributes of the business object are displayed in the workitem description  except 2 . These are the Minimum annual salary(GRMIN) and  Maximum annual salary(GRMAX) fields from 'T510N'  table.
    Regards,
    Vaishali.
    Edited by: vaishali rautray on Dec 24, 2008 7:52 AM

    Hi Saumya,
    Thanks for the quick reply.
    For storing the Minimum and maximum annual salary values I have created two attributes in the business object which are referring to database fields. T510N is a customizing table. I could see the values for the same, if I test the Business Object or Trigger the w/f in R/3 and check the approval work item in R/3. These values disappears only in case of web interfacing i.e. If I send the same work item to outlook mail or check it in UWL.
    I had checked the same and thought if there is any problem with BO or some other processing takes place before these values are retrieved. But I wonder why this happens only if I process the work item outside R/3 system?
    Regards,
    Vaishali.

  • Problem with Persistent Object as Reference Attribute of Persistent Object

    Hello All,
    I have a problem with a persistent class that contains a reference attribute to another persistent class.  I can write the reference object attribute to the DB but when I read the reference attribute back from the DB the object is null.  Allow me to explain...
    I have two tables; one is a data table with one key field of type OS_GUID, the second is a mapping table with several business key fields and two further fields; an instance GUID and a class identifier GUID.  The data table is used to contain all the data for an object.  The mapping table is used to hold a relationship between the GUID assigned in the data table and the business key.  The mapping table has been structured in this way by following the help here:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/df/e785a9e87111d4b2eb0050dadfb92b/frameset.htm
    and the field mapping in persistent class for the mapping table has been mapped following the help here:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/06/f23c33638d11d4966d00a0c94260a5/frameset.htm
    The code I use to create entries in the data and mapping table is:
    <-snip->
      DATA:
        gv_blank_data_guid TYPE REF TO zcl_ps_data,
        gv_data_guid       TYPE        os_guid,
        go_data_ps         TYPE REF TO zcl_ps_data,
        go_data_agent      TYPE REF TO zca_ps_data,
        go_data_map_ps     TYPE REF TO zcl_ps_data_map,
        go_data_map_agent  TYPE REF TO zca_ps_data_map,
        go_exc             TYPE REF TO cx_root.
      go_data_agent = zca_ps_data=>agent.
      go_data_map_agent = zca_ps_data_map=>agent.
      TRY.
    Check if there's already data with the business key on the DB
          go_data_map_ps = go_data_map_agent->get_persistent(
                             i_data_ref     = iv_data_ref
                             i_action       = iv_action ).
    ... if there is then exit.
          EXIT.
        CATCH cx_root INTO go_exc.
      ENDTRY.
      TRY.
    Create the data...
          go_data_ps = go_data_agent->create_persistent(
                           i_root_guid = gv_blank_data_guid
                           i_req_date  = iv_req_date ).
          TRY.
    ... finally, write the new data to the data business key map table
              go_data_map_ps = go_data_map_agent->create_persistent(
                                 i_data_ref     = iv_data_ref
                                 i_action       = iv_action
                                 i_data_guid    = go_data_ps ).    "note1
            CATCH cx_root INTO go_exc.
          ENDTRY.
        CATCH cx_os_object_not_found.
      ENDTRY.
      COMMIT WORK.
    <-snip->
    The fact that it is possible to pass the object GO_DATA_PS in the call to GO_DATA_MAP_AGENT (the line that I've put the comment "note1" on) indicates to me that the reference to the data persistent object can be written to the DB by the mapping persistent object.  After executing the above code the mapping table object and class identifier fields are populated.  Also, if multiple entries are written to the tables then the class identifier field in the mapping table is always the same and the object ID is different as expected.
    However, the problem I have is if I read an object from the DB using the business key with the following code:
    <-snip->
      DATA:
        gv_req_date        type        datum,
        gv_data_guid       TYPE        os_guid,
        go_data_ps         TYPE REF TO zcl_ps_data,
        go_data_agent      TYPE REF TO zca_ps_data,
        go_data_map_ps     TYPE REF TO zcl_ps_data_map,
        go_data_map_agent  TYPE REF TO zca_ps_data_map,
        go_exc             TYPE REF TO cx_root.
      go_data_agent = zca_ps_data=>agent.
      go_data_map_agent = zca_ps_data_map=>agent.
      TRY.
    Read data mapping with the business key
          go_data_map_ps = go_data_map_agent->get_persistent(
                             i_data_ref     = iv_data_ref
                             i_action       = iv_action ).
    ... then read the data.
          TRY.
              CALL METHOD go_data_map_ps->get_data_guid
                RECEIVING
                  result = go_data_ps.
            CATCH cx_os_object_not_found.
          ENDTRY.
        CATCH cx_root INTO go_exc.
      ENDTRY.
    <-snip->
    At no point during this code are the attributes of the object of the persistent class for the data table populated with the contents of the fields of the data table referenced as the attribute of the mapping table.  To clarify, when viewing the object in the debugger all the attributes of the mapping object that are simple table fields are populated with the values of the fields of in the mapping table, however, the attributes of the object that represents the persistent class for the data table are not populated with the fields of the data table.  I had hoped that by reading the mapping table object the data object would automatically be populated.  Is there another step I need to perform to populate the data object?
    I'm sorry if the above is hard to follow.  Without being able to provide screenshots it's difficult to explain.
    If someone has managed to store references to persistent objects in a table and then read the references back could you list the steps you went through to create the persistent classes and include the code that reads the objects please?  The code I have almost works, I must be just missing some subtle point...
    Thanks in advance,
    Steve.

    Hi Andrea,
    The iObject being replicated at item level for Service Complaints is the SAP standard behaviour.
    Generally we raise complaint refering to some sales or service issues. In your scenario you are trying to create a complaint based on an iObject, then you have to mention the corresponding product details. I dont see any business requirement not to copy the iObject product at the item level.
    If you want it then I think only you have to write a Z program for it.
    Hope this helps!
    Regards,
    Chethan

  • Performance problem with recordset object

    Hi,
    I have a performance problem with record set object. Is it true using RecordSet object as argument to the method will cause any perfomance degradation?
    here is my code.
    finStmtList = selectFinancialStatements(rs, shortFormat, latestOnly, true);
    I changed the code by populating the recordset in the method that called the above statement. previously the population of valueobject is within the select FinancialStatements.
    Now the method looks like
    finStmtList = selectFinancialStatements(ValueObject, shortFormat, latestOnly, true);
    Is this fix will result in any performance gain?

    Can any one suggest me that the above RecordSet Object contains large number of records that counts up to 1000 rows and having 30 columns? I tested the application. But the performance varies from time to time.
    Is there any other way to fine tune it?

Maybe you are looking for