BEx Variable - Why assigned to two objects?

Hello,
In 7.0 I created a BEx selection variable. When I save the variable I can see this variable under another object - with same technical name -. I have no clue why this variable is assigned to two objects.
There is no "technical link" between this two objects....
Any idea?

i also faced the same issue ...when i Save the query and then again reopened the query .
the problem got solved.

Similar Messages

  • WEBI prompt based on bex variable suppress not assigned hashtag value in LOV

    Hi,
    is it possible to suppress the "Not assigned (#)" value from the list of values in a webi prompt based on a bex variable?
    This "Not assigned" value is something BW specific, BW adds this to each characteristic automatically?!
    WEBI:
    RSRT:
    It needs to work in WEBI, not only in RSRT, and the filtering of data still needs to work.
    For rsrt it works, when you exclude the not assigned value in "Filter > Characteristic Restrictions" and use the bex variable in/through "Filter > Default Values", but this does not work in WEBI, because the BEX Query Data is not filtered on the in the prompt selected value.
    Thanks.
    Regards
    David

    Thanks David for a quick reply !
    I could manage to avoid # values in WebI prompt using BAdI implementation, here is the brief:
    Problem:
    WebI report prompt (which shows BEx variable) list of values shows blanks or # . Rrequirement was to avoid these blanks or #
    Environment:
    BW 7.3
    BO 4.0
    BW Cube > BEx Query > OLAP Connection > WebI report
    Solution:
    InfoObject Level1 in BW had # values in masterdata, this could not be deleted since it was in use with other Cubes.
    Vaurable Var_Level1 displays # when pressed F4 running BEx query and in list of values in WebI report prompt.
    I implemented BAdI on Level1 info object and variable Var_Level1.
    Steps to implement BAdI are as in following link
    BEx Query - Control the values which are shown on F4
    Used following code to elimitate #.
    METHOD IF_RSR_VARIABLE_F4_RESTRICT~GET_RESTRICTION_FLAT.
    DATA: l_s_range     LIKE LINE OF c_t_range.
    DATA: l_var_range   LIKE LINE OF i_t_var_range.
    DATA: IT_MZLEVELS TYPE TABLE OF /BIC/MZLEVELS,
    WA_MZLEVELS LIKE LINE OF IT_MZLEVELS.
    DATA: L_ZLEVEL1     TYPE /BIC/OIZEVEL1.
      IF i_vnam EQ 'ZV_LEVEL1'.
    SELECT /BIC/ZLEVEL1
    FROM /BIC/MZLEVELS
    INTO CORRESPONDING FIELDS OF TABLE IT_MZLEVELS
    WHERE OBJVERS       = 'A'.
    IF SY-SUBRC NE 0.
    EXIT.
    ENDIF.
    SORT IT_MZLEVELS BY /BIC/ZLEVEL1.
    DELETE ADJACENT DUPLICATES FROM IT_MZLEVELS COMPARING /BIC/ZCLV1GP.
    DELETE IT_MZLEVELS WHERE /BIC/ZLEVEL1 = ''.
    l_s_range-iobjnm = i_iobjnm.
    l_s_range-sign   = 'I'.
    l_s_range-option = 'EQ'.
    LOOP AT IT_MZLEVELS INTO WA_MZLEVELS.
    l_s_range-low    =  WA_MZLEVELS-/BIC/ZLEVEL1.
    APPEND l_s_range TO c_t_range.
    ENDLOOP.
    ENDIF.
    ENDMETHOD.

  • Why in Ai CC 2014, when I use a pathfinder tool on two objects, their anchor points snap slightly off from where they were? I'm looking under all the snap to options under VIEW & cannot find the culprit. Please help!

    Why in Ai CC 2014, when I use a pathfinder tool on two objects, their anchor points snap slightly off from where they were? I'm looking under all the snap to options under VIEW & cannot find the culprit. Please help!

    You're welcome.
    There are a couple of issues connected to it:
    http://www.vektorgarten.de/problems-align-to-pixel-grid.html
    I don't think that list is complete

  • Two Objects

    If I make two objects of the same class like:
    JMenu menu=new JMenu();
    JMenu menu= new JMenu("Menu 1");
    and then did compared them equal to each other, would they be the same object?
    And I'm actually have a program which makes multipe of the same object by calling
    new frames such a
    frame=new JFrame() and I'm wondering would each fram be different if set to .equals()?

    What I was asking b4 if both had the same name and created, would they both be the same object.Well they both can't have the same name. A variable can only point to one object at a time, so I don't understand your question.
    And you need two variables to compare objects. So given that you know if you assign the object to two different variable they will not be equal, I don't understand what you where asking.
    So thats why you create a post a SSCCE. To show code that does what you try to explain in english.
    Shouldn't you be less critical/deamaning and more positve/helpful? You still haven't learned to respond to postings when you receive suggestions as id evidenced by this posting two days ago:
    http://forum.java.sun.com/thread.jspa?threadID=5181968&messageID=9709306#9709306
    I've tried to give you the benefit of the doubt but you still refuse to do even the simplest things that have been asked of you.

  • Crystal Report not Adopting all possible Dropdown Values from BEx Variable

    Hi all,
    I am having an issue in a Crystal report where the drop down parameter that is sourced from a BEx query variable does not include all the possible values in the cube (or in master data). After learning my lesson the first time of not changing the name of the variable or changing it to dynamic (this causes it to break), I had the understanding that the value list may not be complete when running the report in the Crystal client or in the viewer, however, I thought it should be correct when published to the BOE and run in infoview. I am getting the same incomplete list in infoview. I published the report into infoview using the Crystal 2008 desktop client, not the /CRYSTAL/RPTADMIN transaction.
    I know there are a couple ways of sourcing a Crystal report from a BW query - using MDX vs. not, etc. I created this report using the SAP menu > "Create new report from a query". I don't believe Crystal will easily let you use that menu option to create a report off two BW queries joined together (which is what I am doing), so I built it off one originally (using the SAP menu), then added the other later on. I have the checkbox for "Use MDX driver with support for Multiple structures" checked. In database expert, my "Selected Tables" both are of database type "SAP BW Query".
    Do I have the right understanding of how the value list should work when sourced from a BEx variable? If so, can anyone offer any suggestions for getting the value list populated correctly?
    Here's some info:
    Crystal version: CR2008, version 12.2.4.507
    BOE version 3.1
    SAP BW 7.01 EhP 6
    Thanks,
    Chad

    Hi,
    - in the Crystal Reports designer the list of values is not online and there is a maximum number of values - configured by a registry setting:
    (windows 7)
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Business Objects\Suite 12.0\SAP\BWQueryReportWrapper
    Key: MaxPickListSize
    and correct you can not change the name of the variable or set it to dynamic as the definition is based on the BEx query.
    I know there are a couple ways of sourcing a Crystal report from a BW query - using MDX vs. not, etc. I created this report using the SAP menu > "Create new report from a query". I don't believe Crystal will easily let you use that menu option to create a report off two BW queries joined together (which is what I am doing), so I built it off one originally (using the SAP menu), then added the other later on. I have the checkbox for "Use MDX driver with support for Multiple structures" checked. In database expert, my "Selected Tables" both are of database type "SAP BW Query".
    The checkbox on the Multi Structure is not for the option to combine 2 Bex queries - it is for Bex queries with 2 structures and the BW query driver has been deprecated already and you have to use the MDX Driver.
    Do I have the right understanding of how the value list should work when sourced from a BEx variable? If so, can anyone offer any suggestions for getting the value list populated correctly?
    in Crystal Reports Designer the list is static and when you publish the report using the BW Publishing to your SAP BusinessObjects Enterprise system the list becomes dynamic in InfoView.
    regards
    Ingo Hilgefort

  • Cost assignment-Multiple cost objects being selected by default from the EP

    Hi,
    I have created an expense report from the Portal and entered the cost object - a WBS element and saved the report. Now, when I check in table: PTRV_SCOS, it shows me the cost object assigned are - both - the WBS Element as well as the Cost center. This is incorrect as there should be only one cost object - either the cost center or the WBS element. However, when I book the expenses from the backend, it works fine. Only the WBS or cost center is displayed in the table mentioned above. Anyone has any idea as to why this is happening?
    Many thanks in advance for your efforts.
    Cheers guys.
    Hope to hear from you soon
    Best regards,
    Tanmay Dhingra
    Edited by: Tanmay Dhingra on May 17, 2011 10:05 AM

    Hi All,
    First of all, thanks for your responses..
    Right, about the issue, what I explained here was that I am indeed assigning only one cost object: the WBS element. The issue was that even though I am assigning only the WBS element, it was also assigning the cost to the cost center by default. I did some R&D and found the solution to the issue (I was also asked to look for OSS notes but was not satisfied that this issue needs an OSS note to be applied so tried my solution). The issue was in table: T788M (allocate costs to variable account assignment). Here, I created an entry and called it USERGROUP_2 (just a random name) and assigned the variable cost objects (only the WBS and the Cost center) to be displayed. In the next step, I assigned this usergroup to the country in quesion feature (TRVCO). By doing this, I tell the system that only these cost objects are to be considered when an employee wants to assign the cost object. If the system sees that there is no value from the drop down to choose from, it picks up the default cost object (cost center). This was a simple issue that I had to rattle my brains on... but the solution I mention above worked like a hot knife going through butter...
    If you guys face this issue, please try this else feel free to get in touch with me on my number below.
    Once again, thanks for your responses.
    Best regards,
    Tanmay Dhingra
    +91 880 6666 606

  • Where are the BEx variable stored

    Hi All,
    I have couple of doubts. I would appreciate, if some one can through some light on these.
    1. Where does all the BEx variables stored, if they are stored in BW, then in which transparent tables these are stored.
    2. Where does the properties of the BEx InfoObject in the BEX Query are stored, if they are stored in BW, then in which transparent tables these are stored.
    Thanks in advance,
    CK

    Hi Sudheer,
    Are you ready for have some fun?!? 
    With BW Analyzer loaded and one of your BW workbooks open in Excel do the following:
    First, launch the Visual Basic Editor.  You do this either on the Excel Menu Bar (Tools >> Macro >> Visual Basic Editor); or, by pressing Alt + F11.
    Be sure that the Project Explorer Window is visible.  If not, on the VB Editor toolbar select View >> Project Explorer; or, press Ctrl + R.
    Projects are listed alphabetically.  Probably the first object you see in the Project list is SAPBEX(sapbex.xla).  This is the BW Analyzer.  You can't open it, but you can explore it using the VB Editor Object Browser.  More about that later.
    For now, locate your workbook.  It will probably be named VBAProject(name of workbook.xls).  If there is a "+" to the left of the project name, click on the + to expand it.
    You will see at least two types of objects:
    + Microsoft Excel Objects
    + Modules
    Expand them both.
    Among the Microsoft Excel Objects, you will see worksheets, maybe charts, and the object for the workbook itself (ThisWorkbook).
    Each sheet has two names.  The first is the codename.  The second is the name you see on the tabs when you are in Excel.
    Notice that there are two more worksheets here than you see in Excel.  One of these has a "tab name" of SAPBEXqueries; the other is named SAPBEXfilters.
    There is nothing you can do in Excel to make these sheets visible.  They are not ordinary hidden worksheets. 
    There are two ways you can make them visible:
    1.  using the Properties Window
    2.  using Visual Basic code
    If the Properties Window is not visible, on the VB Editor toolbar select View >> Properties Window; or, press F4.  Double-click on the worksheet object to select it.  Then, change the Visible Property to Visible.
    Or, use this line of code (for example):
    Sheets("SAPBEXqueries").Visible = True
    to return it to its original condition, the VBA command is:
    Sheets("SAPBEXqueries").visible = xlSheetVeryHidden
    Now I must tell you that anything you do from this point on is not covered by your warranty.  Don't worry, you can't break BW.  But, you can create a beautiful report that stops working with the next system patch that gets installed.
    Now that you are looking at these sheets, you probably would like to have a guide as to what they contain.  I posted some of that a few months ago.  I can't locate the posting right now.  You can do a search on my name to find it.  Or, if you wait, I'll find it and post the link to this thread.
    But ... there is a better way than reading my old posting.  Try this ... refresh a query in Excel.  Then, come back to the Visual Basic Editor.  Select the BW Analyzer Object ...  SAPBEX(sapbex.xla).  Then, on the VB Editor menu, select Run >> Run Macro (F5); scroll down to sapbexDebugPrint and run that macro.  It will create an amazing workbook that tells you everything you could ever want to know about the query you just refreshed. (Including a complete list of valid OLAP fire commands.)
    By comparing the various worksheets in this amazing workbook with the tables in the very-hidden SAPBEXqueries worksheet, you can learn what just about every one of those tables is all about.
    But ... before you get too carried away with making changes to the values on those sheets ... I have found that I can do almost everything I need to do without ever needing to touch those very-hidden worksheets.
    What I use mostly are the API functions.  Some of these are listed in the BW documentation.  But, there are about as many API functions that are NOT documented.  To find the API functions ... in the VB Editor, select the BW Analyzer object ... SAPBEX(sapbex.xla).  Then, select on the VE Editor menu bar, select View >> Object Browser (F2).  Change the Library to SAPBEX (this does not work unless you have already selected the SAPBEX oject).  In the Classes column, scroll down to xBEXapi.  You will now see listed all of the API functions and subroutines.
    The Object Browser tells you ALMOST everything you need to know.  Most people need a few examples to get them started.  You can look at my postings here to find examples.  Or, just do a search on "SAPBEX".  Almost every hit will lead to a discussion and/or example of these API functions.
    When you have more questions, write back.
    - Pete

  • ICR - Wrong display of assigned documents in Object Groups.

    Hello ICR gurus,
    Hello,
    We are just about to start with UAT and we have found this error which is a major problem for us.
    When we run the automatic assignment step via FBICA3, the system starts assigning documents automatically based on the matching rules that we
    have customized. After this, it starts classifying the matched documents based on the account groups defined in the customizing.
    The problem is, that sometimes one side of the matching falls into one group and the other side of the matching falls into another group and
    then the user cannot see the assigned documents in the same screen.
    We were thinking of using a BADI that gets called after the automatic assignment but we think this is a huge thing to do with a BADI because we would be changing the way the standard fucntionality works with our code.
    Any other ideas?
    Thanks a lot
    Regards
    Isabel

    Hello Isabel,
    Where in your scenario is the problem:
    #1 The object groups are defined incorrectly.
    #2 The data is posted incorrectly.
    If #1 is the case - change the object group definition
    In case of #2 it seems to me that what you want is more transparency where the issue is so the users can make the necessary adjustment postings. It would be good to have a specific scenario here.
    Why did you create the object groups you created? Are these examples you're referring to based on the fact that the invoices were posted incorrectly?
    In FBICR3 you would usually use either just one object group (Open Items) or two object groups (Payables and Receivables). Are GL open items classified as payables or receivables incorrectly when integrating them into process 003?
    Hope this helps. If you need additional answers, please provide more details and specific examples...
    Ralph
    P.S.: Instead of adding these other documents to the object groups where they don't belong you could also add a function which will display the partner documents for the currently displayed "assigned" documents which don't have their partner documents in the display in a popup. That way you're still showing the problem (partner document is not posted correctly) but give them a little more information how to correct it (item should have been posted to account ABC instead of BAC)...

  • Need this explained: Two objects reporting back same values...

    Hello,
    I have a datagrid and a form binded to the selectedItem record of the datagrid.  I need to update the values according to whatever is typed into the form fields.
    I use a CFC to handle the update.  I have a newBean class which holds the new values from the form and also an oldBean object which holds old values to verify I'm updating the correct record.
    In my actionscript I have two objects, newObj and oldObj.  Here is how I set them up in my update function.
    var oldObj:Object = new Object;
    oldObj = dg.selectedItem;
    var newObj:Object = newObject;
    newObj = dg.selectedItem;
    newObj.value1 = field1.text;
    newObj.value2 = field2.text;
    newObj.value3 = field3.text;
    remoteObject.update(oldObj, newObj);
    So, I set the oldObj to the selectedItem and then I set the newObj to that same item, which initially should give them the current values of the selectedItem in the datagrid.  Then I set the values of newObj to match the form fields.  Lastly I have a remoteObject method "update()" send the two objects to the CFC I mentioned above.  When I found out it wasn't updating properly, I set up a cfdump to my email to list the values for both oldObj and newObj.
    Results:
    newObj properly takes all the new values as intended.  oldObj strangely also takes on the new values, yet I never assigned oldObj to accept the new values.  So why is oldObj also accepting the values in the form fields when there's no visible connection between oldObj and any of the fields?

    I don't have an external site I can load this on.  It's a component of an application as well, so I'd have to publish the whole thing.  Instead, I'll just post all relevent code.  Notes: cfc is generated from the ColdFusion wizard.  apptTable is a valueObject that contains the structure of the record data.
    The Remote Object:
        <mx:RemoteObject id="apptRO" endpoint="http://10.118.40.100:85/flex2gateway/"
            destination="ColdFusion" source="cms.cfc.apptTableDAO" showBusyCursor="true" fault="Alert.show(event.fault.faultString, 'Error')">
            <mx:method name="read" result="apptsReceived(event)"/>
            <mx:method name="create" result="apptCreated(event)"/>
            <mx:method name="update" result="apptUpdated(event)"/>
            <mx:method name="deleted" result="apptDeleted(event)"/>
        </mx:RemoteObject>
    The original update function in Flex:
        private var upObj:apptTable;
        private var oldObj:Object;
        private function updateAppt():void{
            oldObj = new Object;
            oldObj = dg.selectedItem;
            upObj = new apptTable;
            upObj = apptTable(dg.selectedItem);
            upObj.clientName = clientNameInput.text;
            upObj.topic = topicInput.text;
            upObj.info = infoInput.text;
            upObj.apptDate = dateInput.text;
            upObj.apptTime = timeInput.text + ' ' + ampmCbx.value.toString();
            apptRO.update(oldObj,upObj);
    The UPDATE function in the CFC:
        <cffunction name="update" output="false" access="public">
            <cfargument name="oldBean" required="true" type="cms.cfc.apptTable">
            <cfargument name="newBean" required="true" type="cms.cfc.apptTable">
            <cfset var qUpdate="">
            <cfquery name="qUpdate" datasource="cmsdb" result="status">
                update dbo.apptTable
                set clientName = <cfqueryparam value="#arguments.newBean.getclientName()#" cfsqltype="CF_SQL_VARCHAR" />,
                    topic = <cfqueryparam value="#arguments.newBean.gettopic()#" cfsqltype="CF_SQL_VARCHAR" />,
                    info = <cfqueryparam value="#arguments.newBean.getinfo()#" cfsqltype="CF_SQL_VARCHAR" />,
                    dateSubmitted = <cfqueryparam value="#arguments.newBean.getdateSubmitted()#" cfsqltype="CF_SQL_VARCHAR" />,
                    apptDate = <cfqueryparam value="#arguments.newBean.getapptDate()#" cfsqltype="CF_SQL_VARCHAR" />,
                    apptTime = <cfqueryparam value="#arguments.newBean.getapptTime()#" cfsqltype="CF_SQL_VARCHAR" />,
                    userID = <cfqueryparam value="#arguments.newBean.getuserID()#" cfsqltype="CF_SQL_BIGINT" null="#iif((arguments.newBean.getuserID() eq ""), de("yes"), de("no"))#" />,
                    userName = <cfqueryparam value="#arguments.newBean.getuserName()#" cfsqltype="CF_SQL_VARCHAR" />
                where apptID = <cfqueryparam value="#arguments.oldBean.getapptID()#" cfsqltype="CF_SQL_BIGINT" />
                  and clientName = <cfqueryparam value="#arguments.oldBean.getclientName()#" cfsqltype="CF_SQL_VARCHAR" />
                  and topic = <cfqueryparam value="#arguments.oldBean.gettopic()#" cfsqltype="CF_SQL_VARCHAR" />
                  and info = <cfqueryparam value="#arguments.oldBean.getinfo()#" cfsqltype="CF_SQL_VARCHAR" />
                  and dateSubmitted = <cfqueryparam value="#arguments.oldBean.getdateSubmitted()#" cfsqltype="CF_SQL_VARCHAR" />
                  and apptDate = <cfqueryparam value="#arguments.oldBean.getapptDate()#" cfsqltype="CF_SQL_VARCHAR" />
                  and apptTime = <cfqueryparam value="#arguments.oldBean.getapptTime()#" cfsqltype="CF_SQL_VARCHAR" />
                  and userID = <cfqueryparam value="#arguments.oldBean.getuserID()#" cfsqltype="CF_SQL_BIGINT" />
                  and userName = <cfqueryparam value="#arguments.oldBean.getuserName()#" cfsqltype="CF_SQL_VARCHAR" />
            </cfquery>
            <!--- if we didn't affect a single record, the update failed --->
            <cfquery name="qUpdateResult" datasource="cmsdb"  result="status">
                select apptID
                from dbo.apptTable
                where apptID = <cfqueryparam value="#arguments.newBean.getapptID()#" cfsqltype="CF_SQL_BIGINT" />
                  and clientName = <cfqueryparam value="#arguments.newBean.getclientName()#" cfsqltype="CF_SQL_VARCHAR" />
                  and topic = <cfqueryparam value="#arguments.newBean.gettopic()#" cfsqltype="CF_SQL_VARCHAR" />
                  and info = <cfqueryparam value="#arguments.newBean.getinfo()#" cfsqltype="CF_SQL_VARCHAR" />
                  and dateSubmitted = <cfqueryparam value="#arguments.newBean.getdateSubmitted()#" cfsqltype="CF_SQL_VARCHAR" />
                  and apptDate = <cfqueryparam value="#arguments.newBean.getapptDate()#" cfsqltype="CF_SQL_VARCHAR" />
                  and apptTime = <cfqueryparam value="#arguments.newBean.getapptTime()#" cfsqltype="CF_SQL_VARCHAR" />
                  and userID = <cfqueryparam value="#arguments.newBean.getuserID()#" cfsqltype="CF_SQL_BIGINT" />
                  and userName = <cfqueryparam value="#arguments.newBean.getuserName()#" cfsqltype="CF_SQL_VARCHAR" />
            </cfquery>
            <cfif status.recordcount EQ 0>
                <cfthrow type="conflict" message="Unable to update record">
            </cfif>
            <cfreturn arguments.newBean />
        </cffunction>
    If you look at the update code from the CFC, you can see all my table columns, some of which are not present in my form fields because they should never change.
    Fields in form: clientNameInput, topicInput, infoInput, dateInput, timeInput, and a combo box for am/pm.
    Columns not in form: apptID, dateSubmitted, userID, userName
    Working code:
    private function updateAppt():void{
            oldObj = new Object;
            oldObj = dg.selectedItem;
            upObj = new apptTable;
            upObj.apptID = dg.selectedItem.apptID;
            upObj.clientName = clientNameInput.text;
            upObj.topic = topicInput.text;
            upObj.info = infoInput.text;
            upObj.dateSubmitted = dg.selectedItem.dateSubmitted;
            upObj.apptDate = dateInput.text;
            upObj.apptTime = timeInput.text + ' ' + ampmCbx.value.toString();
            upObj.userID = dg.selectedItem.userID;
            upObj.userName = dg.selectedItem.userName;
            apptRO.update(oldObj,upObj);
    This code does not set upObj to the selectedItem record of the dg.  Instead it just accepts the values of the form fields and any values in the datagrid that do not change.

  • Showin a variable description  for an info-object depending on a user login

    Hi,
    Client requirement is to show a variable description  for an info-object depending on a user login.
    e.g. a Characteristic Name is Level1 with a description as 'Level1'. If a user in Canada logs in and see a BEx report he should be able to see the description for infoobject Level1 as 'Cost center'.  A user in US may wish to see the description as 'Expense center'  etc. etc.
    Is it possible to do so ? If yes please let me know ASAP.
    Do not get confused with language dependant texts.
    Regards,
    K.Manikandan.

    Hi,
    I don't think it is possible through standard functionality, but maybe you could try a workaround.
    Create a Characteristic (say COMP) with text, and compound it with Infoobject Level1. The values and description for COMP could be
    US Cost Center
    CN Expense Center
    You could make COMP an Authorisation relevant object and check the same with regard to user login, so that the people of sepecific country see only description relevant to their COMP.
    In the report Display COMP as Description and Level1 as Key.
    But do not that compounding may have an impact on the performance, also look into the implications of the same if you need to do it for a large number of reports/objects.
    Hope it helps.
    Cheers
    Anurag
    ......don't forget to assign points if it helps......

  • Swap two objects method

    Hi,
    I got this code from the forum that can swap two objects. Can anyone explain the code to me? Thanks.
    public static Object swap(Object o1,Object o2){
    return o1;
    o2=swap(o1,o1=o2);
    It looks like o2=swap(o1,o1=o2) is passing o1 object and o2 object, the method create new reference for o1 and o2, return the o1 object and assign the reference to o2. Now o2 is o1 but how about o1?

    Don't touch that code, it's rubbish. The method claims to "swap" two objects, but it doesn't actually do that unless you call it in precisely that tricky and confusing way.
    Anyway, "swap two objects" is not a good way to ask the question because it confuses objects with the variables that refer to them. If you want to change two variables so that they each end up referring to the object originally referred to by the other, just write this:Object temp = o1;
    o1=o2;
    o2=temp;You can't do it with a method.

  • Swap two objects

    Can anyone please explain to me why the following code does not swap two objects?
    public void swap(Object a, Object b) {
    Object temp = a;
    a = b;
    b = temp;
    I know when you do a=b, it means assigning the b reference to a. So this piece of code should work. First assign the a reference to temp, then assign b referene to a and assign temp to b. So now a has b's reference and b has a's reference. So why is this wrong? Thanks.

    Simply because all parameters are passed by
    value, not by reference.right, to further clarify, all object parameters are references. So when you pass references by value, you make a copy of it and send it to the method. Therefore, changing what the reference points to has no effect outside of the method.

  • BEx Variable Key/Name swap when used as Prompt in WebI report

    Hi,
    We are using Bex Variables in a Query used as a base for a BOBJ Universe and Query.
    When refreshing the report the Prompt box displays the Name and Key of the infoobject (Dimension), but when selecting one of those values - moving it to the right, it brings across the Name not Key.
    Our requirement is that the Key is selected value rather than the name - is this possible? And if so how?
    Netweaver 2004S & Business Objects XI 3.0.
    Regards,
    Laurence

    Ingo,
    Thanks, I understand this in the background the Key is used, but is there any way to "swap" the Key and Name in the Prompt box, specifically my users want the Key to display in the right hand side of the Prompt bax when selecting, (or in the dropdown box, in the Prompt tab in WebI)
    Best Regards,
    Laurence

  • XI 3.0 Open Document and BEx variables (prompts)

    Can open document in Web Intelligence 3.0  be used to pass values to BEx variable/prompt (where the BEx variable is part of a query which populates the universe)?
    Thanks

    We were actually able to get this to work, but the we have discovered we cannot pass values that have two words.
    For example, the value "Batteries" is accepted successfully.  But the value "Fuel and Gases" is not passed successfully. 
    Here is the open document syntax (as generated by the wizard):
    ="< a href=\"https://stld9862.hydroone.com:8081/OpenDocument/opendoc/openDocument.jsp?iDocID=M0jqGzEABdqBABTwlgAAQ.IAAo4KDH8AAAA&sIDType=CUID&sType=wid&sRefresh=Y&lsMMaterial%20Group%20Mandatory="URLEncode(""URLEncode([L01 Material Group]))"&sWindow=New\" title=\"\" target=\"_self\" nav=\"doc\">"[L01 Material Group]+"</ a>"
    Please note, I changed the tags <a to < a so to keep the formula in BOBJ syntax.
    Edited by: Steve Bickerton on Oct 7, 2008 3:13 PM
    Edited by: Steve Bickerton on Oct 7, 2008 3:14 PM

  • Two objects from one table

    My current setup is two tables and two objects with a one to one relationship between them, Object and ObjectMD (metadata).
    Not sure why my predecessors set it up like this but...that's how it is.
    The problem is that my Object table (and thus ObjectMD also) has reached 40 million rows and large joins between Object and ObjectMD are taking forever and are completely unnecessary.
    I want to import the ObjectMD data into the Object table and go forward with a single table. The problem is that the ObjectMD table has it's own java surrounding it and that code is used in way too many places to weed it out. I need to leave the Java object structure in place.
    I think I should be able to create both these objects from a single table, but I can not figure out the descriptor. My set method needs to be getMetaData().setMethod, but of course TL's reflection doesn't like this. I suppose I could create new methods in Object to get/set all these fields and just forward them to the real methods.
    How can I define descriptors to create two objects from a single table?

    What I decided on for my last problem was to use a method to setBar, and inside that method, set the Foo of the Bar.
    Here are my files for future reference:
    --------------------------------------Foo.java-------------------------------------
    public class Foo {
         public int id;
         public String first;
         public Bar bar;
         public void setBar(Bar newBar){
              if(newBar != null){
                   newBar.foo = this;
              this.bar = newBar;
    --------------------------------------Bar.java-------------------------------------
    public class Bar {
         public Foo foo;
         public String second;
    --------------------------------------Descriptors.java-------------------------------------
    public class Descriptors {
         public static void addDescriptors(Project project) {
    project.addDescriptor(Descriptors.buildFooDescriptor());
    project.addDescriptor(Descriptors.buildBarDescriptor());
    private static Descriptor buildFooDescriptor() {
    Descriptor descriptor = new Descriptor();
    //     basic information
    descriptor.setJavaClass(Foo.class);
    descriptor.addTableName("FOO");
    descriptor.setPrimaryKeyFieldName("ID");
    //     mappings
    DirectToFieldMapping directToFieldMapping;
    AggregateObjectMapping aggregateObjectMapping;
    //     id mapping
    directToFieldMapping = new DirectToFieldMapping();
    directToFieldMapping.setAttributeName("id");
    directToFieldMapping.setFieldName("ID");
    descriptor.addMapping(directToFieldMapping);
    //     first mapping
    directToFieldMapping = new DirectToFieldMapping();
    directToFieldMapping.setAttributeName("first");
    directToFieldMapping.setFieldName("FIRST");
    descriptor.addMapping(directToFieldMapping);
    //     bar mapping
    aggregateObjectMapping = new AggregateObjectMapping();
    aggregateObjectMapping.setAttributeName("bar");
    aggregateObjectMapping.setReferenceClass(Bar.class);
    aggregateObjectMapping.setSetMethodName("setBar");
    aggregateObjectMapping.dontAllowNull();
    descriptor.addMapping(aggregateObjectMapping);
    return descriptor;
    private static Descriptor buildBarDescriptor() {
    Descriptor descriptor = new Descriptor();
    // basic information
    descriptor.descriptorIsAggregate();
    descriptor.setJavaClass(Bar.class);
    //     mappings
    DirectToFieldMapping directToFieldMapping;
    //     second mapping
    directToFieldMapping = new DirectToFieldMapping();
    directToFieldMapping.setAttributeName("second");
    directToFieldMapping.setFieldName("SECOND");
    descriptor.addMapping(directToFieldMapping);
    return descriptor;
    ----------------------------------------Go.java------------------------------------
    public class Go {
         public static void main(String[] args) {
              if(args.length != 0){
                   throw new RuntimeException("Arguments are not supported");
              Project project = new Project();
              project.setName("fooBarProject");
              DatabaseLogin login = new DatabaseLogin();
         login.usePlatform(new Oracle9Platform());
         login.setDriverClassName("oracle.jdbc.driver.OracleDriver");
         login.setConnectionString("jdbc:oracle:thin:@nnn.nnn.nnn.nnn:nnnn:SERVICE");
         project.setDatasourceLogin(login);
         Descriptors.addDescriptors(project);
         Server server = project.createServerSession(2, 2);
         server.setLogLevel(oracle.toplink.sessions.SessionLog.FINE);
         server.login("schema", "password");
         Session session = server.acquireClientSession();
         UnitOfWork uow = session.acquireUnitOfWork();
         Foo fooBar = (Foo) uow.newInstance(Foo.class);
         fooBar.id = (int) (Math.random() * 10000);
         fooBar.first = "abcd";
         uow.commit();
         ExpressionBuilder builder = new ExpressionBuilder();
         Foo fooBarLoad = (Foo) session.readObject(Foo.class, builder.get("id").equal(fooBar.id));
         System.out.println("ID:" + fooBarLoad.id + " FIRST:" + fooBarLoad.first + " SECOND:" + fooBarLoad.bar.second );
         session.release();
         server.logout();
    ------------------------------------------------------------------------------------------

Maybe you are looking for

  • Connecting IMAC OSX 3.9  to IMAC OS 8.6

    I have tried to connect these two computers via an ethernet connection and following the "file sharing" steps. In my Connect To Server dialog box, the old IMAC does not show up. I've also typed in the IP address of the old computer and it does not re

  • IT Manager wants to quit getting phone calls about upgrading to Reader X

    Hi all, I searched and couldn't find this answer.  I have 100 users using Adobe Acrobat 9 Reader. I do want my users to get and install Adobe updates for obvious security reasons. I do not want them to upgrade to X for various compatibility concerns.

  • I am in sql plus how do I find out what database I am in?

    I am in sql plus how do I find out what database I am in? is there a sql command for that...

  • Problem PDFMaker(acrobatXI) / MSWord2010

    Hello, i have a Word file invoice to email to clients as a PDF attachement. My clients emails are in an Excel file. After my file is done in MSword 2010 i click on "send as PDF attachement" and it normally opens a box where i have fill in the name of

  • Best way to obtain records that are NOT in another table

    I have two rather large tables in oracle. An Account table that has millions of rows. Each account may be enrolled into a particular program and therefore can also be in an Enrollment table, also with millions of rows. I'm trying to find the most opt