Removing Duplicates from a choose from list

Hi All,
I have a choose from list of obj 73 )Catalog Numbers (Table OSCN)
I also added conditions in the CFL that it only shows the Substitute for the CardType = 'S' (Supllier) Business Partners.
But I want to remove all the duplicate Substitutes from the CFL so that only distinct Catalog Numbers shows in the CFL.
        //  Adding 2 CFL, one for the button and one for the edit text.
                oCFLCreationParams.MultiSelection = false;
                oCFLCreationParams.ObjectType = "73";
                oCFLCreationParams.UniqueID = "CFL1";
                oCFL = oCFLs.Add(oCFLCreationParams);
                //Adding Conditions to CFL1
                oCons = oCFL.GetConditions();
                oCon = oCons.Add();
                oCon.Alias = "Substitute";
                SAPbobsCOM.Recordset oSuppliers = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                oSuppliers.DoQuery("Select Distinct t1.Substitute From OSCN t1 Join OCRD t2 on t1.CardCode = t2.CardCode Where t2.CardType = 'S' Group By t1.Substitute");
                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                while (!oSuppliers.EoF)
                    oCon.CondVal = oSuppliers.Fields.Item(0).Value.ToString();
                    oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR;
                    oCon = oCons.Add();
                    oCon.Alias = "Substitute";
                    oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                    oSuppliers.MoveNext();
                oCFL.SetConditions(oCons);
Please advise....
Kind Regards,
Brenden Draper

Hi Brenden,
what you are trying to archieve won't work. Simply because CFL is getting all row data from  OSCN and ItemCode or CardCode can differ for a specific substitute.
For example.
ItemCode,CardCode,Substitute
ItemA,BP1,sub1
ItemA,BP2,sub1
Would be 2 resultlines both with sub1 as substitute.
SQL equivalent :
Select Distinct t0.* from oscn t0 inner join OCRD t1 on t0.CardCode = t1.CardCode where t1.CardType = 'S'
My advise would be to open a simple form with a grid and datatable bound.
Some lines of coding and you get all you need.
regards,
Maik

Similar Messages

  • Remove duplicates while loading data from text file

    Hi,
    Data in text file (some times has duplicates) is being loaded into Oracle 9i database using Informatica. To improve performance, we would like to remove duplicates at the time of each load using Oracle procedure. Could you please help me with this?
    Thanks,
    Lakshmi

    No, our table doesn't have that. Most of the functionality is managed at the informatica level. Is there any other way? Thanks,

  • Get DocNum from CFL (choose from list)

    Hi SAP gurus!
    Wish all of you a very Happy and Prosperous New Year 2012 !
    is it possible to get Document Number from List of Goods Receipt (CFL) ..?
    in Landed Cost Screen, when user clicks on 'Copy From' button, i am trying to execute query based on Document Number of List Of Goods Receipt CFL (Screen No. 10019). and then  assign value of  GrossAmnt to textfield  'ActualCost'
    but in Screen 10019, when i press 'Choose' button, value in  pval.formtype is 992!
    in Case statement of 10019, hence my query is not getting executed..
    Does any one have any idea how can i get Document Number from CFL.?
    below is my code.
    '// add an event type to the container
    '// this method returns an EventFilter object
        Set oFilter = oFilters.Add(et_ITEM_PRESSED)
    '// aggign the form type on which the event would be processed
        oFilter.Add 992      'Landed Cost Screen
        oFilter.Add 10019  'List of Goods Receipt Screen (CFL)
    in Case statement of pval.formtype
    If pVal.FormType <> 0 Then
    If pVal.Before_Action = False Then
    Select Case pVal.FormType
    case 992:
    case 10019:
    select case pval.eventtype
    case et_item_pressed
    Set o_TmpForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
    o_matrix = o_TmpForm.items.item("7").specific
    set actual_cost = o_matrix.column.item("DocNum").specific.value ' actual_cost.RowCount is 0, hence runtime error.
    'now passing query in below sub end sub subroutine(procedure)..
    get_actual_cost
    end select
    end Select
    end if
    end if
    i appreciate your help..
    Thanks and Regards,
    kaviprashu

    Hello,
    When you call ChooseFromList object, and select an item, you can get the datatable which contains the selected rows from the CFL object.
    Now it has several columns (basically all columns in the head table), you so it is now easy to select the correct column:
    val1 = oDataTable.GetValue("[COLUMN_NAME]", 0)
    Sample code:
    If oCFLEvento.BeforeAction = False Then
                    Dim oDataTable As SAPbouiCOM.DataTable
                    oDataTable = oCFLEvento.SelectedObjects
                    Dim val1 As String
                    Dim val2 As String
                    Try
                        val1 = oDataTable.GetValue("DocNum", 0)
                        val2 = oDataTable.GetValue("DocEntry", 0)
                    Catch ex As Exception
                    End Try
    Now you can only focus on the landed costs screen, (992) and track event et_CHOOSE_FROM_LIST
    Now the complete code:
    If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
                Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
                oCFLEvento = pVal
                Dim sCFL_ID As String
                sCFL_ID = oCFLEvento.ChooseFromListUID
                Dim oForm As SAPbouiCOM.Form
                oForm = SBO_Application.Forms.Item(FormUID)
                Dim oCFL As SAPbouiCOM.ChooseFromList
                oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
                If oCFLEvento.BeforeAction = False Then
                    Dim oDataTable As SAPbouiCOM.DataTable
                    oDataTable = oCFLEvento.SelectedObjects
                    Dim val1 As String
                    Dim val2 As String
                    Try
                        val1 = oDataTable.GetValue("DocNum", 0)
                        val2 = oDataTable.GetValue("DocEntry", 0)
                    Catch ex As Exception
                    End Try
                End If
            End If
    Regards
    János

  • How do I remove duplicate entries in my Contact List?

    I imported my contact list from MS Outlook, but for some reason there are many duplicate entries in Thunderbird.

    This add on claims to do what you want. I have never used it so I cannot comment on if it works.
    https://addons.mozilla.org/en-US/thunderbird/addon/duplicate-contact-manager/?src=ss

  • Edit and text and choose from list

    hello,
    I am trying to create a form that resemle to the purchase order form.
    In the purchase order form when we select the card code from the choose from list
    the system fill all the fileds like the name docnum .. with relevant information.
    i tried to do that by using the vent et_evaluate of the edit text bind with the Card code in my form.
    The problem is that when i clik on the choose from list button the event is lanched  and then the value of the card code is "" so i can't crate my queries to get the infomation like suplier name and ..
    does any body have an answer?
    This my code:
    switch (pVal.ItemUID)
                                                case "3":
                                                        _Form.Freeze(true);
                                                        try
                                                            string NumFournisseur =
                                                                ((EditText) _Form.Items.Item("3").Specific).Value;
                                                            ArrayList DFournisseur =
                                                                new DB.PurchaseRequest(_SboCompany).
                                                                    GetDetailsFournisseur(NumFournisseur);
                                                            EditText Textvar;
                                                            // remplir nom fournisseur et nom contact
                                                            Textvar = (EditText) _Form.Items.Item("2").Specific;
                                                            Textvar.String = DFournisseur[0].ToString();
                                                            Textvar = (EditText) _Form.Items.Item("4").Specific;
                                                            Textvar.String = DFournisseur[1].ToString();
                                                            // remplir les dates comptable , de livraiosn et du document
                                                            Textvar = (EditText) _Form.Items.Item("17").Specific;
                                                            Textvar.String = DateTime.Today.ToString();
                                                            Textvar = (EditText) _Form.Items.Item("19").Specific;
                                                            Textvar.String = DateTime.Today.ToString();
                                                            Textvar = (EditText) _Form.Items.Item("21").Specific;
                                                            Textvar.String = DateTime.Today.ToString();
                                                            // remplir devise partenaire et numéro document
                                                            ((EditText) _Form.Items.Item("59").Specific).String =
                                                                new DB.PurchaseRequest(_SboCompany).GetCurrencyCode(
                                                                    NumFournisseur);
                                                            _Form.Items.Item("59").Visible = true;
                                                            _Form.Items.Item("59").Enabled = false;
                                                            ((ComboBox) _Form.Items.Item("10").Specific).Select(
                                                                "primary",
                                                                BoSearchKey.
                                                                    psk_Index);
                                                            ((EditText) _Form.Items.Item("11").Specific).String =
                                                                new DB.PurchaseRequest(_SboCompany).GetLastDocNum().
                                                                    ToString();
                                                            ((EditText) _Form.Items.Item("12").Specific).String = "0";
                                                        catch (Exception e)
                                                            Console.WriteLine(e.Message);
                                                        _Form.Freeze(false);
                                                        break;
                                            break;
                                        catch (Exception ex)
                                            Console.Write(ex.Message);
                                break;

    Hey Achref,
    You can use the event and code like this:
    string vendCode = string.Empty;
    SAPbouiCOM.IChooseFromListEvent oCFLEvento = (SAPbouiCOM.IChooseFromListEvent) pVal;
    string sCFL_ID = oCFLEvento.ChooseFromListUID;
    SAPbouiCOM.ChooseFromList oCFL = oVendorSourcingForm.ChooseFromLists.Item(sCFL_ID);
    SAPbouiCOM.DataTable oDataTable =  oCFLEvento.SelectedObjects;
    if (oDataTable != null)
         //get selected value from datatable
         if (oDataTable.Rows.Count > 0)vendCode = oDataTable.GetValue(0, 0).ToString();
    Also check out 17.ChooseFromList in the samples that you can download.
    Hope that helps
    Curtis

  • Removing duplicate values from selectOneChoice bound to List Iterator

    I'm trying to remove duplicate values from a selectOneChoice that i have. The component binds back to a List Iterator on the pageDefinition.
    I have a table on a JSF page with 5 columns; the table is bound to a method iterator on the pageDef. Then above the table, there are 5 separate selectOneChoice components each one of which is bound to the result set of the table's iterator. So this means that each selectOneChoice only contains vales corresponding to the columns in the table which it represents.
    The selectOneChoice components are part of a search facility and allow the user to select values from them and restrict the results that are returned. The concept is fine and i works. However if i have repeating values in the selectOneChoice (which is inevitable given its bound to the table column result set), then i need to remove them. I can remove null values or empty strings using expression language in the rendered attribute as shown:
    <af:forEach var="item"
    items="#{bindings.XXXX.items}">
    <af:selectItem label="#{item.label}" value="#{item.label}"
    rendered="#{item.label != ''}"/>
    </af:forEach>
    But i dont know how i can remove duplicate values easily. I know i can programatically do it in a backing bean etc.... but i want to know if there is perhaps some EL that might do it or another setting that ADF gives which can overcome this.
    Any help would be appreciated.
    Kind Regards

    Hi,
    It'll be little difficult removing duplicates and keeping the context as it is with exixting standard functions. Removing duplicates irrespective of context changes, we can do with available functions. Please try with this UDF code which may help you...
    source>sort>UDF-->Target
    execution type of UDF is Allvalues of a context.
    public void UDF(String[] var1, ResultList result, Container container) throws StreamTransformationException{
    ArrayList aList = new ArrayList();
    aList.add(var1(0));
    result.addValue(var1(0));
    for(int i=1; i<var1.length; i++){
    if(aList.contains(var1(i)))
         continue;
    else{
    aList.add(var1(i));
    result.addValue(var1(i));
    Regards,
    Priyanka

  • HT2905 How to remove duplicate songs from the iPhone when the duplicates are not listed in the iTunes library on the computer.

    How can I remove duplicate songs from the iPhone4. The duplicates are not listed in the computer iTunes library.

    The simplest thing may be to back-up and then restore the iPhone. If you don't fancy that then remove all media that is currently synced to it, then double check and manually remove any media that remains on the device, before reselecting your sync options.
    If you've been manually managing the device and your library doesn't contain copies of all your media then see Recover your iTunes library from your iPod or iOS device.
    tt2

  • Removing a Choose From List

    Hi
    I have a matrix containing numerous columns, one of which is a combo type column and one which is an edit box column containing a choose from list linking to the Item Master.
    What I need to happen is if the user selects a particular option from the combo column then the edit box column cell associated with that row will no longer allow the user to use the choosefromlist function and will not validate the value entered with an item. So basically I need to temporarily remove the choosefromlist functionality from this particular cell.
    The way I though of doing this was simply using a SAPbouiCOM.EditBox in order to select the particular cell and then try to set the .ChooseFromListUID property to "", however this does not work.
    Is there any way that this can be done?
    Thanks a lot
    Steve
    Edited by: Steven Tryner on Jun 9, 2009 4:41 PM

    Yeah I tried implementing this method into my code however the problem I had was stopping the cell from being automatically being validated against an Item, as it does with a choosefromlist. So if the text entered into the cell is not an Item the user can't navigate to any other cell until a valid itemcode is entered.
    Is there any way around this?
    Thanks

  • How can i remove unwanted e-mail address from my list?

    how can i remove unwanted e-mail address from my list?

    Go to settings -> mail contacts and calendars -> tap on the desired account and choose delete at the bottom of the page. This will delete the email accunt from the device.

  • HT2905 i have just followed all the insrtuctions in support to remove duplicates from my library but now most of my musicis gone except for my recent purchases. How come and how do i fix it?

    i have just followed all the instructions in support to remove duplicates from my library but now most of my music is gone except for my recent purchases. How come and how do i fix it?

    Final Cut is a separate, higher end video editor.  The pro version of iMovie.
    Give iPhoto a look at for creating the slideshow.  It's easy to assemble the photos in an album in iPhoto, put them in the order you want and then make a slideshow of them.  You can select from various themes and transitions between slides and add music from your iTunes library.
    When you have the slidshow as you want use the Export button at the bottom of the iPhoto window and export with Size = Medium or Large.
    Save the resulting Quicktime movie file in your Movies folder.
    Next, open iDVD, choose your theme and drag the QT movie file into the menu window being careful to avoid any drop zones.
    Then follow this workflow to help assure the best qualty video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    The reason I suggest iPhoto is that I find it much easier to use than iMovie (except for the older iMovie 6 HD version).  Personal preferences showing here.

  • Remove duplicate entries from dropdownlist in web dynpro abap

    How to remove duplicate entries from dropdownlist in web dynpro abap? Can someone please help me
    I have maintained the data in the z table wherein the records of particular fields are repeated but when i show that record in the Web Dynpro application dropdown list, the user should only be able to view the unique data for selection of that particular field.

    Hi,
    try this code in init method.
    use the
    Delete adjacent duplicates.
    <set the table>
    select <f1>  from <table> into TABLE <Itab> whre <condition>.
       DELETE ADJACENT DUPLICATES FROM <Itab> COMPARING <f1>.
         lo_nd_vbap->bind_table( new_items = <itab> set_initial_elements = abap_true ).

  • Trick to remove duplicate entries from tables ?

    hi.
    i have 53tables which are having duplicate entries and names of all 53 tables r listed in top_t table ?
    can any1 provide me solution to show and if possible ask for remove of those duplicates entries from each table if required ?
    daily i am removing duplicates manually ....its too tedious now !
    can any1 help me out ?

    Well, I suppose if the duplication is such that
    SELECT DISTINCT * FROM tablename;gives you the required result, then you could have a procedure that made a copy of the table, deleted/truncated the original, then inserted the distinct values back into it.
    In 10g you could even use flashback to avoid the temp copy - but it also means you can't use TRUNCATE so whether it's any more efficient I'm not sure. But just for fun and since it's urgent:
    CREATE OR REPLACE PROCEDURE dedupe_table
        ( p_table_name user_tables.table_name%TYPE )
    IS
        k_start_timestamp TIMESTAMP := SYSTIMESTAMP;
    BEGIN
        SAVEPOINT start_of_dedupe;
        BEGIN
            EXECUTE IMMEDIATE 'DELETE ' || p_table_name;
        EXCEPTION
            WHEN OTHERS THEN
                ROLLBACK TO start_of_dedupe;
                RAISE_APPLICATION_ERROR
                ( -20000
                , 'Error deleting ' || UPPER(p_table_name) ||
                   CHR(10) || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
                , TRUE );
        END;
        BEGIN
            EXECUTE IMMEDIATE
            'INSERT INTO ' || p_table_name ||
            ' SELECT DISTINCT * FROM ' || p_table_name || ' AS OF TIMESTAMP :b1'
            USING k_start_timestamp;
        EXCEPTION
            WHEN OTHERS THEN
                ROLLBACK TO start_of_dedupe;
                RAISE_APPLICATION_ERROR
                ( -20000
                , 'Error repopulating ' || UPPER(p_table_name) ||
                   CHR(10) || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
                , TRUE );
        END;
    END dedupe_table;
    SQL> select * from wr_test;
          COL1 C C
             1 A B
             1 A B
             2 C D
             2 C D
    4 rows selected.
    SQL> BEGIN
      2      dedupe_table('WR_TEST');
      3  END;
      4  /
    PL/SQL procedure successfully completed.
    SQL> select * from wr_test;
          COL1 C C
             1 A B
             2 C D
    2 rows selected.I make no claims for robustness, efficiency or human safety.
    Edited by: William Robertson on Sep 24, 2009 7:12 PM

  • First attempt to remove duplicate rows from a table...

    I have seen many people asking for a way to remove duplicate rows from data. I made up a fairly simple script. It adds a column to the table with the cell selected in it, and adds the concatenation of the data to the left into that new column. then it reads that into a list, and walks through that list to find any that are listed twice. Any that are it marks for DELETE.
    It then walks through to find each one marked for delete and removes them (you must go from bottom to top to do this, otherwise your row markings for delete don't match up to the original rows anymore). Last is to delete the column we added.
    tell application "Numbers"
    activate
    tell document 1
    -- DETERMINE THE CURRENT SHEET
    set currentsheetindex to 0
    repeat with i from 1 to the count of sheets
    tell sheet i
    set x to the count of (tables whose selection range is not missing value)
    end tell
    if x is not 0 then
    set the currentsheetindex to i
    exit repeat
    end if
    end repeat
    if the currentsheetindex is 0 then error "No sheet has a selected table."
    -- GET THE TABLE WITH CELLS
    tell sheet currentsheetindex
    set the current_table to the first table whose selection range is not missing value
    end tell
    end tell
    log current_table
    tell current_table
    set list1 to {}
    add column after column (count of columns)
    set z to (count of columns)
    repeat with j from 1 to (count of rows)
    set m to ""
    repeat with i from 1 to (z - 1)
    set m to m & value of (cell i of row j)
    end repeat
    set value of cell z of row j to m
    end repeat
    set MyRange to value of every cell of column z
    repeat with i from 1 to (count of items of MyRange)
    set n to item i of MyRange
    if n is in list1 then
    set end of list1 to "Delete"
    else
    set end of list1 to n
    end if
    end repeat
    repeat with i from (count of items of list1) to 1 by -1
    set n to item i of list1
    if n = "Delete" then remove row i
    end repeat
    remove column z
    end tell
    end tell
    Let me know how it works for y'all, it worked good on my machine, but I know localization is causing errors sometimes when I post things.
    Thanks,
    Jason
    Message was edited by: jaxjason

    Hi jason
    I hope that with the added comments it will be clear.
    Ask if something is always opaque.
    set {current_Range, current_table, current_Sheet, current_Doc} to my getSelection()
    tell application "Numbers09"
    tell document current_Doc to tell sheet current_Sheet to tell table current_table
    set list1 to {}
    add column after column (count of columns)
    set z to (count of columns)
    repeat with j from 1 to (count of rows)
    set m to ""
    tell row j
    repeat with i from 1 to (z - 1)
    set m to m & value of cell i
    end repeat
    set value of cell z to m
    end tell
    end repeat
    set theRange to value of every cell of column z
    repeat with i from (count of items of theRange) to 1 by -1
    (* As I scan the table backwards (starting from the bottom row),
    I may remove a row immediately when I discover that it is a duplicate *)
    set n to item i of theRange
    if n is in list1 then
    remove row i
    else
    set end of list1 to n
    end if
    end repeat
    remove column z
    end tell
    end tell
    --=====
    on getSelection()
    local _, theRange, theTable, theSheet, theDoc, errMsg, errNum
    tell application "Numbers09" to tell document 1
    set theSheet to ""
    repeat with i from 1 to the count of sheets
    tell sheet i
    set x to the count of tables
    if x > 0 then
    repeat with y from 1 to x
    (* Open a trap to catch the selection range.
    The structure of this item
    «class
    can't be coerced as text.
    So, when the instruction (selection range of table y) as text
    receive 'missing value' it behaves correctly and the lup continue.
    But, when it receive THE true selection range, it generates an error
    whose message is errMsg and number is errNum.
    We grab them just after the on error instruction *)
    try
    (selection range of table y) as text
    on error errMsg number errNum (*
    As we reached THE selection range, we are here.
    We grab the errMsg here. In French it looks like:
    "Impossible de transformer «class
    The handler cuts it in pieces using quots as delimiters.
    item 1 (_) "Impossible de transformer «class » "
    item 2 (theRange) "A2:M25"
    item 3 (_) " of «class NmTb» "
    item 4 (theTable) "Tableau 1"
    item 5 (_) " of «class NmSh» "
    item 6 (theSheet) "Feuille 1"
    item 7 (_) " of document "
    item 8 (theDoc) "Sans titre"
    item 9 ( I drop it ) " of application "
    item 10 ( I drop it ) "Numbers"
    item 11 (I drop it ) " en type string."
    I grab these items in the list
    {_, theRange, _, theTable, _, theSheet, _, theDoc}
    Yes, underscore is a valid name of variable.
    I often uses it when I want to drop something.
    An alternate way would be to code:
    set ll to my decoupe(errMsg, quote)
    set theRange to item 2 of ll
    set theTable to item 4 of ll
    set theSheet to item 8 of ll
    set theDoc to item 10 of ll
    it works exactly the same but it's not so elegant.
    set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errMsg, quote)
    exit repeat (*
    as we grabbed the interesting datas, we exit the lup indexed by y.*)
    end try
    end repeat -- y
    if theSheet > "" then exit repeat (*
    If we are here after grabbing the datas, theSheet is not "" so we exit the lup indexed by i *)
    end if
    end tell -- sheet
    end repeat -- i
    (* We may arrive here with two kinds of results.
    if we grabbed a selection, theSheet is something like "Feuille 1"
    if we didn't grabbed a selection, theSheet is the "" defined on entry
    and we generate an error which is not trapped so it stops the program *)
    if theSheet = "" then error "No sheet has a selected table."
    end tell -- document
    (* Now, we send to the caller the interesting datas :
    theRange "A2:M25"
    theTable "Tableau 1"
    theSheet "Feuille 1"
    theDoc "Sans titre" *)
    return {theRange, theTable, theSheet, theDoc}
    end getSelection
    --=====
    on decoupe(t, d)
    local l
    set AppleScript's text item delimiters to d (*
    Cut the text t in pieces using d as delimiter *)
    set l to text items of t
    set AppleScript's text item delimiters to "" (*
    Resets the delimiters to the standard value. *)
    (* Send the list to the caller *)
    return l
    end decoupe
    --=====
    Have fun
    And if it's not clear enough, you may ask for more explanations.
    Yvan KOENIG (from FRANCE mardi 27 janvier 2009 21:49:19)

  • Remove duplicate holidays from calendar mac

    How do I remove duplicate holidays from calendar mac. I have iCloud and I have read that may be part of the problem, but I need help to remove duplicate holidays from calendar mac.
    Thanks

    If you have iCloud and another account like Gmail, you could be seeing holdays for each account. You need to deselect one of the holiday calendars.
    Do you see Holidays in the sidebar where Calendars are listed? If yes, uncheck.
    iCloud: About subscribed calendars - Apple Support

  • Choose From List Condition

    Dear Experts,
    i want to select Items in Sales Quotation Screen  which is from Particular Group, I'm using following code
    If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST And pVal.BeforeAction = True Then
                If pVal.FormTye = "149" And pVal.ItemUID = "38" And (pVal.ColUID = "1" Or pVal.ColUID = "3") Then
                    Try
                        oForm = SBO_Application.Forms.ActiveForm
                        Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent = pVal
                        Dim sCFL_ID As String = oCFLEvento.ChooseFromListUID
                        Dim oCFL As SAPbouiCOM.ChooseFromList = Nothing
                        oCFL = oForm.ChooseFromLists.Item(sCFL_ID)
                        oCons = Nothing
                        oCon = Nothing
                        oCons = oCFL.GetConditions()
                        oCon = oCons.Add()
                        oCon.Alias = "ItmsGrpCod"
                        oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                        oCon.CondVal = "100"
                        oCFL.SetConditions(oCons)
                    Catch ex As Exception
                        SBO_Application.MessageBox(ex.Message)
                    End Try
                End If
            End If
    First time  Its working fine. but i'm selecting the next time in next row or same row its not showing any item. it opens only empty Choose from list. what is the prblm
    Mathi

    The problem is that when this event is called again, the Conditions object still has the conditions from the last call :
    oConditions = oCFL.GetConditions();  // this has all the previous set conditions
    So the conditions set before are also taken into consideration. What you need to do is :
    oCFL.SetConditions(null);
    oConditions = oCFL.GetConditions();
    This way the Conditions object will be empty. There is no method to remove a Condition from a Conditions collection, so you have to make it null.

Maybe you are looking for

  • How to pass a hierarchy node variable value over OpenDocument?

    Hello, I have been unable to link to an instance with matching parameters with opendocument with hierarchy node variables. Has anyone attempted this or been successful? Please reference this post I had in the Web Intelligence forum.  sInstance=Param

  • How to create PO with ref to SO using BAPI_PO_CREATE1

    Hello Experts, I have to create a PO using Sales Order(approved in work flow, User status will be changed from ZBLK to ZAO) in my User exit userexit_save_document. BAPI_PO_CREATE1 can be used to create PO. But I need it with reference to Sales Order.

  • CS5 Bridge - Windows.  Can't delete old files

    I have no trouble deleting new files but have tried every method and old tif and psd files refuse to delete.  Can it be because files uploaded on CS3 can't be deleted using CS5?

  • Returing clause with select and insert

    Hi, I am trying to use the following query but its not working.I want to know whether this syntax is valid. Insert into t_name( , , ,) Select , , , from t_name2 Returing into , , , . There is only one row I am dealing with. Thanks a Lot !!! Edited by

  • HT4059 Why does my IBook goes missing when I try to look at the books from your stand?

    Every time I go toIBooks to buy I have trouble with IBooks which goes back to my books I have already bought, all I want is to find books I want to buy but it just goes back to my library and not to the store, if you look into my site I have about 13