Generated webservices give null result in Flex 3

Hi there,  I have a web service on my localhost. Calling this from a PHP page works fine and it returns the expected results. (I pass 2 values and it returns a different string depending on the values passed).
However, in Flex 3, I have generated the webservice proxy classes using the "Data" | "Manage Web Services" dialog.  I am consuming these services using the following code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
     <mx:Button click="clickHandler(event)"/>
     <mx:Script>
          <![CDATA[
               import generated.webservices.*;
               import mx.controls.Alert;
               import mx.rpc.events.FaultEvent;
               public var _ws:SalesService = new SalesService();
               private function clickHandler(_e:MouseEvent):void
                    _ws.addonsaleEventListener(resultHandler);
                    _ws.addSalesServiceFaultEventListener(faultHandler);
                    _ws.onsale(10,90);
               public function resultHandler(_e:OnsaleResultEvent):void
                    if(_e.result == null)
                         Alert.show("result is: null");
                    else
                         Alert.show("result is: "+_e.result);
               public function faultHandler(_e:FaultEvent):void
                    Alert.show(_e.message.toString());
          ]]>
     </mx:Script>
</mx:Application>
The "resultHandler" method is called and the "faultHandler" method is not called, which suggests a result is returned, but _e.result is null in the "resultHandler" method.
Can anyone see if I am missing something in the actionscript?
Andrew.
p.s.
I can post the generated proxy classes, or even the wsdl for the webservice if it helps.
A.

No, they're not exactly the same (see below).
Calling the same web service; Flex 3 is generating a
different result object than Flex 2, and therefore can/will not
type the results as the Array my original app had come to expect.
Is this by design?
A suggested code revision would help, but...
The question in my
original post is still in play:
Where would I have gone to learn this? The release notes are
simply a cut list of changes. Is there a resource which summarizes
the types of errors one is likely to see when porting a Flex 2 app
to Flex 3, along with the most-likely changes as causes? When CFMX
was first released, there was a helpful checklist of tags and
syntax to help you audit your CF5 for the upgrade. Has one of your
gurus blogged something like this for FX3 and I just can't find it?

Similar Messages

  • SUM function to give NULL result

    I am really lost on how I can force the SUM function to give me a NULL result when at least one of the elements is a NULL value. I would appreciate any help.

    The short answer is "you can't". The slightly longer answer is the you can't because most aggregate functions work only on non-null values, so SUM silently ignores NULLS.
    However, you can take advantage of that fact to do what you want.
    SQL> SELECT * FROM t;
            ID GROUPCOL
            33 GROUPA
            50 GROUPA
             5 GROUPA
            21 GROUPA
            43 GROUPA
            58 GROUPB
            10 GROUPB
            29 GROUPB
            10 GROUPB
            37 GROUPB
               GROUPA
    SQL> SELECT groupcol, SUM(id) sum_id, COUNT(*) count_all,
      2               COUNT(id) count_id
      3        FROM t
      4        GROUP BY groupcol;
    GROUPCOL       SUM_ID  COUNT_ALL   COUNT_ID
    GROUPA            152          6          5
    GROUPB            144          5          5Note that count_all is different than count_id. So, we can wrap this query in another to return NULL for the sum of groupa.
    SQL> SELECT groupcol, CASE WHEN count_all = count_id THEN sum_id
      2                        ELSE NULL END sum_id
      3  FROM (SELECT groupcol, SUM(id) sum_id, COUNT(*) count_all,
      4               COUNT(id) count_id
      5        FROM t
      6        GROUP BY groupcol);
    GROUPCOL       SUM_ID
    GROUPA
    GROUPB            144Although, I too would be interested in the answer to 405764's question.
    John

  • Webservice returns null values (Flex)

    Hi all,
    I created a webservice in abap,
    (a RFC and a Function Web Service).
    It exports a table type and contains data from a Ztable.
    When i request it from Flex, it returns rows, but they contain NULL values, why ?
    I can request and display bapi webservices that comes with in SapNetweaver trial 7.1 but i cant display my own webservice.
    Result like this;
    result     generated.webservices.ZCUSTOMERS_TT (@2205981)     
         [inherited]     
         [0]     generated.webservices.ZCUSTOMERS (@2362c91)     
              CLIENT     null     
              ID     null     
              NAME     null     
         [1]     generated.webservices.ZCUSTOMERS (@23a4129)     
         [2]     generated.webservices.ZCUSTOMERS (@23a42e1)     
         [3]     generated.webservices.ZCUSTOMERS (@23a41c9)     
    it is true that there are 4 rows in table, but all client, id and name is null
    why ?

    thanks for answer but my problem didint solved.
    My webservice can return normal values like integer or decimal and i can read it from flex.
    but when i try to view tables, i always get null values BUT item count is true :=) i have 4 item in z table and 4 rows returns in array from webservice but NULL values :=).
    I can't return structure as well.
    result     mx.utils.ObjectProxy (@211af29)     
         DEGER     1     
         GS_CUSTOMER     generated.webservices.ZCUSTOMERS (@22ce719)     
              CLIENT     null     
              ID     null     
              NAME     null     
         GT_CUSTOMER     mx.collections.ArrayCollection (@210cd01)     
              [inherited]     
              [0]     generated.webservices.ZCUSTOMERS (@22cef61)     
                   CLIENT     null     
                   ID     null     
                   NAME     null     
              [1]     generated.webservices.ZCUSTOMERS (@22ced31)     
              [2]     generated.webservices.ZCUSTOMERS (@22cedd1)     
              [3]     generated.webservices.ZCUSTOMERS (@22cea11)     
              source     Array (@22687e9)     
         object     Object (@22ce8a9)     
         type     null     
         uid     "723117ED-66EC-C93B-9E66-C0FD4F01246C"     
         ZCUSTOMER_TT     generated.webservices.ZCUSTOMERS_TT (@22eb941)     
    What do you use, when declaring variables ?
    Like or type or ref to ? Can it be a problem ?
    here is my function export inteface.
    http://img241.imageshack.us/img241/9258/screenhunter01jun082052.gif
    Edited by: bilen cekic on Jun 8, 2009 8:26 PM

  • Flex 4.5.1 Setting VideoPlayer source to null when it is already null results in a runtime error

    I moved my project from Flex 4.1 to Flex 4.5.1 and I noticed that setting VideoPlayer source to null when it is already null results in a runtime error. The same thing applies to the case where you specified as a source url some invalid location (no video found there) and then you try to set the source to null.
    Here is the error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at spark.components::VideoDisplay/cleanUpSource()[E:\dev\4.5.1\frameworks\projects\spark\src \spark\components\VideoDisplay.as:1956]
        at spark.components::VideoDisplay/setUpSource()[E:\dev\4.5.1\frameworks\projects\spark\src\s park\components\VideoDisplay.as:1609]
        at spark.components::VideoDisplay/set source()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\VideoDisplay.as:1073 ]
        at spark.components::VideoPlayer/set source()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\VideoPlayer.as:1362]
    The problem is that in the VideoDisplay cleanUpSource function, in some of the cases there properties on the videoObject are modified like this:
    videoPlayer.displayObject.visible = true;
    without checking if displayObject is null which is done in the rest of the videoDisplay functions.
    So when it reaches this line: videoPlayer.displayObject.visible = true; it results in a runtime error.
    Is this supposed to work this way now ? I didn't have this problem on Flex 4.1. Not sure if it is a bug, but if it is please report it, I don't have the time right now to be checking in on this.
    I fixed it by checking if the source is set, of course... (that won't help me in cases where I provide a wrong or missing video url by mistake.. so it is important to be fixed!)
    F

    Hi
    I found the same error displaying video on flex !
    in my simple code, i have :
    videoInfoDataVideo.source = videoName;
    the full error is :
    TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
              at spark.components::VideoDisplay/cleanUpSource()[E:\dev\4.5.1\frameworks\projects\spark\src \spark\components\VideoDisplay.as:1956]
              at spark.components::VideoDisplay/setUpSource()[E:\dev\4.5.1\frameworks\projects\spark\src\s park\components\VideoDisplay.as:1609]
              at spark.components::VideoDisplay/set source()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\VideoDisplay.as:1073 ]
              at spark.components::VideoPlayer/set source()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\VideoPlayer.as:1362]
              at Function/item/private:updateVideo/anonymous/resultGetVideo()[C:\Users\randev\Adobe Flash Builder 4.5\visurbaCMS\src\item.mxml:800]
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\http\HTTPService.as:993]
              at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:318]
              at mx.rpc::Responder/result()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\Responder.as:5 6]
              at mx.rpc::AsyncRequest/acknowledge()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AsyncR equest.as:84]
              at DirectHTTPMessageResponder/completeHandler()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\ messaging\channels\DirectHTTPChannel.as:451]
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flash.net::URLLoader/onComplete()
    did you solve the problem or someone else?
    Thanks

  • JDev generated webservices encodes XML output from PL/SQL procedure

    I have a PL/SQL packaged procedure which takes some input parameters and produces one output parameter. The output parameter is of type CLOB and after the procedure has run, it contains a big piece of XML data.
    Using JDeveloper 10.1.3.1, I've published this packaged procedure as a webservice. The generated webservice is fine and works, except for one tiny little issue: the XML that is taken from the output parameter is encoded.
    Here is an example of the SOAP message that the webservice returns:
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="http://gbv0300u/GBV0300U.wsdl/types/"><env:Body><ns0:gbv0300uResponse
    Element><ns0:result><ns0:obvglijstOut> & gt;type>GBV0001& gt ;/type& lt;
    & gt;diensten& lt;
    & gt;dienst>some value& gt;/dienst& lt;
    & gt;/diensten& lt;
    </ns0:obvglijstOut></ns0:result></ns0:gbv0300uResponseElement></env:Body></env:Envelope>
    (I've manually added an extra space between the & and lt; or gt; to make sure a browser will not translate it into a < or >!)
    The contents of the <ns0:obvglijstOut> element are filled with the output parameter from the PL/SQL package.
    How can I change the generated webservice, so the output from the PL/SQL package is used as is instead of being encoded?

    Update: I've tested a bit more by adding some output statements to the java code that JDeveloper generated. I'm now 100% sure the PL/SQL code gives the XML data correctly to the webservice.
    At this moment my guess is that somewhere in the WSDL definition there is something that enables the encoding of the data. But I'm not sure.
    Any help is greatly appreciated.

  • How to iterate the webservice Data control result set?

    Hi all,
    How to iterate the webservice Data control result set? I have an jsff page where I am displaying the single UserDetails by webservice DataContol. As per my design requirement I should iterate the DataControl resultSet to get the user details and push the same in to Managed bean. Please help me how to do this, any sample code please to iterate the resultset and get the data from it.
       <?xml version='1.0' encoding='UTF-8'?>
       <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:c="http://java.sun.com/jsp/jstl/core">
       <c:set var="uiBundle" value="#{adfBundle['edu.syr.oim.uiBundle']}"/>
       <af:pageTemplate viewId="/templates/jsffTemplate.jspx">
        <f:facet name="fTop"/>
        <f:facet name="fCenter">
          <af:panelGroupLayout layout="scroll" inlineStyle="width:100.0%;">
       <af:panelTabbed id="pt1">
        <af:showDetailItem text="#{uiBundle.PRIVACYFLAGS}" id="sdi4">
                <af:panelGroupLayout id="pgl4" layout="scroll">
                  <af:spacer width="10" height="10" id="s3"/>
                  <af:panelFormLayout id="pfl6">
                    <af:panelLabelAndMessage label="#{uiBundle.STUDENTEMAIL}"
                                             id="plam35">
                      <af:outputText value="#{bindings.stuEmail.inputValue}"
                                     id="ot42"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.STUDENTHOMEADDRESS}"
                                             id="plam39">
                      <af:outputText value="#{bindings.stuPermAddr.inputValue}"
                                     id="ot35"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.STUDENTHOMEPHONE}"
                                             id="plam40">
                      <af:outputText value="#{bindings.stuPermPhn.inputValue}"
                                     id="ot37"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.STUDENTCURRENTPHONE}"
                                             id="plam42">
                      <af:outputText value="#{bindings.stuCurrAddr.inputValue}"
                                     id="ot40"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.STUDENTCURRENTPHONE}"
                                             id="plam36">
                      <af:outputText value="#{bindings.stuCurrPhn.inputValue}"
                                     id="ot38"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.STUDENTACAINFO}"
                                             id="plam41">
                      <af:outputText value="#{bindings.stuAcad.inputValue}"
                                     id="ot36"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.EMPHOMEADDRESS}"
                                             id="plam38">
                      <af:outputText value="#{bindings.empPermAddr.inputValue}"
                                     id="ot39"/>
                    </af:panelLabelAndMessage>
                    <af:panelLabelAndMessage label="#{uiBundle.EMPHOMEPHONE}"
                                             id="plam37">
                      <af:outputText value="#{bindings.empPermPhn.inputValue}"
                                     id="ot41"/>
                    </af:panelLabelAndMessage>
                  </af:panelFormLayout>
                </af:panelGroupLayout>
              </af:showDetailItem>
       </af:panelTabbed> Above is my jsff code. Here how/where to add the phase listener to paopulate the managed bean while page render. Do I need to iterate the DC to get and push the each parameter in to ManagedBean or is there any easy way to do this by EL mapping directly at jsff. Please clarify.
    Thanks
    kln

    That is what exactly I am trying right now. I am binding each of my page fragment outputText item in to backing bean and by that way trying to populate the values.
    But the issue here is, the backing bean method doesn't getting any value until I hit any of the link or the button in the fragment. While loading the page the bean set and get is null. If i hit any link or button it is filled up with the vaule. As per my design, I would like to populate the bean method along with page load before any user action. But cant able to do this!! :(
    Below is my sample code what I am trying right now
            <af:panelLabelAndMessage label="#{uiBundle.NETID}" id="plam13">
                      <af:outputText value="#{bindings.netid.inputValue}" id="ot4" binding="#{UserDataBean.netId}"/>
           </af:panelLabelAndMessage>
    backing bean ex:
    private RichOutputText netId;
    static String netidVal;
        public void setNetId(RichOutputText netId) {
           netidVal= netId.getValue() == null? "":netId.getValue().toString();
           this.netId = netId;
        public RichOutputText getNetId() {
           return netId;
        public String getNetIdVal() {
           return netidVal;
        }Thanks
    kln

  • Non-local searches return "null" results

    I'm creating a Merged help output using AIR Browser Based Help. Said output currently has one major flaw: null search results when viewed over a network.
    Now, I have read through the thread on this forum about people who initially got a "null" search result when searching a local project, but with the search subsequently working, and indeed that behavior is what I was initially seeing. That is, on my local copy of the project, my first search would return "null," and then things would work normally. However, when other users accessed my local project over our network, they never got anything other than "null" results. (Quick aside for relevant information: output was from 64-bit RH9, testing is on FIrefox 13 and I.E. 9) If I move my local copy onto the network, I am no longer successful in searching.
    I have performed the suggested fix on the whfhost.js file, and while it fixed the problem locally-- I no longer see "null" results-- the problem persists for non-local access. Does anyone have any suggestions on how to fix this?
    Thanks!

    For the benefit of anyone else, this is the solution that was provided by Adobe.
    Open the generated output folder and open whfhost.js file in the notepad application. Search for the following strings in the file. you need to replace this function
    function Query()
      gbAIRSearchString  = goOdinHunter.strQuery;
    g_CurPage = 1;
    context = new HuginContext();
      context.reset();
    context.push( goOdinHunter.query, goOdinHunter,
      processHunterResult, null );
      context.resume();
    With this new function
    function isValidType(obj)
    return ( (typeof(obj)!='undefined')&&(obj!=null) );
    function Query()
      gbAIRSearchString  = goOdinHunter.strQuery;
    g_CurPage = 1;
    if (isValidType(context) && isValidType(context.aTasks))
      while(context.aTasks.length>0)
      context.resume();
    context = new HuginContext();
      context.reset();
    context.push( goOdinHunter.query, goOdinHunter,
      processHunterResult, null );
      context.resume();
    And try running the output and see if you stilll face the null search result problem
    If this problem is fixed, then you can go to the C:\Program Files\Adobe\Adobe RoboHelp 8\RoboHTML\WebHelp5Ext\template_stock folder location, and make the similar changes in the whfhost.js file located in this folder.
    It has worked for others so I would first check carefully that you have made the modification correctly.
    If you reverse the change, are you back to square one and get a null result first time?
    The modification was for RoboHelp 8 or 9. You haven't said what version you are using.
    Does it fail with all browsers?
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Select for update gives wrong results. Is it a bug?

    Hi,
    Select for update gives wrong results. Is it a bug?
    CREATE TABLE TaxIds
    TaxId NUMBER(6) NOT NULL,
    LocationId NUMBER(3) NOT NULL,
    Status NUMBER(1)
    PARTITION BY LIST (LocationId)
    PARTITION P111 VALUES (111),
    PARTITION P222 VALUES (222),
    PARTITION P333 VALUES (333)
    ALTER TABLE TaxIds ADD ( CONSTRAINT PK_TaxIds PRIMARY KEY (TaxId));
    CREATE INDEX NI_TaxIdsStatus ON TaxIds ( NVL(Status,0) ) LOCAL;
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100101, 111, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100102, 111, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100103, 111, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100104, 111, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200101, 222, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200102, 222, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200103, 222, NULL);
    --Session_1 return TAXID=100101
    select TAXID from TAXIDS where LOCATIONID=111 and NVL(STATUS,0)=0 AND rownum=1 for update
    --Session_2 waits commit
    select TAXID from TAXIDS where LOCATIONID=111 and NVL(STATUS,0)=0 AND rownum=1 for update
    --Session_1
    update TAXIDS set STATUS=1 Where TaxId=100101;
    commit;
    --Session_2 return 100101 opps!?
    --Session_1 return TAXID=100102
    select TAXID, STATUS from TAXIDS where LOCATIONID=111 and NVL(STATUS,0)=0 AND rownum=1 for update
    --Session_2 waits commit
    select TAXID, STATUS from TAXIDS where LOCATIONID=111 and NVL(STATUS,0)=0 AND rownum=1 for update
    --Session_1
    update TAXIDS set STATUS=1 Where TaxId=100102;
    commit;
    --Session_2 return 100103                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    This is a bug. Got to be a bug.
    This should be nothing to do with indeterminate results from ROWNUM, and nothing to do with read consistency at the point of statement start time in session2., surely.
    Session 2 should never return 100101 once the lock from session 1 is released.
    The SELECT FOR UPDATE should restart and 100101 should not be selected as it does not meet the criteria of the select.
    A statement restart should ensure this.
    A number of demos highlight this.
    Firstly, recall the original observation in the original test case.
    Setup
    SQL> DROP TABLE taxids;
    Table dropped.
    SQL> 
    SQL> CREATE TABLE TaxIds
      2  (TaxId NUMBER(6) NOT NULL,
      3   LocationId NUMBER(3) NOT NULL,
      4   Status NUMBER(1))
      5  PARTITION BY LIST (LocationId)
      6  (PARTITION P111 VALUES (111),
      7   PARTITION P222 VALUES (222),
      8   PARTITION P333 VALUES (333));
    Table created.
    SQL>
    SQL> ALTER TABLE TaxIds ADD ( CONSTRAINT PK_TaxIds PRIMARY KEY (TaxId));
    Table altered.
    SQL>
    SQL> CREATE INDEX NI_TaxIdsStatus ON TaxIds ( NVL(Status,0) ) LOCAL;
    Index created.
    SQL>
    SQL>
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100101, 111, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100102, 111, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100103, 111, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100104, 111, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200101, 222, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200102, 222, NULL);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> Original observation:
    Session1>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    ROWNUM        = 1
      6  FOR UPDATE;
         TAXID
        100101
    Session1>
    --> Session 2 with same statement hangs until
    Session1>BEGIN
      2   UPDATE taxids SET status=1 WHERE taxid=100101;
      3   COMMIT;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    Session1>
    --> At which point, Session 2 returns
    Session2>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    ROWNUM        = 1
      6  FOR UPDATE;
         TAXID
        100101
    Session2>There's no way that session 2 should have returned 100101. That is the point of FOR UPDATE. It completely reintroduces the lost UPDATE scenario.
    Secondly, what happens if we drop the index.
    Let's reset the data and drop the index:
    Session1>UPDATE taxids SET status=0 where taxid=100101;
    1 row updated.
    Session1>commit;
    Commit complete.
    Session1>drop index NI_TaxIdsStatus;
    Index dropped.
    Session1>Then try again:
    Session1>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    ROWNUM        = 1
      6  FOR UPDATE;
         TAXID
        100101
    Session1>
    --> Session 2 hangs again until
    Session1>BEGIN
      2   UPDATE taxids SET status=1 WHERE taxid=100101;
      3   COMMIT;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    Session1>
    --> At which point in session 2:
    Session2>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    ROWNUM        = 1
      6  FOR UPDATE;
         TAXID
        100102
    Session2>Proves nothing, Non-deterministic ROWNUM you say.
    Then let's reset, recreate the index and explicity ask then for row 100101.
    It should give the same result as the ROWNUM query without any doubts over the ROWNUM, etc.
    If the original behaviour was correct, session 2 should also be able to get 100101:
    Session1>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    taxid         = 100101
      6  FOR UPDATE;
         TAXID
        100101
    Session1>
    --> same statement hangs in session 2 until
    Session1>BEGIN
      2   UPDATE taxids SET status=1 WHERE taxid=100101;
      3   COMMIT;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    Session1>
    --> so session 2 stops being blocked and:
    Session2>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    taxid         = 100101
      6  FOR UPDATE;
    no rows selected
    Session2>Of course, this is how it should happen, surely?
    Just to double check, let's reintroduce ROWNUM but force the order by to show it's not about read consistency at the start of the statement - restart should prevent it.
    (reset, then)
    Session1> select t.taxid
      2   from
      3    (select taxid, rowid rd
      4      from   taxids
      5      where  locationid = 111
      6      and    nvl(status,0) = 0
      7      order by taxid) x
      8   ,  taxids t
      9   where t.rowid = x.rd
    10   and   rownum = 1
    11   for update of t.status;
         TAXID
        100101
    Session1>
    --> Yes, session 2 hangs until...
    Session1>BEGIN
      2   UPDATE taxids SET status=1 WHERE taxid=100101;
      3   COMMIT;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    Session1>
    --> and then
    Session2> select t.taxid
      2   from
      3    (select taxid, rowid rd
      4      from   taxids
      5      where  locationid = 111
      6      and    nvl(status,0) = 0
      7      order by taxid) x
      8   ,  taxids t
      9   where t.rowid = x.rd
    10   and   rownum = 1
    11   for update of t.status;
         TAXID
        100102
    Session2>Session 2 should never be allowed to get 100101 once the lock is released.
    This is a bug.
    The worrying thing is that I can reproduce in 9.2.0.8 and 11.2.0.2.

  • 0CRM_OPPT_H  (Transaction RSA3 gives wrong result)

    Hi gurus,
    <b>0CRM_OPPT_H  (Transaction RSA3 gives wrong result)
    BBPCRM 4.0
    BW 3.50 version</b>
    I had enhanced the structure "crmt_bw_oppt_h"
    and also written a BADI to populate Opportunity header status.
    But when I run extract checker RSA3 for CRM data,
    I get wrong number of records.
    I am having 95 records for Opportunities header data.
    Data Records / Call = "100"
    Display Extr. Calls = "10"
    Above settings, I am retrieving only 61 records.
    <b>Data Records / Call = "1"
    Display Extr. Calls = "200"
    For the above settings in RSA3,
    I am able to retrieve 95 records correctly.</b>
    The problem is that in RSA1 transaction of BW 3.50 server also,
    61 records are being loaded from CRM server.
    <b>Could this be a Cache memory problem,
    Are any of my BASIS settings a cause for this problem?</b>
    Any help is really appreciated and will be rewarded.
    Thanks,
    Aby Jacob
    ========

    Dear Friends,
    <b>I had to do a small correction in my BADI code.
    I got a solution from Online SAP HELP portal.</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf4940e11d295df0000e82de14a/frameset.htm
    Notes on BADI Usage
    ====================
    The instance generated through the factory method should be declared
    as globally as possible or generally be passed as a parameter
    to ensure that the initialization process must be run as rarely as possible
    – just once would be best. In no case should you discard the instance as soon as
    it is generated or repeatedly run the initialization process in a loop.
    Within the adapter class interface,
    required database accesses are buffered locally,
    so that each access is executed once only.
    However, repeated initialization makes
    the buffer useless and dramatically reduces performance.
    Due to the local buffering, you can call Business-Add-In methods
    without having to expect considerable performance restrictions,
    even if no active implementations exist.
    Also, if the definition of the Business-Add-In is filter-dependent,
    a single instance is sufficient.
    However, you should not do without initialization altogether.
    Even if you could call static methods of the implementing
    class of the Business-Add-In implementation without an instance,
    you would lose the benefit of performance improvement through
    the Business-Add-Ins and the possibility of multiple use.
    If you switch the method type in the interface from the static method
    to the instance method at any time in the future,
    many code adjustments are required.
    In addition, you can no longer use default code that is provided.
    <b>Many Thanks to ROBIN
    and the whole SDN team</b>
    Aby Jacob ,,,,,

  • Custom search using boolean attribute set to True gives no result

    I am setting up an auto-query using the custom search portlet. This is to show all items where a boolean custom attribute is checked, ie = True.
    In step 3 I have tried to set the operator to Equals to and the default value to True. This gives no results even though several items have this attribute set to True.
    The Auto Query check box is checked.

    Found that True = 1 in database. When set to this the search works.

  • P/L A/c for a single day gives different results for different users

    Hi!
         We have SAP B1 8.81 (PL 09) in our office. P/L Account for a particular date gives different value for a single account (Other Income Account) for one user and a consistent value for all other users. The user in question is a super user and does not seem to pick a specific entry posted in the Other Income Account for that day thus giving erroneous result. I have checked the Trial Balance for that day and it gives proper result. Only the P/L account gives erroneous data. Could anyone help with the reason for this.
    Thanks
    Sreekumar

    Hi Jitin,
              Thanks for your reply.
              I tried the way you mentioned. However, the result is the same.
              The entry that I'm talking about is an automatic journal entry posted through the Outgoing Payment option.
              To make it more clear, an outgoing payment to a vendor was posted on 05/19/11 for 1,42,178.32. The check was drawn only for 71,089.16 which was the correct amount and the remaining amount (71,089.16) got posted in the Other Income account. The P/L account for this date is not picking the amount of 71,089.16 in the Other Income Account.
    Thanks & Regards
    Sreekumar
    Edited by: Sreekumar on Jan 31, 2012 5:58 PM

  • No accounting document generated at time of result analysis settlement

    No accounting document generated at time of result analysis settlement, but controlling document and profit center document are generated. problem is cost has been settled but accounting does not generated.

    No accounting document generated at time of result analysis settlement, but controlling document and profit center document are generated. problem is cost has been settled but accounting does not generated.
    i am asking at the time of  WIP calculation or settlement
    cost can be settled but does not generated any accounting document .

  • Enterprise Manager does not give correct results

    I am using version 9.0.2.0.1 core edition(oc4j & web-cache).
    My application consists of business components, java beans and jsp. It is running fine.
    Oracle enterprise manager is not giving correct results of memory/cpu usage by oc4j_home and bc4j.
    Some times it does not gives result, when i refresh it twice or thrice it shows results.
    But results are not correct. On each refresh it gives different results.
    Then it is very hard to find which resuslt is correct.
    waiting for response,
    Tahir.

    i have been using 9iAS versions 102*, 90200, 90201, and now using 903.
    As stated above, some times the results for oc4j_home is displayed.
    But the memory/cpu usage for bc4j is never shown.
    Also, its radio-button is always disabled. while its status is "running".
    On BC4J page, it also shows results of application modules created. But these results are usually wrong.
    How bc4j will be enabled, and how its memory results can be get ???
    Tahir.

  • Calling PL/SQL Procedure In Another Schema Gives Unexpected Result

    I have a SQL Script that does this:
    conn pnr/<password for user pnr>;
    set serveroutput on;
    exec vms.disable_all_fk_constraints;
    SELECT owner, constraint_name, status FROM user_constraints WHERE constraint_type = 'R';
    and the disable_all_fk_constraints procedure that is owned by user 'vms' is defined as:
    create or replace
    procedure disable_all_fk_constraints is
    v_sql   VARCHAR2(4000);
    begin
    dbms_output.put_line('Disabling all referential integrity constraints.');
    for rec in (SELECT table_name, constraint_name FROM user_constraints WHERE constraint_type='R') loop
    dbms_output.put_line('Disabling constraint ' || rec.constraint_name || ' from ' || rec.table_name || '.');
    v_sql := 'ALTER TABLE ' || rec.table_name || ' DISABLE CONSTRAINT ' || rec.constraint_name;
    execute immediate(v_sql);
    end loop;
    end;
    When I run the SQL script, the call to vms.disable_all_fk_constraints disables the FK constrains in the 'vms' schema, whereas I wanted it to disable the FK constraints in the 'pnr' schema (the invoker of the procedure). I know that I could make this work by copying the disable_all_fk_constraints procedure to the 'pnr' schema and calling it as "+exec disable_all_fk_constraints;+" from within the SQL script but I want to avoid having to duplicate the PL/SQL procedure in each schema that uses it.
    What can I do?
    Thank you

    You have two issues to solve.
    First you need to write a packaged procedure that works with INVOKER rights. The default is DEFINER rights.
    The difference is excatly what you need. Usually the package has the rights from the schema where it is defined (=Definer rights). In your case schema VMS. Whereas you need the privileges from the user that calls the package (PNR).
    => Check out the documentation for INVOKER rights
    The second problem is that the view "user_constraints" will not give the results you expect when called from inside a procedure in another schema. An alternative could be to use the view DBA_CONSTRAINTS with a filter on the owner (where owner = 'PNR'). Not sure if there are other working possibilities. Well you could create a list of constraint names that you want to disable, instead of creating the list dynamically.
    And you could have another potential disaster creeping up upon you. If you run this thing, then at this moment you don't have any referential integrity anymore. You can't be sure that you can create the FKs again after this action. This is EXTREMLY DANGEROUS. I would never ever do this in any kind of production or test database. I would be very careful when I do it on a development database.

  • 0I_FYPER - Variable in BEx gives no result

    Hello all,
    I have a problem in BEx-reporting after a releasechange from BW3.5 to BI7.0 and at the same time SEM-BCS4.0 to SEM-BCS6.0 which belongs to the variable 0I_FYPER. I use this variable in the columns (only) in order to give the user the possibillity to define which periods to show. In the rows I use the rest for defining which numbers to bring up. It worked in BW3.5/SEM-BCS4.0 fine.
    I debuged the content of the variable in user-exit ZXRSRU01 (after processing the selection screen) and could find the data I entered but the query gives no result. Any ideas?
    Thank you for any feedback,
    Chris

    Hi Guru,
    We have a work around for your issue. Just create a customer Exit variable on the calendar month and use it in the filter.
    In the customer Exit variable read the Plant variable and if it is empty populate # as result. Else read the calmonth input variable and populate it as the result.
    Use the following snippet to read input ready variables.
    DATA: loc_var_range LIKE rrrangeexit.
    READ TABLE i_t_var_range WITH KEY vnam = 'VARNAME' INTO loc_var_range.
    (loc_var_range-low will have the value of the variable)
    Hope this helps.
    Regards.
    Shafi.

Maybe you are looking for

  • Iphone 4 turns off on it's own with 5.0 and 5.01

    So I had a problem with my iphone 4 about a week ago and took it to the apple store. When I took the phone there, the phone wouldn't do anything but make phone calls, so they did a restore and the phone went back to normal, or so I thought. They also

  • Does the iMac have the ability to view a second video input?

    Basically can a VGA input show on an iMac? I have a desktop that I'd still need for certain work related software packages. I'd rather not have a a second monitor on my desk. Thanks.

  • Iweb wont publish picture borders wont show and mp3 in html snippet wont publish.

    Hi all, I'm new to this forum, I'm following www.iweb for musicians.com website design, Roddy the man is ace. I'm trying to publish my site with borders and flection on my first page and also a HTML snip box with a code for a mp3. It all shows up and

  • Mount scan problems with Norton AntiVirus 10.1

    Autoscan freezes when I mount iPod in dock, connected to my iMac via a firewire connection. Autoscan will not respond to eject or cancel scan. When I eject the iPod in iTunes, the iPod screen continues to read "Do Not Disconnect". Any similar experie

  • Build plan error

    Hi, I created new container for Financial Oracle 11.5.10 after that i added new container subject areas to Financial Oracle 11.5.10 execution plan afer that executed buld paln. i got below error. Financials_Oracle 11.5.10 MESSAGE:::There is no databa