Objects within an Object - different count of values

Hi all,
I have a problem for which I am unable to build a logic and I would appreciate any inputs...
The objects are as below
CREATE TYPE num_ids IS TABLE OF NUMBER;
CREATE TYPE test_rec AS OBJECT
data   NUMBER(4)
CREATE TYPE test_tbl AS TABLE OF test_rec;
CREATE TYPE final_rec AS OBJECT
data_obj     test_tbl;
num_tbl      num_ids
CREATE TYPE final_tbl AS TABLE OF final_rec;
CREATE TABLE data_num
data       NUMBER(4),
subdata  NUMBER
);Now the problem that I am facing...
final_tbl is going to have only 1 record and never more than that. I need to populate the table data_num with this record. But since the object final_rec itself is comprised of objects, the count of values in final_tbl.data_obj and final_tbl.num_tbl will always differ.
I am not able to get the logic to write the loop (?) to populate the data from final_tbl into data_num and would appreciate if anyone could help me out with this...
Thanks in advance..
P.S. - Do excuse me if the heading is a little misleading...was not sure what to give as the heading for it to be more meaningful.
Message was edited by:
henryswift

Not sure, but maybe this gives you a hint:
SQL> create type num_ids is table of number;
Type created.
SQL> create type test_rec as object (
   data   number (4)
Type created.
SQL> create type test_tbl as table of test_rec;
Type created.
SQL> create type final_rec as object (
   data_obj   test_tbl,
   num_tbl    num_ids
Type created.
SQL> create type final_tbl as table of final_rec;
Type created.
SQL> create table data_num(data       number(4),subdata  number)
Table created.
SQL> /* insert into data_num */ select data, column_value
  from table (final_tbl (final_rec (test_tbl (test_rec (1), test_rec (2)),
                                    (num_ids (5, 6, 7)
             ) t,
       table (t.data_obj), table (t.num_tbl)
      DATA COLUMN_VALUE
         1            5
         1            6
         1            7
         2            5
         2            6
         2            7

Similar Messages

  • Storing an object within an object

    insertLabel is great, but I have the need to store an object (not an InDesign object, but just a custom one) for later reference with a TextFrame. I thought about serializing the object, but javascript doesn't have a native serialize function, so before I embark down that route, is there an alternative method I could use to do this?
    thanks

    Here is a snippet from my Package for Archive script.
    At start, the script I extracts the previously stored settings with eval() method, if the script is run for the 1st time -- creates default settings.
    function GetSettings() {
        var mySettings = eval(app.extractLabel("Kas_PackageForArchive_Settings_ver3.0"));
        if (mySettings == undefined) {
            mySettings = { copyFontsCheckBox:false, copyGraphicsCheckBox:true, updateGraphicsCheckBox:true, includeHiddenLayers:true, ignorePreflightErrorsCheckBox:true, createReportCheckBox:false, createLogCheckBox:true };
        return mySettings;
    Then a dialog box appears where a user selects settings and after he/she clicks OK, the settings are converted to string with toSource() and stored as string with insertLabel() method.
        if (myShowDialog== 1) {
            var myResult = {};
            myResult.copyFontsCheckBox = myCopyFontsCheckBox.value;
            myResult.copyGraphicsCheckBox = myCopyGraphicsCheckBox.value;
            myResult.updateGraphicsCheckBox = myUpdateGraphicsCheckBox.value;
            if (myInDesignVersion == 6) myResult.includeHiddenLayers = myIncludeHiddenLayersCheckBox.value;
            myResult.ignorePreflightErrorsCheckBox = myIgnorePreflightErrorsCheckBox.value;
            myResult.createReportCheckBox = myCreateReportCheckBox.value;
            myResult.createLogCheckBox = myCreateLogCheckBox.value;
            myResult.folder = myFolder;
            app.insertLabel("Kas_PackageForArchive_Settings_ver3.0", myResult.toSource());
        return myResult;
    In other words, the setting are stored in a custom object which can be serialized with toSource() and then restored with eval().
    Kasyan

  • SharePoint Foundation Sandboxed Code Service - Unable to activate worker process proxy object within the worker process

    Issue:
    On a vanilla installation, the sandboxed code service (e.g. SPUCHostService.exe) is started; however, SPUCWorkerProcessProxy.exe and subsequently SPUCWorkerProcess.exe fails to start.
    Resolution/Workarounds attempted:
    Attempted 2 different Load balancing settings – local and remote (i.e. affinity)
    Ensured local computer policy on server for ‘RPC Endpoint Mapper Client Authentication’ and ‘Restrictions for Unauthenticated RPC clients’ is disabled.
    Ensured following key in registry is set properly - HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\RPC
    Attempted to bypass SharePoint’s check for certificate revocations at crl.microsoft.com
    Ensured the service account is added to the respective groups (e.g. Performance Log Users, Performance Monitor Users, IIS_IUSRS, WSS_ADMIN_WPG, WSS_WPG)
    Increased limit of ‘AbnormalProcessTerminationCount’ of SPUserCodeService via Powershell
    We have tried all possible workarounds from the following MSDN reference:
    http://blogs.msdn.com/b/sharepointdev/archive/2011/02/08/error-the-sandboxed-code-execution-request-was-refused-because-the-sandboxed-code-host-service-was-too-busy-to-handle-the-request.aspx
    ULS:
    02/21/2014 05:24:50.64  SPUCHostService.exe (0x0230)  0x0F74  SharePoint Foundation Sandboxed Code Service              fe8a               
    Medium               -  - Unable to activate worker process proxy object within the worker process: ipc://38432b45-2f32-4926-ade2-ef53ae1cd501:7000  
    02/21/2014 05:24:50.64  SPUCHostService.exe (0x0230)  0x0F74  SharePoint Foundation Sandboxed Code Service              fe8c               
    Medium               -  - Error activating the worker process manager instance within the worker process. - Inner Exception: System.InvalidOperationException: Unable to activate worker
    process proxy object within the worker process: ipc://38432b45-2f32-4926-ade2-ef53ae1cd501:7000     at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcess.CreateWorkerProcessProxies()    
    02/21/2014 05:24:50.64  SPUCHostService.exe (0x0230)  0x0F74  SharePoint Foundation Sandboxed Code Service              ei0t               
    Medium               - Process creation/initialization threw an exception. Stopping this process. "ipc://38432b45-2f32-4926-ade2-ef53ae1cd501:7000"
    02/21/2014 05:24:50.65  SPUCHostService.exe (0x0230)  0x0F74  SharePoint Foundation Sandboxed Code Service             
    fe87                Medium               -  - Error activating the worker process manager instance within
    the worker process. - Starting worker process threw - Inner Exception: System.InvalidOperationException: Unable to activate worker process proxy object within the worker process: ipc://38432b45-2f32-4926-ade2-ef53ae1cd501:7000     at Microsoft.SharePoint.UserCode.SPUserCodeWorkerProcess.CreateWorkerProcessProxies()   
    Any other insights on how I can troubleshoot the issue described?
    Thanks in advance!

    Hi ,
    For resolving your issue , you can do as the followings:
    1. Logged into the Web Server with the Timer Service Account.
    2. Ran the powershell command to check the SID of the account running the spucworkerprocessproxy.exe:  
    $(Get-SPManagedAccount -Identity "THE SERVICE ACCOUNT").Sid.Value
    3. Checked the registry :
    HKEY_USERS\[SID OF THE SERVICE ACCOUNT]\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing\State
    4. Changed the value 0x00023c00 to 0x00023e00
    In addition, here are some similar posts for you to take a look at:
    http://social.technet.microsoft.com/Forums/en-US/aae497df-5f0d-4f86-a724-c7b805ccd07f/sharepoint-sandboxed-code-service-troubles?forum=sharepointgeneralprevious
    http://blogs.technet.com/b/operationsguy/archive/2011/01/17/sharepoint-2010-sandboxed-code-solutions-and-web-proxy.aspx
    http://social.msdn.microsoft.com/Forums/en-US/c21e2c3a-a259-4d5f-8071-eff52b7bddc3/issue-sandbox-solution-too-busy-to-handle-the-request?forum=sharepointgeneralprevious
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Do I return an object within or outside a try block?

    I am getting some strange errors/compile messages within a block of code that I introduced a try and catch. Before I used it, everything worked fine, example - this works:
    public OracleConnection connect() throws Exception{
    Connection con = ...create it here...
    // I do not catch anything
    return con;
    Then I tried this:
    public OracleConnection connect() throws Exception {
    try{ Connection con = ...create it here...
    } catch { (Exception e)};
    return con;
    here the compiler tells me: variable con not found in class. -but it is I just defined it in the try statement!
    Then I tried:
    public OracleConnection connect() throws Exception {
    try{
    Connection con = ...create it here...
    return con;
    } catch { (Exception e)};
    and I get a compiler error saying the method doesn't return anything...
    Whats the deal?
    null

    The Connection is only in scope inside the try because you declare it within the block.
    As Fred says, declare the object outside the block, then set the value within the block. This way that value is available after the block.
    Also, in the interests of good code, it is considered bad form to catch Exception when you know the exact exeption you are catching, so your code idealy would be:
    public Connection connect() {
    Connection con = null;
    try{
    con = DriverManager.getConnection(jdbcUrl);
    // etc
    // etc
    catch (SQLException sqle) {
    // Cope an SQL related problem
    return con;
    This way if the code that follows the connection creation causes an exception of a different type you do not treat it the same way as an SQL related problem.
    I'll get off my high horse now ;-)
    Regards,
    Chris

  • Design Problem: Object reference another object at different states

    Hi,
    This is a problem I came across today while developing a simple prototype. Imagine I have a class Boy which has a one-to-many relation with a class Dog.
    The class Boy has the following methods: getName(), setName(), getAge(), setAge(), getDogs().
    The class Dog has the following methods: getName(), getOwner()
    When the application starts I load a Boy from the database as follows:
    Boy peter = BoyFactory.loadBoyByName("Peter");
    peter.setAge(10);
    I then add peter to a static list which can be accessed from everywhere within my application.
    At a different stage in the application I want to load a dog (just a dog). So I use the following code:
    Dog dog = DogFactory.loadDogByOwnerName("Peter");
    The dog object (using JDO or Hibernate) would also have a reference to the Boy object. However when calling the getOwner() method, the boy returned will not be the same boy stored in that static list (I expect the age, which was not persisted in the database, to be different).
    Is there a way how when loading the Dog object, since its Owner of type Boy is already loaded in my object model, a Framework such as Hibernate or JDO will use this object rather then re-build a new one.
    I am planning to use either Hibernate or some JDO framework and that is why I am asking this question.
    If I where going to use some custom made way to load Dog then I would just search if the Owner was in that static list and if yes then set the owner of the dog equal to the object found in the static list.
    However I was wondering if there is some design I should consider (study) to handle such a problem.
    Thanks and Regards,
    Sim085

    Thanks uj :) I had another thought...
    I will give another scenario so things are more clear.
    Imagine having a class Teacher which has one-to-many relation with a class Student.
    If you where programming the classes for these two entities then would you program the student class as follows:class Student{
    Teacher t = null;
    void setTeacher(Teacher t){...}
    Teacher getTeacher(){...}
    }ORclass Student{
    int teacherId = -1;
    void setTeacherId(int tId){...}
    int getTeacherId(){...}
    }The difference between these two methods is that in the first method, if I wanted to know the teacher of a student then I would only have to call the getTeacher() method while using the second design I would first need to get the teacher Id and then make a database call to actually get the Teacher object (or else get it from a static list where the teacher could be saved.
    Personally I prefer the first method since I like to have an object model where objects are directly linked with other rather then linked through some form of id. However I do not know which design is best to use...
    Thanks
    Sim085

  • How to create multiple objects within a class

    I have a item.lvclass which has an item.ctl (contains a cluster of class private data).  I need to add another object (item2.ctl) within that same class so that I can reuse the code for that class.
    So how do you create additional objects within the same class?

    Well... right now...  I've cornered myself going down this path:  http://forums.ni.com/t5/LabVIEW-Idea-Exchange/LVOO​P-Interfaces/idc-p/1314637#M8918
    Seems like the solution in the idea was not implemented yet....
    Okay.  I will try to describe the situation differently...
    Let's say I have a Car.lvclass
    I want to have two objects:  sedan & roadster
    both have similar properties, but also have different properties:
    4 doors vs 2 doors
    hardtop vs convertible
    silver vs white (color)
    I want the two objects to be of the same class so that they can share the same private and public VI's.  As a matter of fact, I want to have both objects in the VI's within the Car.lvclass.

  • How can i reference a MIME object within a correspondence format through...

    how can i reference a MIME object within a correspondence format through TX oofo or se71?
    Hi, I need to put a MIME object within a correspondence's format that i've already done through Tx oofo. My problem is, that i don't know exactly how can i make the reference of that MIME object in the format? and What structure type do i have to use in order to make appear the MIME object in my correspondence's format? Does anybody can help me with this?   
    Regards    Hector

    Frank,
    I tried to find some examples/samples on how to create CollectionModel for a table component but not successful.
    Can you clarify the following ?
    1. "CollectionModel" is referenced only by af:table attributes "value", "selectedRowKeys" and "selectionListener".
    The rest of af:table attributes such as "rows", "fetchSize" used to reference the iterator binding in the binding container via the EL expression "#{bindings.VOIteratorBinding.xxx} .
    What should I replace that EL expression with?
    2. I heck out the bean method to create the CollectionModel as following, is it close to what you mean?
    public void initBusinessDataDashboardView() {
    OperationBinding operation = BeanUtils.getOperationBinding("getPanelBusinessData");
    Map params = operation.getParamsMap();
    Key panelKey = getPanelInfoView().getKey();
    params.put("panelKey", panelKey);
    params.put("maximizedView", false);
    panelView = (ViewObject)operation.execute();
    // Heck code to create CollectionModel
    RowSet rowSet = panelView.getRowSet();
    ArrayList rowList = new ArrayList();
    while (rowSet.hasNext()) {
    rowList.add(rowSet.next());
    model = new ChildPropertyTreeModel(rowList, null);
    // To be used to set up af:table value, selectRowKeys, selectionListener via EL expr #{backingBeanScope.MyBean.model.xxx}
    public CollectionModel getModel() {
    return model;
    Am I on the right track?
    Edited by: Pricilla on May 4, 2010 2:20 PM

  • Objects to show at different times on a slide not showing up

    Hi  Everyone,
    I hope this problem is minor and that I’m just missing a small step but here it goes…
    I’m using Captivate 4 and I’ve only been using it on one particular computer. I updated a captivate project that I’ve been working on since September and I’ve finished all the edits (added a picture, changed a few words) as requested by colleauges when all of a sudden, some objects that were suppose to show at different times on the slide were not showing up at all. The frustrating part is I actually finished the project! When I do a preview within the edit view, the objects appear as it should, however, when I publish it or do a preview on wepage, the objects are not appearing at all (ie a word at 10 sec, another at 20 sec). Anway, there were only 3 slides acting like this, all with objects are suppose to show up at different times on the slide (these were not the slides that I recently edited). My video works fine, my quiz works fine, and I’ve uploaded an initial version of my work on a Pathlore LMS with no problems (publish specs: flash 8, AS2).
    I have several other projects that are less complicated (ie no video, no objects showing at different times within the slide) and they are OK. I’ve checked on other computers and same problem.
    I tried deleting the slides, and redoing it again within the same project but still wont work I tried copying everthing on a new project with the same size with no luck.
    I tried making a 2 slide project with objects showing up at different times and it works.
    Is my project corrupted in some way? What are the possible culprits for this problem?
    I really hope I don’t have to start from scratch…
    Thanks in advance!

    Hi there
    While it's certainly possible that the project has somehow become corrupt, you might find that simply closing and restarting Captivate changes things.
    Have you tried that? I've seen it where bits and pieces are suddenly missing. After I restarted, things were just fine again.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Smart object within another smart object

    I'm running photoshop cs3.  I created two different smart objects.  Within each of those smart objects, I want to include another smart object.  However, when I update the embedded smart object, only the partent SO is updated, the other SO seems to have a different child.  here is the setup visually:
    canvas -> SO1  -> SO3
    canvas -> SO2  -> SO3
    so when I update SO3 from within SO1, only SO1 is updated - SO2 stays the same.  is there any way to have updates to SO3 affect all its parent SOs?
    thanks

    Bart Cross wrote:
    Smart objects are not really that smart after all. Yes PS uses a version of the original object, not the object itself.
    Furthermore, I would add they they aren't even OBJECTS!
    The very concept of an object is that changing it would affect all instances of that object, no matter where it is included, intended to save development time on complex projects.
    http://en.wikipedia.org/wiki/Object_(computer_science)

  • Spring ..Can 1 interceptor intercept all calls to all objects within a clas

    My Building implementation contains Floor objects, which in turn contain Door objects. These floor objects are driven by the parent Building that contains them. If a Floor makes a call to a Door class this call can't be intercepted by the first buildingBean below. I had to create another one "floorBean" as listed below to catch these.
    Can the buildingBean be modified to catch all calls made by objects within them?
    <!-- Bean configuration -->
         <bean id="buildingBean" class="org.springframework.aop.framework.ProxyFactoryBean">
              <property name="proxyInterfaces">
                   <list>
                        <value>src.Building</value>
                   </list>
              </property>
              <property name="target">
                   <ref local="myBuilding"/>
              </property>
              <property name="interceptorNames">
                   <list>
                        <value>theTracingBeforeAdvisor</value>
                        <value>theTracingAfterAdvisor</value>
                   </list>
              </property>
         </bean>
         <!-- -->
         <!-- Bean Classes -->
         <!-- -->
         <!-- -->
              <bean id="floorBean" class="org.springframework.aop.framework.ProxyFactoryBean">
              <property name="proxyInterfaces">
                   <list>
                        <value>src.Floor</value>
                   </list>
              </property>
              <property name="target">
                   <ref local="myFloor1"/>
              </property>
              <property name="interceptorNames">
                   <list>
                        <value>theTracingBeforeAdvisor</value>
                        <value>theTracingAfterAdvisor</value>
                   </list>
              </property>
         </bean>
         

    Threads are part of code that allows you to run multiple operations "simultaneously". "Simultaneously", because threads are not run actually simultaneously in any one-CPU machine. Since you most propably have only one CPU in your system, you can only execute one CPU instruction at time. Basically this means that your CPU can handle only one java-operation at time. It does not matter if you put some code in thread and start it, it will still take up all CPU time as long as the thread runs.
    So you would need a way to let other threads run also, for that purpose thread contains a yield feature that allows you to give time for other threads to run.
    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Thread.html#yield()
    You need to use thread's yield() method in your thread code, in a place you want to give other threads time to run. Also bear in mind that if you yield your first thread run to allow second thread to run, you also need to add yield to the second thread also. If you don't, after yielding the first thread, the second thread will eat up all CPU time until it finishes, thus meaning the rest of your first thread will be run after second thread is done.
    One good place to execute yield() is usually at the end of a loop, for example 'for' or 'while' loop. This way you prevent for example while-deadlocks.
    Here is a java thread tutorial, worthy reading:
    http://java.sun.com/docs/books/tutorial/essential/threads/

  • *** [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of UNIQUE KEY constraint 'ClientPushMachine_G_AK'. Cannot insert duplicate key in object 'dbo.ClientPushMachine_G'. The duplicate key value is (16777412). : sp_CP_CheckNewAss

    *** [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of UNIQUE KEY constraint 'ClientPushMachine_G_AK'. Cannot insert duplicate key in object 'dbo.ClientPushMachine_G'. The duplicate key value is (16777412). : sp_CP_CheckNewAssignedMachine
    CCCRT::RunSQLStoredProc - Failed to execute SQL cmd exec [sp_CP_CheckNewAssignedMachine] N'xxx', 1
    CCRQueueRequest::GetRequestFromQueue - Failed to execute SQL cmd sp_CP_CheckNewAssignedMachine
    I get the above issue and the one below at a client site; the error started with the error below then changed to the one reported above and back to the one below. Everything is working as it should but the issues
    started when one of the admins at the data-centre incorrectly applied a gpo which affected a number of service accounts (sccm inclusive) and they expired....hence reporting in sccm got broke as well as this error in the ccm.log file appeared.
    Remote client install still works but I believe this error affects new client discovered by sccm, so in other words devices discovered by sccm do not get the client installed automatically....but if all access and permissions are in place...pushing out the
    client to the new discovered system works, it just not done automatically, which kinda defeats one the reasons for using sccm.
    I have searched the breadth of the tinternet and I can only find two technet reference to the same error  - one says to edit the stored procedure on the sql server which I don't think should be done... Like Jason said and I concur....its bad joo joos.
    The second suggestion, said you should select all the options in the Client Push Installation properties, I have tried this but hasn't solved the problem.
    I am planning to upgrade the site to the R2 CU3 before the end of the year but I would like to resolve this error before the upgrade.
    The site is currently sccm 2012 sp1 
    Any idea?> Resolution? sil vous plait!
    Merci

    Hi ,
    Please back up the database of the SCCM site. Then run the following query against the Site DB and see how it goes.
    DELETE FROM System_SMS_Resident_ARR
    WHERE ItemKey IN (
    SELECT ItemKey FROM vSystem_SMS_Resident_ARR
    GROUP BY ItemKey
    HAVING COUNT(ItemKey) > 1
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • How to get attribute value from an object inside an object in Xpress

    Does anyone know how to get an attribute value from an object in Xpress in a workflow? I have an object structured as follows:
    <ResourceInfo accountId='mj628' tempId='3483372b787ce7dd:-5d99a0c5:130cb238483:-3600'>
    <ObjectRef type='Resource' name='Google Apps'/>
    </ResourceInfo>
    I need if possible to get the name='Google Apps', which is inside the ObjectRef, so I guess its an attribute value of an object inside an object.

    If the ResourceInfo object is accessible in a variable, i.e. named "myResInfo", you just have to check the Java API and call the relevant method:
    <invoke name='getResourceName'>
      <ref>myResInfo</ref>
    </invoke>

  • How to get the values of the objects inside an object??

    Hi,
    I am trying to write code to display name and memory usage of all session attributes, in a recursive way.
    I suppose reflection is needed here, but I can’t figure out how to get the values of the objects inside an object...
    private void handleIt(String attributeName, Object attributeValue) {
         boolean isPrimitiveOrNull = ((null == attributeValue) ||
              (attributeValue.getClass().isPrimitive()));                                         
         if (isPrimitiveOrNull) {
              sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "}");
         } else {
              sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "{");               
              Field[] fields = attributeValue.getClass().getDeclaredFields();
              int lim = fields.length;
              String name;
              Object value = null;
              for (int i = 0; i < lim; i++) {
                   name = fields.getName();
                   //LOOK AT THIS LINE: !!!!!!!!!!!!!!!!!!!!!!!!!!!
                   value = fields[i].get(obj); //I don´t know what 'obj' should be??
                   handleIt(name, value);
              sb.append("}");               
    Any suggestions will be greatly appreciated...

    I realized that massive int objects called MAX_VALUE, MIN_VALUE and SIZE where causing the StackOverflow, so I removed them from the analysis.
    This is the resultant code. But I think it isn’t accurate in calculating the real size of objects being got using reflexion.
    Do you or somebody have any more suggestions?
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.ObjectOutputStream;
    import java.lang.reflect.Field;
    import java.util.Enumeration;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class SessionMeasurer extends HttpServlet {
         private static final long serialVersionUID = 1470488362727841992L;
         private StringBuilder sb = new StringBuilder();
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              performTask(request, response);
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              performTask(request, response);
         public void performTask(HttpServletRequest request, HttpServletResponse response) {
              HttpSession     session = request.getSession(false);     
              String attributeName = "";
              Object attributeValue = null;
              for (Enumeration<?> attributeNames = session.getAttributeNames(); attributeNames.hasMoreElements();) {
                   attributeName = (String)attributeNames.nextElement();
                   attributeValue = session.getAttribute(attributeName);
                   handleIt(attributeName, attributeValue);               
              System.out.println(sb.toString());
         private void handleIt(String attributeName, Object attributeValue) {           
              if (attributeValue != null) {          
                   boolean isPrimitive = attributeValue.getClass().isPrimitive();
                   if (isPrimitive) {
                        sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "}");
                   } else {
                        sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "{");               
                        Field[] fields = attributeValue.getClass().getDeclaredFields();
                        String name;
                        Object value = null;
                        int lim = fields.length;
                        for (int i = 0; i < lim; i++) {
                             name = fields.getName();                                                                                                         
                             if (!name.endsWith("_VALUE") && !name.equals("SIZE") && !name.equals("serialVersionUID")) {
                                  try {
                                       value = fields[i].get(attributeValue);
                                  } catch(Exception e) {
                                       //PENDIENTE: Tratamiento excepción
                                  handleIt(name, value);
                        sb.append("}");               
         private int sizeOf(Object obj) {
              //Valid only for Serializables
              ByteArrayOutputStream baos = new ByteArrayOutputStream();
              ObjectOutputStream oos = null;     
              byte[] bytes = null;               
              try {          
                   oos = new ObjectOutputStream(baos);
                   oos.writeObject(obj);
                   bytes = baos.toByteArray();
              } catch(Exception e) {               
                   //PENDIENTE: Tratamiento excepción
              } finally {
                   if (oos != null) {
                        try {
                             oos.close();
                        } catch(Exception e) {
                             //PENDIENTE: Tratamiento excepción                         
                   if (baos != null) {
                        try {
                             baos.close();
                        } catch(Exception e) {
                             //PENDIENTE: Tratamiento excepción                         
              int size = -1;
              if (bytes != null) {
                   size = bytes.length;
              return size;          

  • SRM system object within Portal: WAS settings with Webdispatcher

    Hello Portal experts,
    we have SAP EHP4 ERP system (only ABAP stack).
    In order to use some SRM functionality we installed SAP EP (EHP1) and creates a appropriate system object within portal.
    We use a  Webdispatcher, so we have to replace within WAS area the local address by the address of Webdispatcher and appropriated port (webserver:567).
    The tests of this system object looks as follows:
    The address of http://webserver:567 can be retrieved
    The problem are the results of following tests:
    http://webserver:567/sap/bc/ping
    http://webserver:567/sap/bc/webdynpro
    These errors occured because the both pathes /sap/bc/ping and /sap/bc/webdynpro do not exist on Portal/Java engine.
    Questions:
    How can we connect ABAP backend to Portal with extra Webdispatcher?
    What are the setting within WAS area?
    kind regards

    Hi Thom,
    Is your webdispatcher in front of your portal? or in front of the ICM of your Backend System?
    If the applications that you want to enable via your EP are of the type: WD for ABAP, BSP, IAC or ITS then you should also have a webdispatcher in front of your Backend System (in addition to on in front of your portal).
    Please check the following link:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/9a9a6b48c673e8e10000000a42189b/frameset.htm
    On this page, scroll down to the last example. Although the image is there to explain "High Availability of the SAP Web Dispatcher" it gives you a good view on the request respond steps.
    One rule of thumb is that the EP system itself doesn't act as a reverse-proxy. In other words, if an iView points to a WD 4 ABAP application on the Backend then the actual WD4ABAP application is rendered in an iFrame.
    From a technical/connection point of view the client (browser) has 2 connections, one to the EP and 1 tot the Backend.
    Allot of people do not realize this when they start there project...
    Cheers, hope this helps you a bit....
    B

  • How to create a dimension object in SAP BW Unv with Null value

    Hello,
    for query syncronisation task, I need a dimension object in my BW universe with NULL value. Does someone know, how to do it or if its possible?
    Regards,
    Thilo

    Hi Thilo,
    so the only common item is Material then - correct ?
    Query 1                                                                                Query 2
    Formulation (grouping of materials)                                                  (No counterpart)
    Material                                                                                Material
    dummy key figure (why?)                                                                Company Code
                                                                                    10 Keyfigure
    Is this something you regular have to do ? what about a MultiProvider ?
    did you try "merged dimensions" in the Web Intelligence Report ?
    Ingo

Maybe you are looking for