Maybe bug : ListCollectionView.addAll with a filter function

Hi,
I think I found a bug in the flex SDK. I've checked in JIRA and it seems that it is not yet reported.
This simple code raise a "out of bouds exception" (flex SDK 4.1) :
var list:ArrayCollection = new ArrayCollection();
list.filterFunction = filter;
list.refresh();
var items:ArrayList = new ArrayList([1,2,3,4,5]);
list.addAll(items);
function filter(obj:Object) : Boolean {
     var n:Number = obj as Number;
     return n<2;
I've checked the code in mx.collections.ListCollectionView and it's obvious : addAll is calling addAllAt. "addAllAt" is calling by looping over the list to add and calling addItemAt for each item, but it increments the index arguments even if the previous item was not really added (due to a filter restriction), and the "out of bounds exception occurs". In my opinion, addAllAt has to be changed as folowing :
current version :
public function addAllAt(addList:IList, index:int):void {
     var length:int = addList.length;
     for (var i:int=0; i < length; i++)
          this.addItemAt(addList.getItemAt(i), i+index);
proposed version :
public function addAllAt(addList:IList, index:int):void {
     var length:int = addList.length;
     for (var i:int=0; i < length; i++)
          var at:int = i+index;
          if(at>length) {
               at = length;
          this.addItemAt(addList.getItemAt(i), at);
Should I open a bug? Or am I missing something?
M1kal

Hi,
I've filled this bug about 2 months ago but nothing seems to happening, is it something I have to do to push it in the process?
reagrds,

Similar Messages

  • Problem with ALV filter functionality when filtered for multiple values

    Hi,
    I am facing a problem with ALV filter functionality.
    I have displayed an ALV with some columns col_A, col_B and col_C
    col_A---- col_B -
    col_C
    1----
    a -
    abc
    2----
    b -
    pqr
    3----
    c -
    lmn
    4----
    d -
    xyz
    5----
    f -
    stu
    From the settings link I am applying filter on column col_C and selected multiple values say 'pqr', 'xyz' and 'lmn'.
    Now the ALV is showing rows only for last selection i.e . results are fetched only for value 'lmn'.
    i.e. after applying the filter the ALV table looks as below:
    col_A---- col_B -
    col_C
    3----
    c -
    lmn
    But ideally it should be:
    col_A---- col_B -
    col_C
    2----
    b -
    pqr
    3----
    c -
    lmn
    4----
    d -
    xyz
    I could not find any OSS note related to this issue.
    Please help me resolve this issue.
    Thanks,
    Feroz

    Hi,
    I am facing a problem with ALV filter functionality.
    I have displayed an ALV with some columns col_A, col_B and col_C
    col_A---- col_B -
    col_C
    1----
    a -
    abc
    2----
    b -
    pqr
    3----
    c -
    lmn
    4----
    d -
    xyz
    5----
    f -
    stu
    From the settings link I am applying filter on column col_C and selected multiple values say 'pqr', 'xyz' and 'lmn'.
    Now the ALV is showing rows only for last selection i.e . results are fetched only for value 'lmn'.
    i.e. after applying the filter the ALV table looks as below:
    col_A---- col_B -
    col_C
    3----
    c -
    lmn
    But ideally it should be:
    col_A---- col_B -
    col_C
    2----
    b -
    pqr
    3----
    c -
    lmn
    4----
    d -
    xyz
    I could not find any OSS note related to this issue.
    Please help me resolve this issue.
    Thanks,
    Feroz

  • There is no filter function in numbers for ipad,its very discouraging,as a ipad fan,even nokia lumia providing filter in there low cost mobile

    there is no filter function in numbers for ipad,its very discouraging,as a ipad fan,even nokia lumia providing filter function in excel in there low cost mobile.
    APPLE KINDLY PROVIDE THIS FEATURE AS UPDATE SOON,COZ I WORK ON EXCEL N NUMBERS IN MY IPAD IS DEAD WITH OUT FILTER FUNCTION,I CAN NOT TRAVEL WITH MY IPAD DUE TO THIS REASON,AS I HAVE TO BE IN FIELD WITH SALES FORCE SO I BOUGHT IPAD.

    Probably you know that the new version of Numbers for iOS uses the filters created in the Numbers for Mac version.
    It's not the best solution but it helps (of course, if you have a Mac!)

  • Anyone have issues with data synchronization filter functions failing?

    We are on 11.1.1.3 and are observing filter failure when moving data from planning to HFM using data sychronization. The query is pulling more records than desired and erroring on the load to HFM on members that only exist in planning. In other cases, the quiery is pulling in upper level dim members.
    We have multiple dimensions where we are using level0(base) filter function to define the set of members. In one dimension, the filter error crosses to include leaf members outside of the set. On another dim, the filter error includes upper level members. The coincidence is that failures are occuring on dim where planing has more nodes than HFM.
    One on dimension, the error that pulled upper level members went away when I specified all leaf members using the EQUAL on the filter.
    Is this a known bug?
    Thanks

    Since Straight Talk customer service was no help at all by telling me to call apple instead of trying to help me, this is what I did to fix the issue! I am not saying it will work for you but it worked for me so what do you have to lose! First of all, I have a At&t iphone!
    The first thing I did was remove the Straight Talk APN Profile that was installed or remove any one there! Because of what I read in the Straight Talk website which was:::
    For iPhone customers who activated using anAT&T compatible SIM card, there is NO need to program APN settings as this will be done automatically.
    Ok, here is what I did after that: First I removed the SIM card from the phone, then I rebooted the phone, then I reset network settings, then put the SIM card back in and BAM, I had 3G once again!
    Please keep in mind I am no expert, It was just by chance that this worked for me! And all of this with no APN Profile what so ever! Good Luck,,,,Dano

  • Table QBE-Filter BUG in combination with Application Module Pooling ?

    Hi,
    i use JDEVADF_11.1.1.1.0_GENERIC_090615.0017.5407, Java 1.6.0_14, ADF BC and ADF Faces.
    I have one View Object, one Page with a panelCollection and a table with option filtering (create via drag-and-drop from datacontrol).
    When I disable the application module pooling on the AM configuration and run the application, i can execute the query-by-example filter, but when I delete the filterCriteria and press enter (requerry for select all) the table shows the old data.
    Image for setting on application module:
    http://img265.imageshack.us/img265/1374/filterdoesnotwork1.png
    Image for execute querry and requerry for "all rows" (deleted filterCriteria)
    http://img140.imageshack.us/img140/1963/filterdoesnotwork2.png
    When I enable application module pooling all works fine. Is this a issue?
    kind regards

    Hi Frank,
    if I filter for employees which firstname starts with "D" and then for employees with "F" --> i see "No data to display.".
    So uncheck "Enable Application Module Pooling" on application module doesn't work with QBE-Filter ?
    I can send a testcase but it is so simple you can create it with jdeveloper in 2 minutes ;)
    Martin

  • Problem with Filter function in bubbleSeries

    Hi,
    I have a bubbleSeries. Its dataprovider has item values having both blank('') and negative values. I don't want to show such values, hence I have used a filter function in which a check is made and adds those items which are valid.
    I have data for various years so I have used interpolation effect.
    While playing the animation or viewing data for different time series, a small bubble is displayed on top-left corner of the chart which is not part of the valid data.
    If I dont use a filter function, I dont get this small bubble on top-left corner. But as per my requirements, I need to have a filter function.
    Please help me in guiding through the reason of such behavior of filter function.
    Thanks,
    Tanu

    Hi Gregory,
    Please find below the sample code which shows a small bubble on top-left corner when animation is played. We need to click on "play" button to start the animation and "stop" button to stop the same.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   minWidth="955" minHeight="600"
                   creationComplete="init()" >
        <fx:Declarations>
           <mx:SeriesInterpolate id="seriesEffect" duration="1000"  easingFunction="Linear.easeIn"/>
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.charts.series.items.BubbleSeriesItem;
                import mx.collections.ArrayCollection;
                import mx.effects.easing.*;
                import mx.events.FlexEvent;
                private var oTimer:Timer =  new Timer(1000);
                private var currentDp:int = 1;
                [Bindable]
                public var expenses1:ArrayCollection = new ArrayCollection([          
                    { Profit:10, Expenses:10, Amount:''},
                    { Profit:'', Expenses:50, Amount:''},
                    { Profit:'', Expenses:41.6, Amount:''},              
                    { Profit:'', Expenses:43.6, Amount:''},
                    { Profit:'', Expenses:86, Amount:''},
                    { Profit:'', Expenses:11.4, Amount:''},              
                    { Profit:'', Expenses:99.2, Amount:''},
                    { Profit:'', Expenses:12.8, Amount:''},
                    { Profit:'', Expenses:'', Amount:10}
                [Bindable]
                public var expenses2:ArrayCollection = new ArrayCollection([
                    { Profit:30, Expenses:'', Amount:10},
                    { Profit:95, Expenses:-90, Amount:50},
                    { Profit:20, Expenses:60, Amount:23},
                    { Profit:67, Expenses:'', Amount:56},
                    { Profit:-23, Expenses:56, Amount:34},
                    { Profit:30, Expenses:'', Amount:10},      
                    { Profit:95, Expenses:-90, Amount:50},
                    { Profit:70, Expenses:30, Amount:93},
                    { Profit:22, Expenses:'', Amount:10}      
                private function init():void
                    oTimer.addEventListener(TimerEvent.TIMER,onTick);
                    bubbleSeries.dataProvider = expenses1;
               public function onTick(event:TimerEvent):void
                    if(currentDp == 1)
                        bubbleSeries.dataProvider = expenses2;
                        currentDp = 2;
                    else
                        bubbleSeries.dataProvider = expenses1;
                        currentDp = 1;
                private function clickHandler():void
                    oTimer.start();
               public function myFilterFunction(cache:Array):Array
                    var filteredCache:Array=[];
                    var n:int = cache.length;
                    for(var i:int = 0; i < n; i++)
                        var isValid:Boolean = true;
                        var bubbleSeriesItem:BubbleSeriesItem = BubbleSeriesItem(cache[i]);
                        if( bubbleSeriesItem.item.Profit == "" || bubbleSeriesItem.item.Expenses == "" || bubbleSeriesItem.item.Amount == "")
                            isValid= false;
                        if(isValid)              
                            filteredCache.push(bubbleSeriesItem);                   
                    return filteredCache;
            ]]>
        </fx:Script>
        <mx:Button x="10" label="Play" click="clickHandler()"/>
        <mx:Button x="250" label="stop" click="{oTimer.stop()}"/>      
        <mx:VBox x="10" y="100" width="80%" height="70%" label="Bubble" >      
            <mx:BubbleChart id="bubbleChart" width="100%" height="100%" showDataTips="true"
                            minRadius="5" maxRadius="15">
                <mx:series>
                    <mx:BubbleSeries  id="bubbleSeries"
                                      showDataEffect="{seriesEffect}"
                                      xField="Profit" yField="Expenses" radiusField="Amount"
                                      filterFunction="myFilterFunction"
                                      />
                </mx:series>
                <mx:horizontalAxis>
                    <mx:LinearAxis id="horLinAxis"  minimum="-100" maximum="100" />      
                </mx:horizontalAxis>
                <mx:verticalAxis>
                    <mx:LinearAxis id="verLinAxis" minimum="-100" maximum="100" />
                </mx:verticalAxis>
            </mx:BubbleChart>
        </mx:VBox>
    </s:Application>
    Please help.
    Thanks,
    Tanu

  • Quartz Filter function in Preview.

    I am having a problem with the Quartz Filter function in Preview. I do a monthly newsletter for a local car club. The newsletter is distributed as a printed copy and as a PDF for e-mail and on-line viewing. I prepare the newsletter in iStudio Publisher and then open it in Preview. The file size can be quite large so I use the Export-Quartz Filter-Reduce File Size to prepare the PDF for e-mail use. Since I have updated to Mavericks 10.9 some portions of the newsletter come out as a negative.  See the below example.

    Hi. Thanks for answering.
    Take a look in what I have in Google Sheet:
    Maybe I'm not using it right, but seems to me if I need to change what I want to see (if Chinese, Italian...) I need to go back in Filter dialog and change the value, can't be dynamic, based in a cell value. Besides that seems to me if I use filter all the rest of my sheet disappears. This Filter Function can be put in any place, so I can do, for example, first 5 lines showing Chinese, the next 5 showing Italian etc.
    Hope my screenshots helps.
    Thanks.

  • Filter Function in Column Formula is not working properly

    Hi,
    I am using Filter Function in Column formula tab in Answers to calculate the Total sum from the start of the Fiscal month to the Month selected from the Prompt.
    My requirement is I have total sales column. Now I need to calculate TYYTD kind of thing for which I cant use the Time sereis due to my report constraint.
    Instead of that I am using this Filter function on TYYTD column where i am giving the filter as start of the Fiscal month to the month selected from the Prompt.
    For example if I select May month from the Prompt then this TYYTD column should give me SUM(Total Sales) between Feb and May for which I am using the Filter Function. But it giving me only May sales whcih is same as Total Sales column.
    Can anyone throw some light on this as this is very important for us or any alternate solution other than Time sereis measures.
    Did anyone got this kind of issue with Filter Function?
    Regards,
    Azad

    Ok...here's the steps to fix this as efficiently as possible.  I have a whole bunch of mailboxes under "On My Mac" and they have a bunch of mailboxes nested in them.  I get my messages into Apple Mail via IMAP.  (I don't know if this matters.)  The steps below assume you have a similar setup.
    1.  Hold the Option key down and click the dropdown arrow next to each mailbox that has one.  This will cause all nested mailboxes below it to appear.
    2.  Go to the top of the list of mailboxes under "On My Mac" and highlight the first mailbox.  Then hold the Shift key down and highlight the last mailbox in the list.  This will cause all of the mailboxes and nested mailboxes to be highlighted.
    3.  From the menu, select "Mailbox --> Rebuild" and the rebuild process will start.
    4.  Watch the top of the mail screen to see the message count change as the mailboxes are being rebuilt.  Wait until the activity stops before doing the next step.
    5.  As the mailboxes were rebuilt, many messages were reset as "Unread" even though every message was previously "Read."  Make sure the mailboxes you want to affect are still highlighted.  Right-click and select "Mark All Messages Read."
    That fixed the problem for me.

  • How can i extend the filter function to also include an option to select which column to filter on?

    Hi.
    I have built an spry test-page (testing it on my localhost  so i cannot give you direct access to it) here i have an XML file that i show in an dynamic/ repeat table with 5 columns.
    I hvae included an spry filter function to easy filter out records, but the code only allows me to filter on one of the columns.
    I would like to add an extra "select-menu" to define which column the filter should be active for, how can i do that
    Here is the filter code and also the html code for the select-menu and the box to type in what to filter.
    The bold parts is the important parts, i would like the options values from the select menu to be inserted in the filterData function to be able to define which column to do the filtering on.
    var ds1 = new Spry.Data.XMLDataSet("report3.xml", "orders/order", {sortOnLoad: "@id", sortOrderOnLoad: "descending"});
    ds1.setColumnType("date", "date");
    ds1.setColumnType("BUTIKNR", "number");
    ds1.setColumnType("EXTRAFRAKT", "number");
    ds1.setColumnType("job/@idx", "number");
    var jobs = new Spry.Data.NestedXMLDataSet(ds1, "job");
    function FilterData()
        var tf = document.getElementById("filterTF");
        var menu = document.getElementById("searchIdent");
        if (!tf.value)
            // If the text field is empty, remove any filter
            // that is set on the data set.
            ds1.filter(null);
            return;
        // Set a filter on the data set that matches any row
        // that begins with the string in the text field.
        var regExpStr = tf.value;
        if (!document.getElementById("containsCB").checked)
            regExpStr = "^" + regExpStr;
        var regExp = new RegExp(regExpStr, "i");
        var filterFunc = function(ds, row, rowNumber)
            var str = row["@id"];
            if (str && str.search(regExp) != -1)
                return row;
            return null;
        ds1.filter(filterFunc);
    function StartFilterTimer()
        if (StartFilterTimer.timerID)
            clearTimeout(StartFilterTimer.timerID);
        StartFilterTimer.timerID = setTimeout(function() { StartFilterTimer.timerID = null; FilterData(); }, 100);
    html:
                <select name="searchIdent" size="1" id="searchIdent">
                    <option value="@id" selected="selected">ID</option>
                    <option value="date">DATUM</option>
                    <option value="time">TID</option>
                    <option value="BUTIKNR">BUTIK</option>
                    <option value="REF">REFERENS</option>
                  </select>
              <input type="text" id="filterTF" onkeyup="StartFilterTimer();" />
    Contains:
      <input type="checkbox" id="containsCB" /></td>
    Thanks in advance.
    //Rickard H

    Now it works, i had to do it like this:
        var filterFunc = function(ds, row, rowNumber)
            var str = row["@id"];
            if (str && str.search(regExp) != -1)
                return row;
            var str1 = row["date"];
            if (str1 && str1.search(regExp) != -1)
                return row;
            var str2 = row["time"];
            if (str2 && str2.search(regExp) != -1)
                return row;
            var str3 = row["BUTIKNR"];
            if (str3 && str3.search(regExp) != -1)
                return row;
            var str4 = row["REF"];
            if (str4 && str4.search(regExp) != -1)
                return row;
            return null;
    I also had to remove the line "ds1.setColumnType("BUTIKNR", "number");" from the code, otherwise it would not search at all (only searches string types?).

  • Need some help with the Table Function Operator

    I'm on OWB 10gR2 for Sun/Solaris 10 going against some 10gR2 DB's...
    I've been searching up and down trying to figure out how to make OWB use a Table Function (TF) which will JOIN with another table; allowing a column of the joined table to be a parameter in to the TF. I can't seem to get it to work. I'm able to get this to work in regular SQL, though. Here's the setup:
    -- Source Table:
    DROP TABLE "ZZZ_ROOM_MASTER_EX";
    CREATE TABLE "ZZZ_ROOM_MASTER_EX"
    ( "ID" NUMBER(8,0),
    "ROOM_NUMBER" VARCHAR2(200),
    "FEATURES" VARCHAR2(4000)
    -- Example Data:
    Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (1,'Room 1',null);
    Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (2,'Room 2',null);
    Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (3,'Room 3','1,1;2,3;');
    Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (4,'Room 4','5,2;5,4;');
    Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (5,'Room 5',' ');
    -- Destination Table:
    DROP TABLE "ZZZ_ROOM_FEATURES_EX";
    CREATE TABLE "ZZZ_ROOM_FEATURES_EX"
    ( "ROOM_NUMBER" VARCHAR2(200),
    "FEATUREID" NUMBER(8,0),
    "QUANTITY" NUMBER(8,0)
    -- Types for output table:
    CREATE OR REPLACE TYPE FK_Row_EX AS OBJECT
    ID NUMBER(8,0),
    QUANTITY NUMBER(8,0)
    CREATE OR REPLACE TYPE FK_Table_EX AS TABLE OF FK_Row_EX;
    -- Package Dec:
    CREATE OR REPLACE
    PACKAGE ZZZ_SANDBOX_EX IS
    FUNCTION UNFK(inputString VARCHAR2) RETURN FK_Table_EX;
    END ZZZ_SANDBOX_EX;
    -- Package Body:
    CREATE OR REPLACE
    PACKAGE BODY ZZZ_SANDBOX_EX IS
    FUNCTION UNFK(inputString VARCHAR2) RETURN FK_Table_EX
    AS
    RETURN_VALUE FK_Table_EX := FK_Table_EX();
    i NUMBER(8,0) := 0;
    BEGIN
    -- TODO: Put some real code in here that will actually read the
    -- input string, parse it out, and put data in to RETURN_VALUE
    WHILE(i < 3) LOOP
    RETURN_VALUE.EXTEND;
    RETURN_VALUE(RETURN_VALUE.LAST) := FK_Row_EX(4, 5);
    i := i + 1;
    END LOOP;
    RETURN RETURN_VALUE;
    END UNFK;
    END ZZZ_SANDBOX_EX;
    I've got a source system built by lazy DBA's and app developers who decided to store foreign keys for many-to-many relationships as delimited structures in driving tables. I need to build a generic table function to parse this data and return it as an actual table. In my example code, I don't actually have the parsing part written yet (I need to see how many different formats the source system uses first) so I just threw in some stub code to generate a few rows of 4's and 5's to return.
    I can get the data from my source table to my destination table using the following SQL statement:
    -- from source table joined with table function
    INSERT INTO ZZZ_ROOM_FEATURES_EX(
    ROOM_NUMBER,
    FEATUREID,
    QUANTITY)
    SELECT
    ZZZ_ROOM_MASTER_EX.ROOM_NUMBER,
    UNFK.ID,
    UNFK.QUANTITY
    FROM
    ZZZ_ROOM_MASTER_EX,
    TABLE(ZZZ_SANDBOX_EX.UNFK(ZZZ_ROOM_MASTER_EX.FEATURES)) UNFK
    Now, the big question is--how do I do this from OWB? I've tried several different variations of my function and settings in OWB to see if I can build a single SELECT statement which joins a regular table with a table function--but none of them seem to work, I end up getting SQL generated that won't compile because it doesn't see the source table right:
    INSERT
    /*+ APPEND PARALLEL("ZZZ_ROOM_FEATURES_EX") */
    INTO
    "ZZZ_ROOM_FEATURES_EX"
    ("ROOM_NUMBER",
    "FEATUREID",
    "QUANTITY")
    (SELECT
    "ZZZ_ROOM_MASTER_EX"."ROOM_NUMBER" "ROOM_NUMBER",
    "INGRP2"."ID" "ID_1",
    "INGRP2"."QUANTITY" "QUANTITY"
    FROM
    (SELECT
    "UNFK"."ID" "ID",
    "UNFK"."QUANTITY" "QUANTITY"
    FROM
    TABLE ( "ZZZ_SANDBOX_EX"."UNFK2" ("ZZZ_ROOM_MASTER_EX"."FEATURES")) "UNFK") "INGRP2",
    "ZZZ_ROOM_MASTER_EX" "ZZZ_ROOM_MASTER_EX"
    As you can see, it's trying to create a sub-query in the FROM clause--causing it to just ask for "ZZZ_ROOM_MASTER_EX"."FEATURES" as an input--which isn't available because it's outside of the sub-query!
    Is this some kind of bug with the code generator or am I doing something seriously wrong here? Any help will be greatly appreciated!

    Hello Everybody!
    Thank you for all your response!
    I had changes this work area into Internal table and changed the select query. PLease let me know if this causes any performance issues?
    I had created a Z table with the following fields :
    ZADS :
    MANDT
    VKORG
    ABGRU.
    I had written a select query as below :
    I had removed the select single and insted of using the Structure it_rej, I had changed it into Internal table 
    select vkorg abgru from ZADS into it_rej.
    Earlier :
    IT_REJ is a Work area:
    DATA : BEGIN OF IT_REJ,
    VKORG TYPE VBAK-VKORG,
    ABGRU TYPE VBAP-ABGRU,
    END OF IT_REJ.
    Now :
    DATA : BEGIN OF IT_REJ occurs 0,
    VKORG TYPE VBAK-VKORG,
    ABGRU TYPE VBAP-ABGRU,
    END OF IT_REJ.
    I guess this will fix the issue correct?
    PLease suggest!
    Regards,
    Developer.

  • Using FILTER function in oracle answers

    Gurus,
    I have a question related to using Filter function in oracle answers.
    When trying to insert a Filter (expr) Using (expr) clause in the formula area of a fact table field, It errored out with msg saying about using a wrong measure.
    I know this can be done with a case expression but I tried filter clause since this is available in oracle answers.
    Please help me figuring out this scenario.
    Thanks.

    David / Raghu - Thanks for u'r replies and apologizes for not posting question with proper material.
    Am posting my code and the error message from the screen.
    Code :
    IFNULL(FILTER("Fact - MBS Loan Transactions"."OUTSTANDING PRINCIPAL" USING "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK" = 'HDC'),0)
    Error :
    nQSError: 10058] A general error has occurred. [nQSError: 22032] Function FILTER requires at least one measure attribute in its first argument. (HY000)
    SQL Issued: SELECT "Dim - MBS Loan"."LOAN AMOUNT", "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK", "Dim - MBS Loan"."LOAN TYPE SEN/SUB", "Dim - MBS Project"."PROJECT NAME", "Dim - MBS Project"."PROJECT NUMBER", "Fact - MBS Loan Transactions"."AR BALANCE INTEREST", "Fact - MBS Loan Transactions"."GL BALANCE INTEREST", IFNULL(FILTER("Fact - MBS Loan Transactions"."OUTSTANDING PRINCIPAL" USING "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK" = 'HDC'),0) FROM "Financials - MBS"
    OK (Ignore Error)
    Please continue answering my queries. Since am a newbie your answers won't be just a reply but it's actually learning for me.
    Thanks.

  • Need some help with a remove function

    Design and code a program that will maintain a list of product names. Use a String type to represent the product name and an array of strings to implement the list. Your program must implement the following methods:
    Add a product to the list
    Remove a product from the list
    Display then entire list
    Find out if a particular product is on the list.
    You need to create a command command loop with a menu() function. The program must continue asking for input until the user stops.
    This is the assignment and this is what I have so far. I need some help writing the remove function.
    Thanks
    * Title: SimpleSearchableList.java
    * Description: this example will show a reasonably efficient and
    * simple algorithm for rearranging the value in an array
    * in ascending order.
    public class SimpleSearchableList {
         private static String[] List = new String[25]; //These variables (field variables)
         private static int Size; //are common to the entire class, but unavailable
         //except to the methods of the class...
         public static void main(String[] args)
              String Cmd;
              for(;;) {
                   Menu();
                   System.out.print("Command: ");
                   Cmd = SimpleIO.inputString();
                   if(Cmd.equals("Quit"))
                        break;
                   else if(Cmd.equals("Fill"))
                        FillList();
                   else if(Cmd.equals("Search"))
                        SearchList();
                   else if(Cmd.equals("Show"))
                        ShowList();
                   else if(Cmd.equals("Remove"))
                        Remove();
         //Tells you what you can do...
         public static void Menu()
              System.out.println("Choices..................................");
              System.out.println("\tFill to Enter Product");
              System.out.println("\tShow to Show Products");
              System.out.println("\tSearch to Search for Product");
              System.out.println("\tRemove a Product");
              System.out.println("\tQuit");
              System.out.println(".........................................");
         //This method will allow the user to fill an array with values...
         public static void FillList()
              int Count;
              System.out.println("Type Stop to Stop");
              for(Count = 0 ; Count < List.length ; Count++)
                   System.out.print("Enter Product: ");
                   List[Count] = SimpleIO.inputString();
                   if(List[Count].equals("Stop"))
                        break;
              Size = Count;
         //This method will rearrange the values in the array so that
         // go from smallest to largest (ascending) order...
         public static void SearchList()
              String KeyValue;
              boolean NotFoundFlag;
              int Z;
              System.out.println("Enter Product Names Below, Stop To Quit");
              while(true)
                   System.out.print("Enter: ");
                   KeyValue = SimpleIO.inputString();
                   if(KeyValue.equals("Stop")) //Note the use of a method for testing
                        break; // for equality...
                   NotFoundFlag = true; //We'll assume the negative
                   for(Z = 0 ; Z < Size ; Z++)
                        if(List[Z].equals(KeyValue)) {
                             NotFoundFlag = false; //If we fine the name, we'll reset the flag
              System.out.println(List[Z] + " was found");
                   if(NotFoundFlag)
                        System.out.println(KeyValue + " was not found");     
         //This method will display the contents of the array...
         public static void ShowList()
              int Z;
              for(Z = 0 ; Z < Size ; Z++)
                   System.out.println("Product " + (Z+1) + " = " + List[Z]);
         public static void Remove()
    }

    I need help removing a product from the arrayYes. So what's your problem?
    "Doctor, I need help."
    "What's wrong?"
    "I need help!"
    Great.
    By the way, you can't remove anything from an array. You'll have to copy the remaining stuff into a new one, or maybe maintain a list of "empty" slots. Or null the slots and handle that. The first way will be the easiest though.

  • Bug sending email with Excel file (immediate reply would he helpfull)

    Hi ,
       Below is have pasted a sample code where it will sends a email along with an attachtment (xls) .where the email is working perfectly but the xls file attachtment has a blank space in the first line .
    where iam facing the problem ,
    ie there should not be any blank lines at the top .
    Please run the code one i have pasted below .u can find the bug .
    can any one help me on this .
    please have ur mail id in ( reclist-receiver ) so that u can check for the output.
    This table requires information about how the data in the
    tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT are
    to be distributed to the documents and its attachments.
    DATA: objpack LIKE sopcklsti1 OCCURS  2 WITH HEADER LINE.
    This table must contain the summarized data dependent on each object type.
    SAPscript objects store information here about forms and styles,
    for example. Excel list viewer objects store the number of rows and columns
    amongst other things and PC objects store their original file name.
    DATA: objhead LIKE solisti1   OCCURS  1 WITH HEADER LINE.
    *CREATION OF INTERNAL TABLE
    DATA : BEGIN OF itobjbin OCCURS 10 ,
           vbeln type vbrp-vbeln,
           matnr type vbrp-matnr,
           werks type vbrp-werks,
           fktyp like vbrk-fktyp,
           END OF itobjbin .
    This table must contain the summarized content of the objects identified as binary objects.
    *DATA: OBJBIN  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
    DATA:   objbin TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                   WITH HEADER LINE.
    DATA: wa_itobjbin LIKE itobjbin .
    This table must contain the summarized content of the objects identified as ASCII objects.
    DATA: objtxt  LIKE solisti1   OCCURS 10 WITH HEADER LINE.
    This table must contain the document recipients.
    DATA: reclist LIKE somlreci1  OCCURS  5 WITH HEADER LINE.
    This structure must contain the attributes of the document to be sent.
    DATA: doc_chng LIKE sodocchgi1.
    DATA: tab_lines LIKE sy-tabix.
    DATA : V_FKTYP LIKE VBRK-FKTYP.
    Creating the document to be sent
    doc_chng-obj_name = 'OFFER'.                      " input contains the attributes of the document to be sent
    doc_chng-obj_descr = 'EMAIL WITH EXCEL DOWNLOAD'.   "input contains title/subject of the document
    *BODY OF THE MAIL
    OBJTXT = 'Hi'.
    APPEND OBJTXT .
    OBJTXT = 'Test for excel download'.
    APPEND OBJTXT.
    OBJTXT = 'Below is the attachment with Billing Document Details'.
    APPEND OBJTXT.
    OBJTXT = 'Regards'.
    APPEND OBJTXT.
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    Creating the entry for the compressed document
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num   = 0.
    objpack-body_start = 1.
    objpack-body_num   = tab_lines.
    objpack-doc_type   = 'RAW'.
    APPEND objpack.
    Creating the document attachment
    (Assume the data in OBJBIN are given in BMP format)
    select vbeln matnr werks
            from vbrp into table itobjbin
            up to 10 rows
            where werks GE '1000'.
    loop at itobjbin.
    select single fktyp into  v_fktyp from vbrk where vbeln = itobjbin-vbeln.
    move v_fktyp to itobjbin-fktyp.
    modify itobjbin.
    endloop.
    PERFORM build_xls_data_table .
    DESCRIBE TABLE objbin LINES tab_lines.
    objhead = 'ABC.XLS'. APPEND objhead.
    Creating the entry for the compressed attachment
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num   = 1.
    objpack-body_start = 1.
    objpack-body_num   = tab_lines.
    objpack-doc_type   = 'XLS'.
    objpack-obj_name   = 'ATTACHMENT'.
    objpack-obj_descr = 'XLS'.
    objpack-doc_size   = tab_lines * 255.
    APPEND objpack..
    Entering names in the distribution list
    reclist-receiver = ''.
    reclist-rec_type = 'U'.
    APPEND reclist.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
         EXPORTING
              document_data = doc_chng
              put_in_outbox = 'X'
              commit_work   = 'X'
         TABLES
              packing_list  = objpack
              object_header = objhead
              contents_bin  = objbin
              contents_txt  = objtxt
              receivers     = reclist
         EXCEPTIONS
              too_many_receivers = 1
              document_not_sent  = 2
              operation_no_authorization = 4
              OTHERS = 99.
    CASE sy-subrc.
      WHEN 0.
        WRITE: / 'Result of the send process:'.
        LOOP AT reclist.
          WRITE: / reclist-receiver(48), ':'.
          IF reclist-retrn_code = 0.
            WRITE 'sent successfully'.
          ELSE.
            WRITE 'not sent'.
          ENDIF.
        ENDLOOP.
      WHEN 1.
        WRITE: / 'no authorization to send to the specified number of',  'recipients!'.
      WHEN 2.
        WRITE: / 'document could not be sent to any of the recipients!'.
      WHEN 4.
        WRITE: / 'no authorization to send !'.
      WHEN OTHERS.
        WRITE: / 'error occurred during sending !'.
    ENDCASE.
    *&      Form  build_xls_data_table
          text
    -->  p1        text
    <--  p2        text
    FORM build_xls_data_table .
    CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
               con_tab TYPE x VALUE '09'.   "OK for non Unicode
    CONCATENATE 'Billing Document' 'Material Number' 'Plant' 'Billing category' ' ' INTO objbin SEPARATED BY con_tab.
    CONCATENATE con_cret objbin  INTO objbin.
    APPEND  objbin.
    LOOP AT itobjbin  .
       CONCATENATE itobjbin-vbeln itobjbin-matnr itobjbin-werks itobjbin-fktyp' '
              INTO objbin SEPARATED BY con_tab.
       CONCATENATE con_cret objbin  INTO objbin.
       APPEND  objbin.
    ENDLOOP.
    thanks in advance,
    vinay .

    Hi ravi ,
         Thanks ,for your help .now xls is working fine .
    but now iam facing a problem with the same function module .for txt files .where all the records are formated in asingle line .
    can u provide a solution for this ,which would be very helpfull.
    below is have attached the sample code .
    Thanks,
    vinay.
    FUNCTION Z_KAILASH_ATTACHMENT1.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(EMAILID)
    *"     VALUE(SUBJECT)
    *"     VALUE(ATYPE)
    *"  TABLES
    *"      ATTACH_FILE STRUCTURE  SOLISTI1
    *"      BODY OPTIONAL
    This table requires information about how the data in the
    tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT are
    to be distributed to the documents and its attachments.
      DATA OBJPACK LIKE SOPCKLSTI1 OCCURS  2 WITH HEADER LINE.
    This table must contain the summarized data dependent on each object type.
    SAPscript objects store information here about forms and styles,
    for example. Excel list viewer objects store the number of rows and columns
    amongst other things and PC objects store their original file name.
      DATA OBJHEAD LIKE SOLISTI1   OCCURS  1 WITH HEADER LINE.
    This table must contain the summarized content of the objects identified as binary objects.
      DATA   OBJBIN TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                     WITH HEADER LINE.
    This table must contain the summarized content of the objects identified as ASCII objects.
      DATA OBJTXT  LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE.
    This table must contain the document recipients.
      DATA  RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE .
    This structure must contain the attributes of the document to be sent.
      DATA: DOC_CHING LIKE SODOCCHGI1.
      DATA: TAB_LINES LIKE SY-TABIX.
    Create the internal table for body , subject
      DATA: IT_BODY LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
    CONSTANTS: con_cret TYPE C VALUE cl_abap_char_utilities=>horizontal_tab,
               con_tab TYPE C VALUE cl_abap_char_utilities=>cr_lf.
    Move Body to Internal Table (body into it_body)
      LOOP AT BODY .
        MOVE BODY TO IT_BODY .
        APPEND IT_BODY .
      ENDLOOP.
      DOC_CHING-OBJ_DESCR = SUBJECT.   "Subject of the Email
    Move the Subject and Body to OBJTXT
      OBJTXT[] = IT_BODY[].
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHING-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    CLEAR OBJPACK-TRANSF_BIN.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM   = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM   = TAB_LINES.
    OBJPACK-DOC_TYPE   = 'RAW'.
    APPEND OBJPACK.
    Convert IT to Excel format
    IF ATYPE = 'XLS' .
    *CONSTANTS: con_cret TYPE C VALUE cl_abap_char_utilities=>horizontal_tab,
              con_tab TYPE C VALUE cl_abap_char_utilities=>cr_lf.
      LOOP AT ATTACH_FILE .
        REPLACE ALL OCCURRENCES OF '#' IN ATTACH_FILE WITH con_cret. "  INTO objbin.
        CONCATENATE  ATTACH_FILE con_tab INTO objbin.
        APPEND  objbin.
      ENDLOOP.
    ELSEIF ATYPE = 'TXT' .
      LOOP AT ATTACH_FILE .
        REPLACE ALL OCCURRENCES OF '#' IN ATTACH_FILE WITH con_tab. "  INTO objbin.
        CONCATENATE ATTACH_FILE ' '  INTO OBJBIN .
        APPEND OBJBIN .
      ENDLOOP.
    ENDIF.
    ****End-Code Excel Format .
    DESCRIBE TABLE objbin LINES tab_lines.
    objhead = subject. APPEND objhead.
    Creating the entry for the compressed attachment
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num   = 1.
    objpack-body_start = 1.
    objpack-body_num   = TAB_LINES.
    objpack-doc_type   = ATYPE.
    objpack-obj_name   = 'ATTACHMENT'.
    objpack-obj_descr = 'TEST'. "Attachment File Name
    objpack-doc_size   = TAB_LINES * 255.
    APPEND objpack..
    reclist-receiver = EMAILID.
    reclist-rec_type = 'U'.
    APPEND reclist.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
       DOCUMENT_DATA                    = DOC_CHING
       PUT_IN_OUTBOX                    = 'X'
       COMMIT_WORK                      = 'X'
    IMPORTING
      SENT_TO_ALL                     =
      NEW_OBJECT_ID                   =
      TABLES
        PACKING_LIST                    = OBJPACK
       OBJECT_HEADER                    = OBJHEAD
       CONTENTS_BIN                     = OBJBIN
       CONTENTS_TXT                     = OBJTXT
       RECEIVERS                        =  RECLIST
    EXCEPTIONS
       TOO_MANY_RECEIVERS               = 1
       DOCUMENT_NOT_SENT                = 2
       OPERATION_NO_AUTHORIZATION       = 4
       OTHERS                           = 99 .
    ENDFUNCTION.

  • Content iView With out filter not displaying folder content

    Hi!
    I´m creating a ContentiView with out filter and pointing it to a document Folder, when the user access the iView this message appears:
    http://oneworld.neoris.net:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fDemaBanorte!2fDemoBanorteRol!2fHome!2fBanortePage!2fContentiViewWOFilter/documents/BanorteDocuments
    The folder you are looking for has no displayable content.
    You can try one of the following:
    Access the folder using the Navigation user interface.
    Access the folder as a Web folder. Your operating system and browser dictate whether or not this will work.
    And when I click on "Access the folder using the Navigation user interface." then I can see the folder structure and its contents really nice.
    is there a way to configure the iView that allways display the content this way with out the user clicking on the "Access the folder using the Navigation user interface." option. ?
    Thanx in advanced!
    Gerardo J

    Hi,
    I resolved the problem using a KM Navigation iView, this iView has the functionality I was looking for and this displays the folders and then the content of the folders if we click on the folder. with the edit etc etc functionality.
    kind Regards,
    Gerardo J

  • Filter function causing 0 items in combo box

    HI there, I have combobox with the dataProvider set up like below
        <mx:ComboBox rowCount="10" id="selectUser" 
                        dataProvider="{VO.getInstance().clientsResultForAddTrade}" width="258"
                        x="28" y="10" >        
                    </mx:ComboBox>
    in the VO class I have some code that calls the filter function (when clientsResultForAddTrade is refreshed in the clientsDataChangeHandler) when the clientsResultForAddTrade data changes.
          private function clientsDataChangeHandler( event:PropertyChangeEvent ):void{
               clientsResultForAddTrade.refresh();
            public function VO(caller:Function=null)
                if (caller != VO.getInstance)
                    throw new Error("Singleton is a singleton class, use getInstance() instead");
                if (VO.instance != null)
                    throw new Error("Only one Singleton instance should be instantiated");
                //put instantiation code here
                clientsResultForAddTrade.filterFunction = clientAuthorisedFilterFunction;
                 activityWatcher = ChangeWatcher.watch( this, "clientsResultForAddTrade", clientsDataChangeHandler);
                private function clientAuthorisedFilterFunction(item:Object):Boolean
                    var b:Boolean =  item.status == 'Authorised';
                    return item.status == 'Authorised';
    However there are 0 items in the selectUser combobox after the filter function is called, I have checked that it returns true when item.status == 'Authorised'
    Please advise, 10 points available

    Could it be a problem with the way I assign the data in the first place?
    private function handleGetClients(event:ResultEvent):void
                    VO.getInstance().clientsResult=event.result as ArrayCollection;
                    //the following has a filter function in the model that automaticly refreshes
                    VO.getInstance().clientsResultForAddTrade.source = (event.result as ArrayCollection).source;

Maybe you are looking for

  • How to chage the welcome file in web.xml using creator?

    Hi guys, I want to set the welcome file in web.xml to index.html but every time I run my project in creator, creator replaces index.html by faces/index.jsp. I need the index.html to check if the browser enables cookies & javascript and then I redirec

  • In Mac OS X Mail some emails are not displaying the correct font size.

    I have set my Mail to display email messages (Inbox) to Courier 13 point (easy to read) and most messages are displayed that way, however I often get emails that are displayed in unreadably small and often colored type. I don't understand why this is

  • One beep gray screen

    I have an Ibook, the white and blue one. I bought it for a buck on ebay. I start it up, it beeps once, and goes into firmware automatically. I type mac-boot and it boots into a gray screen. I've tried alotta things like reseting the power button, and

  • Internet Based Client Updates

    Hi, We have SCCM 2012 R2 installed, with IBCM enabled. These clients are able to switch between intranet and internet fine. Updates work internally and externally fine too. We only have 1 SUP configured for intranet access only, and the Internet faci

  • Black print cartridge only, hp 5652, windows 7

    Hi. Why can't we select "Black print cartridge only" for printer "hp deskjet 5652" in windows 7 (64bit)? In "Preferences" we see this: Finishing -> [x] Print on both sides Color -> [x] Print In Grayscale [ ] Black print cartridge only <<<<<<<Greyed o