Static data in runnable objects of threadpool

hi all,
I have a threadpool and schedule Runnable objects into it.
The runnble objects are run as per schedule.
But I want to declare and initialize a static data in the runnable object. And I expect it to be initialised only once ie, the first time the runnable object is invoked by the threadpool and to be ignored in the subsequent scheduled invocations. And I want to access the static data throught the runnable object.
I want to know whether the above behavior will take place or should i use any other ways to do this.

Then maybe something like this?
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Date;
public class RunnableWithPreviousState implements Runnable {
    private static class State {
     public Date startTime, endTime;
     public State() {
         startTime = new Date();
    private static List<RunnableWithPreviousState> runnables = Collections
         .synchronizedList(new ArrayList<RunnableWithPreviousState>());
    private State previousState, myState;
    @Override
    public void run() {
     myState = new State();
     runnables.add(this);
     int index = runnables.indexOf(this);
     if (index > 0) {
         index -= 1;
         previousState = runnables.get(index).myState;
     if (previousState != null) {
         // inspect previousState
     // do other processing
     myState.endTime = new Date();
}Piet

Similar Messages

  • How to synchronize concurrent access to static data in ABAP Objects

    Hi,
    1) First of all I mwould like to know the scope of static (class-data) data of an ABAP Objects Class: If changing a static data variable is that change visible to all concurrent processes in the same Application Server?
    2) If that is the case. How can concurrent access to such data (that can be shared between many processes) be controlled. In C one could use semaphores and in Java Synchronized methods and the monitor concept. But what controls are available in ABAP for controlling concurrent access to in-memory data?
    Many thanks for your help!
    Regards,
    Christian

    Hello Christian
    Here is an example that shows that the static attributes of a class are not shared between two reports that are linked via SUBMIT statement.
    *& Report  ZUS_SDN_OO_STATIC_ATTRIBUTES
    REPORT  zus_sdn_oo_static_attributes.
    DATA:
      gt_list        TYPE STANDARD TABLE OF abaplist,
      go_static      TYPE REF TO zcl_sdn_static_attributes.
    <i>* CONSTRUCTOR method of class ZCL_SDN_STATIC_ATTRIBUTES:
    **METHOD constructor.
    *** define local data
    **  DATA:
    **    ld_msg    TYPE bapi_msg.
    **  ADD id_count TO md_count.
    **ENDMETHOD.
    * Static public attribute MD_COUNT (type i), initial value = 1</i>
    PARAMETERS:
      p_called(1)  TYPE c  DEFAULT ' ' NO-DISPLAY.
    START-OF-SELECTION.
    <b>* Initial state of static attribute:
    *    zcl_sdn_static_attributes=>md_count = 0</b>
      syst-index = 0.
      WRITE: / syst-index, '. object: static counter=',
               zcl_sdn_static_attributes=>md_count.
      DO 5 TIMES.
    <b>*   Every time sy-index is added to md_count</b>
        CREATE OBJECT go_static
          EXPORTING
            id_count = syst-index.
        WRITE: / syst-index, '. object: static counter=',
                 zcl_sdn_static_attributes=>md_count.
    <b>*   After the 3rd round we start the report again (via SUBMIT)
    *   and return the result via list memory.
    *   If the value of the static attribute is not reset we would
    *   start with initial value of md_count = 7 (1+1+2+3).</b>
        IF ( p_called = ' '  AND
             syst-index = 3 ).
          SUBMIT zus_sdn_oo_static_attributes EXPORTING LIST TO MEMORY
            WITH p_called = 'X'
          AND RETURN.
          CALL FUNCTION 'LIST_FROM_MEMORY'
            TABLES
              listobject = gt_list
            EXCEPTIONS
              not_found  = 1
              OTHERS     = 2.
          IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CALL FUNCTION 'DISPLAY_LIST'
    *       EXPORTING
    *         FULLSCREEN                  =
    *         CALLER_HANDLES_EVENTS       =
    *         STARTING_X                  = 10
    *         STARTING_Y                  = 10
    *         ENDING_X                    = 60
    *         ENDING_Y                    = 20
    *       IMPORTING
    *         USER_COMMAND                =
            TABLES
              listobject                  = gt_list
            EXCEPTIONS
              empty_list                  = 1
              OTHERS                      = 2.
          IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
        ENDIF.
      ENDDO.
    <b>* Result: in the 2nd run of the report (via SUBMIT) we get
    *         the same values for the static counter.</b>
    END-OF-SELECTION.
    Regards
      Uwe

  • Can we change data in string object.

    Can we change data in string object.

    Saw this hack to access the char[]'s in a String in another thread. Beware that the effects of doing this is possible errors, like incorrect hashCode etc.
    import java.lang.reflect.*;
    public class SharedString {
            public static Constructor stringWrap = null;
            public static String wrap(char[] value, int offset, int length) {
                    try {
                            if (stringWrap == null) {
                                    stringWrap = String.class.getDeclaredConstructor(new Class[] { Integer.TYPE, Integer.TYPE, char[].class });
                                    stringWrap.setAccessible(true);
                            return (String)stringWrap.newInstance(new Object[] { new Integer(offset), new Integer(length), value });
                    catch (java.lang.NoSuchMethodException e) {
                            System.err.println ("NoMethod exception caught: " + e);
                    catch (java.lang.IllegalAccessException e) {
                            System.err.println ("Access exception caught: " + e);
                    catch (java.lang.InstantiationException e) {
                            System.err.println ("Instantiation exception caught: " + e);
                    catch (java.lang.reflect.InvocationTargetException e) {
                            System.err.println ("Invocation exception caught: " + e);
                    return null;
            public static void main(String[] args) {
                    char[] chars = new char[] { 'l', 'e', 'v', 'i', '_', 'h' };
                    String test = SharedString.wrap(chars, 0, chars.length);
                    System.out.println("String test = " + test);
                    chars[0] = 'k';
                    chars[1] = 'a';
                    chars[2] = 'l';
                    chars[3] = 'l';
                    chars[4] = 'a';
                    chars[5] = 'n';
                    System.out.println("String test = " + test);
    } Gil

  • Using workspaces for "ALMOST" static data

              Hi,
              The application that we are developing has the following requirement:
              We have a whole bunch of data that is ALMOST static as far as the application is concerned.
              However this data can change infrequently.
              We have two solutions in mind
              1) We are planning to have a StaticDataManager component that will handle the reading/updation of this data.
              All the other components of the application will get the static data from the StaticDataManager
              and cache this data to avoid communication between the components.
              The application will be hosted on a clustered WLS configuration.
              Now suppose an updation takes place, how best can we update all the components that have the cached data?
              2) In case we use Workspaces to cahce this static data, does the cluster configuration take care of
              updating the workspaces in the machines in the cluster?
              TIA!
              Sreeja
              

    If you do like you say and specify servera and then specify serverb
              respectively, then yes the workspace doesn't show the same information
              across the cluster. However, if you always specify the cluster, serverc,
              then no matter which side you update or read from the data is the same. So
              yes, if you specifiy a specific server in the cluster, and not the cluster,
              the data will not replicate across the cluster, and you lose concurrency.
              Let me paste in the output to show you what I am seeing which proves the
              data is being replicated with a single write.
              Tester ver. 1.00.00 ----> Test started...
              Connected successfully using http to ethouic97/198.171.100.107:80
              ws.store(DOG, FIDO)
              Connected successfully using http to ethouic97/198.171.100.106:80
              ws2.fetch(DOG)
              DOG = FIDO
              These are some system outs from the test app below with a few extra system
              outs. Notice if the cluster is always your connection point and not an
              individual server, in this case ethouic97. Then the answer to the original
              first question is YES, you can store near static data in workspaces on a
              cluster to have the data replicated across the cluster. However, you must
              always address the cluster and not the individual servers, in this case
              address ethouic97 never server 106 or 107 directly.
              Jonathon Cano
              "Mike Reiche" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Well, it does look like it works, doesn't it?
              >
              > Now try running the first half on one WLS instance and the other half of a
              different WL instance and
              > specify servera in the first half and serverb in the second half. If the
              workspace is replicated it should
              > work.
              >
              > It's broken now. Not really. Regardless of where the t3 connection is
              made, the workspace is
              > in the local WL instance.
              >
              > Mike
              >
              >
              > "Jonathon Cano" <[email protected]> wrote:
              > >Details:
              > >We are using a DNS cluster where serverc actually maps to servers a and
              b.
              > >If you set the workspace to SCOPE_SERVER, and use a t3client connection
              to
              > >the serverc, it can not be servera or serverb directly, then the
              workspace
              > >is updated or read from the data is persisted across both sides of the
              > >cluster. All reads and writes must be done using the cluster name for
              this
              > >to work. I use this to manage fail-over for some Vitria subscribers I
              have
              > >runnig at startup. I have a tester I wrote which works, here is the
              code:
              > >
              > > private void testWorkSpaces() {
              > >
              > > try {
              > >
              > > T3User userInfo = new T3User("system","password");
              > >
              > > T3Client t3 = new T3Client("http://cluster:80",userInfo);
              > > t3.connect();
              > >
              > > WorkspaceDef ws =
              >
              >t3.services.workspace().getWorkspace().getWorkspace("test",WorkspaceDef.OPE
              N
              > >,WorkspaceDef.SCOPE_SERVER);
              > > ws.store("DOG", "FIDO");
              > >
              > > t3.disconnect();
              > >
              > > T3Client t32 = new T3Client("http://cluster:80",userInfo);
              > > t32.connect();
              > >
              > > WorkspaceDef ws2 =
              >
              >t32.services.workspace().getWorkspace().getWorkspace("test",WorkspaceDef.OP
              E
              > >N,WorkspaceDef.SCOPE_SERVER);
              > > String dogName = (String) ws2.fetch("DOG");
              > >
              > >
              > > t32.disconnect();
              > >
              > > System.out.println(dogName);
              > >
              > > } catch (Exception e) {
              > > System.out.println("Test Work Spaces Failed.);
              > > e.printStackTrace();
              > > }
              > >
              > > }
              > >
              > >The first t3client connection echos out that it is connecting to servera.
              > >The second t3client connection echos out that it is connecting to
              serverb.
              > >However, the data being returned is the name FIDO which was written to
              the
              > >workspace when connected to servera. Thus, as long as you are connecting
              to
              > >the cluster, you get replication of data across cluster for workspaces.
              > >
              > >WLS 5.1
              > >
              > >Jonathon Cano
              > >
              > >
              > >"mreiche" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> >I am confused.
              > >>
              > >> Yes.
              > >>
              > >> >So why was the original answer to workspaces being used for clustering
              > >near static data NO?
              > >>
              > >> Because that's what the documentation says?
              > >>
              > >> Are you really, really sure it's being propagated? Or perhaps it's just
              > >being updated identically on both instances?
              > >>
              > >> Mike
              > >>
              > >> "Jonathon Cano" <[email protected]> wrote:
              > >> >I am confused. I am storing data in the workspaces right now, and I
              am
              > >> >using this data in a cluster. I can update the data in the cluster
              just
              > >> >fine, and both sides of the cluster are being updated. So why was the
              > >> >original answer to workspaces being used for clustering near static
              data
              > >NO?
              > >> >
              > >> >Jonathon Cano
              > >> >
              > >> >"Tao Zhang" <[email protected]> wrote in message
              > >> >news:[email protected]...
              > >> >>
              > >> >> But the problem is whether you want Exactly-once-per-cluster data or
              > >not.
              > >> >> If not, you can deploy the data object into each server in the
              cluster,
              > >> >but in the data object, it contains the logic of updating itself.
              > >> >> Otherwise, you have to make it a pinned service.
              > >> >>
              > >> >> It's hard to describe here.
              > >> >>
              > >> >> Hope the document can solve your problem.
              > >> >>
              > >> >> http://www.weblogic.com/docs51/classdocs/API_jndi.html#user
              > >> >>
              > >> >> Good Luck.
              > >> >>
              > >> >> Tao Zhang
              > >> >>
              > >> >> "Sreeja" <[email protected]> wrote:
              > >> >> >
              > >> >> >Thanks. Can you please elaborate on the solutions 1 and 2. We are
              > >trying
              > >> >to eliminate the
              > >> >> > usage of 3 - entity beans - since we do not want the components
              using
              > >> >the data to contact
              > >> >> >the entity bean every time they need the static data - as this
              would
              > >> >result in remote calls
              > >> >> >for every usage.
              > >> >> >Sreeja
              > >> >> >
              > >> >> >"Tao Zhang" <[email protected]> wrote:
              > >> >> >>No, the workspace can't be clustered, the data can't be propagated
              to
              > >> >other
              > >> >> >>servers in the cluster.
              > >> >> >>Of course , you can select one server as the data holder and other
              > >> >servers
              > >> >> >>will be t3 client. But it's time consuming to
              > >> >> >>connect to the data holder server.
              > >> >> >>Possible solutions:
              > >> >> >>1. RMI.
              > >> >> >>Deploy the rmi as pinned service which hold the data.
              > >> >> >>2. jndi
              > >> >> >>The data can be propagated by jndi's default behavior.
              > >> >> >>3. database or entity bean.
              > >> >> >>
              > >> >> >>Hope this can help.
              > >> >> >>
              > >> >> >>Tao Zhang
              > >> >> >>
              > >> >> >>Sreeja <[email protected]> wrote in message
              > >> >> >>news:[email protected]...
              > >> >> >>>
              > >> >> >>> Hi,
              > >> >> >>>
              > >> >> >>> The application that we are developing has the following
              > >requirement:
              > >> >> >>> We have a whole bunch of data that is ALMOST static as far as
              the
              > >> >> >>application is concerned.
              > >> >> >>> However this data can change infrequently.
              > >> >> >>> We have two solutions in mind
              > >> >> >>> 1) We are planning to have a StaticDataManager component that
              will
              > >> >handle
              > >> >> >>the reading/updation of this data.
              > >> >> >>> All the other components of the application will get the static
              > >data
              > >> >from
              > >> >> >>the StaticDataManager
              > >> >> >>> and cache this data to avoid communication between the
              components.
              > >> >> >>> The application will be hosted on a clustered WLS configuration.
              > >> >> >>> Now suppose an updation takes place, how best can we update all
              the
              > >> >> >>components that have the cached data?
              > >> >> >>>
              > >> >> >>> 2) In case we use Workspaces to cahce this static data, does the
              > >> >cluster
              > >> >> >>configuration take care of
              > >> >> >>> updating the workspaces in the machines in the cluster?
              > >> >> >>>
              > >> >> >>> TIA!
              > >> >> >>> Sreeja
              > >> >> >>>
              > >> >> >>
              > >> >> >>
              > >> >> >
              > >> >>
              > >> >
              > >> >
              > >>
              > >
              > >
              >
              

  • Is Apex used for only static data?

    Can Apex use data directly from the database (means from database schemas) or must I always create the objects in the Apex workspace before using it?
    I ask because all of the examples I have seen are using static data. Can Apex be used for data that is changing (real-time)?
    If so, where can I find an example of using real-time data?
    Thanks!

    I see, so apex can not pull data from other application schemas. Apex is used to create an application from scratch (or imported/uploaded) and then you can dynamically add records, like a data/order entry application. It is a tool that provides a better and more complete way to report and present(forms) on dynamic/static data rather that using tools like access or excel spreadsheet.
    Is this correct?
    Thanks!

  • How to garantee that static data is initialized ?

    Hi,
    In order to implement the Prototype design pattern in Java I would like to automatically register the subclasses of Prototype to a static array of prototypes in the Prototype class.
    In C++ I use a static member in each subclass which is initialized by a static method which registers a prototype in the array of prototypes.
    It works in C++ because static data are initialized before main() is called.
    In Java though, to guarantee that static data is initialized it seems that each subclass needs to be loaded first which defeats the idea of automatic registration.
    Another solution to avoid mentionning subclasses names in the Prototype class would be to rely on the relfection API to get all its subclasses but I did not find any method to do that.
    Any hint ?
    Thanks in advance

    It depends what you call a key. In database systems a
    key is part of the data you are looking for.
    In order to get a specific prototype one of course
    needs information.
    Do we disagree here ?If you read the Prototype design pattern you will understand what I mean by key.
    The objective of the Prototype pattern is to decouple
    client code from which classes implement (or subclass)
    the Prototype interface (or abstract class).
    I disagree. It is a creational pattern. The intent of the Prototype pattern is to create a prototypical instance and create new objects by copying the prototype. The intent is not to decouple client code.
    Let's get back to my original question : is there a
    way in Java to register a class automatically to the
    collection of prototypes ?
    Using the reflection API gives an alternative solution
    (thanks to schapel).And I restate my orignal solution as my answer. Why would you want look through all or your classes to determine which ones where prototypes (sorry schapel)?
    If you have a known number of prototype subclasses then you can create and intialize them when the Prototype class is loaded.
    If not then you can use the key to determine if the prototype has been loaded, if not then the Prototype class can load the class. In this case, with some creativitity, you can create a key that meets your needs.
    It seems that you are dependent on the Prototype class containing all of the prototype classes at load time because you are using them to create user interface components. So your client (use interface) is directly coupled to your implementation of the Prototype, exactly what you said the Prototype design pattern incorrectly was intended to do.

  • Static data & methods

    I'm new to java programming and I'm having a really big problem with the use of and implementation of static data types and methods- help me out!!!

    When do you choose to declare a variable to be static
    and not
    private or public?They aren't mutually exclusive. You can have public static variables.
    Are static data members associated only with a
    specific instance of the
    declared class??Static members are part of the class not of a specific instance.
    You described instance variables.
    Can non-static methods access declared static data
    types??Yes, but the opposite is not true.
    can you use the "this" keyword in both static and
    instance methods ??No, in static methods there is no "this" which refers to the current object (which doesn't exist in static context).
    Can you declare your static data members as "Public"??Yes.

  • Static data members

    i am trying to change static data members that are in one class in another class.
    so i have to keep making statements like
    classname.datamembername.method()
    i have to keeping calling classname. a lot of times, is it possible to do it without?
    maybe a bit like passing addresses in c++?
    thanks in adavnce,
    T-fox

    Would i not need to do it like this instead?
    Object obj1=classname.datamembername;
    obj1.method();because after you have created obj1, you dont use it?
    thanks anyone in advance.
    T-fox
    The below statement does the same job as of address
    passing
    Object obj1=classname.datamembername;
    datamembername.method();Bye for now
    CSJakharia

  • Getting Static Data in Footer

    Hi all,
    I have a PO report where I have to print Total Sum(which is coming from a tag at header level) of each PO lines in footer. For this I have used template and call that template in the footer section as suggested by Paul.Now the problem is the Total Sum column in the footer is holding a static value for each PO which is the Total of the last PO in the loop.But I have defined the template within the for loop of the PO loop.Can anybody kindly help ?
    Thanks in advance
    Sanjay

    Then maybe something like this?
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.List;
    import java.util.Date;
    public class RunnableWithPreviousState implements Runnable {
        private static class State {
         public Date startTime, endTime;
         public State() {
             startTime = new Date();
        private static List<RunnableWithPreviousState> runnables = Collections
             .synchronizedList(new ArrayList<RunnableWithPreviousState>());
        private State previousState, myState;
        @Override
        public void run() {
         myState = new State();
         runnables.add(this);
         int index = runnables.indexOf(this);
         if (index > 0) {
             index -= 1;
             previousState = runnables.get(index).myState;
         if (previousState != null) {
             // inspect previousState
         // do other processing
         myState.endTime = new Date();
    }Piet

  • How to add static data in ADF table using ADF 11g?

    Hi
    Can any one tell me how can I add static data in ADF table?
    Thanks

    You can try this one. I created this static table just for viewing purpose.
    Open Create View Object wizard
    Choose, “Rows populated programmatically, not based on a query” which is 3rd radio button option
    In Attribute tab, create some ‘Updatable’ Attributes
    Choose the AppModule in the final step.
    Drag and drop the view object as ADF table.
    Next, programmatically insert data in your backing bean.
            ApplicationModule applicationModule = this.getApplicationModuleForDataControl("TmpTableAppModuleDataControl");
            ViewObject vo = applicationModule.findViewObject("ProgViewObj1");
            Row newRow = vo.createRow();
            newRow.setAttribute("updAttr1", value1);
            newRow.setAttribute("updAttr2", value2);
            vo.insertRow(newRow);If you add this code in buton action you have to add button's partialTriggers to table id.

  • Error trying to extract data via HFM objects

    I've written a program to extract selected data from HFM (version 11.1.1.3.500) using the API objects. The program (shown at the bottom of this post) is failing on the 2nd of the following 2 lines:
    oOption = oOptions.Item(HSV_DATAEXTRACT_OPT_SCENARIO_SUBSET)
    oOption.CurrentValue = lBudgetScenario
    where oOption is a data load/extract object previously initialized and lBudgetScenario is the long internal ID for our budget scenario.
    The error is usually "COM Exception was unhandled" with a result code of "0x800456c7", but, mysteriously, even with no code changes, it sometimes throws the error "FileNotFoundException was not handled", where it says that it could not load "interop.HSXServerlib or one of its dependencies". The second error occurs even though HSXServer was previously initialized in the program and used in conjunction with the login.
    I've carefully traced through the VB.NET 2010 code and find that all relevant objects are instantiated and variables correctly assigned. It also occurred to me that the data load DLLs might have been updated when the 11.1.1.3.50 and 500 patches were applied. For that reason, I removed the references to those DLLs, deleted the interop files in the debug and release folders and copied the server versions of those DLLs to my PC. I then restored the DLL references in Visual Studio which recreated the interops. However, the error still occurs.
    The ID I'm using (changed to generic names in the code below) has appropriate security and, for example, can be used to manually extract data for the same POV via the HFM client.
    I've removed irrelevant lines from the code and substituted a phony ID, password, server name and application name. The line with the error is preceded by the comment "THE LINE BELOW IS THE ONE THAT FAILS".
    Imports HSVCDATALOADLib.HSV_DATAEXTRACT_OPTION
    Module Module1
    Public lActualScenario, lBudgetScenario As Long
    Public oClient As HSXCLIENTLib.HsxClient
    Public oDataLoad As HSVCDATALOADLib.HsvcDataLoad
    Public oOptions As HSVCDATALOADLib.IHsvLoadExtractOptions
    Public oOption As HSVCDATALOADLib.IHsvLoadExtractOption
    Public oSession As HSVSESSIONLib.HsvSession
    Public oServer As HSXSERVERLib.HsxServer
    Sub Main()
    'Create a client object instance, giving access to
    'the methods to logon and create an HFM session
    oClient = New HSXCLIENTLib.HsxClient
    'Create a server object instance, giving access to
    'all server-based methods and properties
    oServer = oClient.GetServerOnCluster("SERVERNAME")
    'Establish login credentials
    oClient.SetLogonInfoSSO("", "MYID", "", "MYPASSWORD")
    'Open the application, which will initialize the server
    'and session instances as well.
    oClient.OpenApplication("SERVERNAME", "Financial Management", "APPLICATION", oServer, oSession)
    'Instantiate a data load object instance, which will be used to extract data from
    'FRS.
    oDataLoad = New HSVCDATALOADLib.HsvcDataLoad
    oDataLoad.SetSession(oSession)
    'Initialize the data load options interface.
    oOptions = oDataLoad.ExtractOptions
    'Find the internal ID numbers for various scenarios and years.
    'These are required for HFM API function calls.
    lActualScenario = GetMemberID(DIMENSIONSCENARIO, "Actual")
    lBudgetScenario = GetMemberID(DIMENSIONSCENARIO, "Budget")
    'Construct file names for open data.
    strFileName = "c:\Temp\FEWND_BudgetData.dat"
    strLogFileName = "c:\Temp\FEWND_BudgetData.log"
    'Extract data for the current open cycle.
    ExtractData("Budget", BudgetYear, "Dec", strFileName, strLogFileName)
    End Sub
    Sub ExtractData(ByVal strScenario As String, ByVal strYear As String, ByVal strPeriod As String, _
    ByVal strFileName As String, ByVal strLogFileName As String)
    'Populate the Scenario element.
    oOption = oOptions.Item(HSV_DATAEXTRACT_OPT_SCENARIO_SUBSET)
    If strScenario = "Actual" Then
    oOption.CurrentValue = lActualScenario
    Else
    'THE LINE BELOW IS THE ONE THAT FAILS
    oOption.CurrentValue = lBudgetScenario
    End If
    End Sub
    Function GetMemberID(ByVal lDimID As Long, ByVal strMemLabel As String) As Long
    Dim oMetaData As HSVMETADATALib.HsvMetadata
    oMetaData = oSession.Metadata
    oEntityTreeInfo = oMetaData.Dimension(lDimID)
    GetMemberID = oEntityTreeInfo.GetItemID(strMemLabel)
    End Function
    End Module

    I stumbled upon the solution to my problem. The documentation for extracting data via objects defines member ID variables as Longs. In fact, I've always defined such variables as longs in previous object programs and had no problems. It appears that the datal load/extract "option" property of "Currentvalue" is defined as integer. When I changed all of my member ID items (such as the "lBudgetScenario" variable that was the right-side of the failing assignment statement) to be integers, the program worked.

  • Is there a way to export the coord data of AE objects in 3D space? (for programmers)

    Hey guys, we're making a video that will mostly be a fixed camera view but have objects animate around this view. The priority is the audio; the objects that animate will sound like they are flying around the camera's point of view (the user when they're using headphone). Since I will be animating the objects inside After Effects and already be assigning them X,Y, & Z coordinates during the animation, is there any way to take the data of the objects location through time to give to the programmers so they can assign the audio/attributes to the objects moving around in the scene? Sort of like how if I made a null object in AE, I can have it be the parent to another layer(s), I need to find a way to make this same concept work but for audio and other assigned attributes. It seems it would save us a lot of time if this is possible instead of figuring out where the sound is coming from later on by scratch and guessing. If there are other programs that can do this please let me know, I do use Maya and other 3D apps. Thanks!
    ~ Dave

    There is this reference:
    http://help.adobe.com/en_US/AfterEffects/9.0/WS3878526689cb91655866c1103906c6dea-7a38a.htm l
    Perhaps there is a way to export the javascript as a text file or some format useful to your programmers.
    Can you give more details as to your end result and starting point?  You mentioned you use other 3D programs.  Maya used to have in Maya 4.0 a way to dynamically animate according to audio.  Other 3D programs still offer this functionality through their scripting and/or interface.
    Flash Pro has 3D layers and if your animations are short enough you might be able to do the project in Flash and access the SoundChannel aspects of ActionScript 3.0 .  AE uses a version of Javascript.  There might be a way in the AE Scripting reference to read objects within the file and a method in the scripting to export these objects.  I'm only guessing since I don't know how to script in AE but I see no one has replied to this thread and I was curious myself.

  • Problem in activating data in datastore object

    Hello,
    I have an issue while activating the data in Datastore Object.
    I have been trying to load the data to cube 0FIAP_C02. I am going to write down all the process I am doing, so you will have a clear picture and advice me accordingly.
    1.)Installing Business content (Cube, Datastore objects, Infosources,
    Transfer strcuture and Transfer and update rules) ( 0FIAP_C02, 0FIAP_O06, 0FI_AP_1 and 0FI_AP_6 (infosources)
    2.)Replicate the datasources from the R/3 side to BW side (the
    datasources are replicated as 3.x)
    3.) Create transfer rules and transfer structure.
    4.) Create Infopackage for loading data to PSA.
    Datasource 0FI_AP_1 -> Full Upload.
    Datasource 0FI_AP_6 -> Init. Delta Load.
    Load data for both the datasources.
    5.)Migrate the 3.x datasources to "Emulated datasources". Create
    Transformation between Datasource 0FI_AP_1 and cube 0FIAP_C02, also
    create transformation 0FI_AP_6 to Datastore Object 0FIAP_O06.
    Create DTP's to load the data from PSA to data targets.
    Now is my problem,
    1.)I am having errors while activating the data in ODS. (It says that errors occured during the activation of data but I cannot see an error log or anything of that kind.) I can load the data and it gives me green light but when i try to activate it gives errors.
    2.)A follow up question of the activation of data is does this data goes and sits in PSA of the data mart 80FIAP_O06.And then do we have to create transformation/DTP from Datastore Object to cube (0FIAP_C02) or we are going to use the Business content transfer rules and Load the data by Infopackage.
    Thanks,
    Kiran Mehendale.

    Hi Kiran,
    ad 1.) You most likely have to open a customer problem message. Maybe you try to elaborate on your issue (problem message, etc.) and we can try to assist you.
    ad 2.) You can create a DTP from one persistent storage object (PSA, DataStore Object, InfoCube, etc.) to another one. Hence you can also create a DTP for DataStore Object --> InfoCube.
      Cheers
        SAP NetWeaver 2004s Ramp-Up BI Back Office Team

  • Error while updating data from DataStore object

    Hi,
    Currently we are upgrading BW3.5 to BI7.0 for technical only,
    we found and errors during process chain run in further processing step. This step is basically a delta loading from DSO to Cube.
    The error message are:
    Error while updating data from DataStore object 0GLS_INV
    Message no. RSMPC146
    Job terminated in source system --> Request set to red
    Message no. RSM078
    That's all no further errors message can be explained clearly here from system.
    I have applied SAP note 1152453 and reactivate the datasource, infosource, and data target.
    Still no help here!?
    Please advise if you encountered these errors before.
    Thanks in advance.
    Regards,
    David
    Edited by: David Tai Wai Tan on Oct 31, 2008 2:46 PM
    Edited by: David Tai Wai Tan on Oct 31, 2008 2:50 PM
    Edited by: David Tai Wai Tan on Oct 31, 2008 2:52 PM

    Hi Vijay,
    I got this error:
    Runtime Errors         MESSAGE_TYPE_X      
    Date and Time          04.11.2008 11:43:08 
    To process the problem further, contact you SAP system       
    administrator.                                                                               
    Using Transaction ST22 for ABAP Dump Analysis, you can look  
    at and manage termination messages, and you can also         
    keep them for a long time.                                   
    Short text of error message:                                             
    No start information on process LOADING                                                                               
    Long text of error message:                                              
      Diagnosis                                                               
          For process LOADING, variant ZPAK_0SKIJ58741F4ASCSIYNV1PI9U, the    
          end should be logged for instance REQU_D4FIDCEKO82JUCJ8RWK6HZ9KX    
          under the log ID D4FIDCBHXPLZMP5T71JZQVUWX. However, no start has   
          been logged for this process.                                       
      System Response                                                         
          No log has been written. The process (and consequently the chain)   
          has been terminated.                                                
      Procedure                                                               
          If possible, restart the process.                                   
      Procedure for System Administration                                                                               
    Technical information about the message:                                 
    Message class....... "RSPC"                                              
    Number.............. 004                                                 
    Variable 1.......... "D4FIDCBHXPLZMP5T71JZQVUWX"                         
    Variable 2.......... "LOADING"                                           
    Variable 3.......... "ZPAK_0SKIJ58741F4ASCSIYNV1PI9U"                    
    Variable 4.......... "REQU_D4FIDCEKO82JUCJ8RWK6HZ9KX" 
    Any idea?

  • Creation of a table with static data(not a DB table)

    Hi
    I need to display a table with some static data in an OAF page. This table is not a DB table. It is like an HTML table
    I have placed the following query
    SELECT 'A1','B1' FROM DUAL UNION SELECT 'A2',B2' FROM DUAL in the VO. But it is returning a single row which is acting as the header of the table.
    Can anyone help me to create the table with 2 rows inserted in it.
    Thanks
    Edited by: gsaxena on Aug 4, 2009 3:04 AM
    Edited by: gsaxena on Aug 4, 2009 5:24 AM

    Hi
    Please execute your VO inside the CO of table region ,right now it is not getting executed,thats y it is giving just column names
    use the following code PR method of CO
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject oav = (OAViewObject)am.findViewObject("XXVO");
    oav.first();
    let me know in case of any issue
    thanx
    Pratap

Maybe you are looking for