CFL in UDO problem!

Hello every body
i am newbie in SAP BUSINESS ONE and my question is simple: how can I add choose from list in text field to choose a business partner .I can't find a clear answer please helpppp.

hi,
To add choose from list to your form please review the following link :
http://wiki.scn.sap.com/wiki/display/B1/SAP+BusineUsing+Choose+from+List
After added the CFL to your form, do the following in item event:
Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
                        Dim cfl As SAPbouiCOM.ChooseFromListEvent
                        Dim dt As SAPbouiCOM.DataTable
                        cfl = pVal
                        dt = cfl.SelectedObjects
                        If Not (dt Is Nothing) Then
                               Try
                                    objform.DataSources.UserDataSources.Item("UD_2").ValueEx = dt.GetValue("CardName", 0)
                                Catch ex As Exception
                                End Try
                                objform.DataSources.UserDataSources.Item("UD_1").ValueEx = dt.GetValue("CardCode", 0)
                         End If
Note: If you are using user data source in alies, the above code should work.

Similar Messages

  • CFL for UDO problem

    Hi all,
    I have made one form for operation master.
    I try to use this UDO as a CFL in another form call router.
    I am trying to add CFL on the Matrix field in the Router form.
    CFL is added perfectly. But when I try to press the tab on the Field. I got the following error.
    Internal Error(-1003) occured Message [131-183]
    I have checked the User define table and UDO length is less than eight character.
    Kindly give me the solutions for the same.
    Regards,
    Gunjan Shukla.

    Hi,
    There are a couple of reason why you're getting that error, but the most probable is that the CFL conditions are not correctly defined OR the ChooseFromListAlias is pointing to a field that does not exist. (example: You have ChooseFromListAlias = "U_Code" when it should be ChooseFromListAlias = "Code", or vice-versa).
    Regards,
    Vítor Vieira

  • Adding CFL for UDO generated form

    Hi I have created a form through Udo Form generator. i.e. UDO1(with Master Table=Users and master data rows table=OPDS)
    On other form made through screen painter, I want to add cfl for udo generated form(UDO1).
    Can anyone help me?

    You can set the CFL alias like this :
    oEditText.ChooseFromListAlias= "COLUMN_ID"
    I think this is how it's suppose to be - you set the CFL alias as the column id of the master data table ( whose values you want to be placed in the EditText) . The only problem is that it doesn't work - it  won't place the value automatically in the EditText.
    To make it work , you have to catch the CFL Event and put the value in the EditText manually. ( this is also covered in the CFL example in the sample files).

  • UDO Problem ( I am Using UDO's in my screen ......)

    Hi friends
    I am Using UDO in My screen (custom Screen Designed using Screen painter)
    My problem is  when i open screen it's open in ADD mode but i want to open in UPDATE Mode is there any way to open in update mode.
    One way is there to open screen in UPDATE Mode but it's not acting like System UPDATE Mode .
    Example
    We are Using OUD's Bydefault screen will open in ADD mode
    you can add record by pressing ADD Button Data will store in data base with out writing any code and UPDATE also Same like ADD Button .
    I want to open Screen in UPDATE Mode Please Help Me
    Is there any way to Display form in UPDATE Mode
    Urgent Please
    Thanks & Regards
    Naresh.K

    Naresh its very simple while load form change the mode to update
    v_Form.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
    If it helps reward points,
    Regards,
    Anitha

  • CFL to UDO

    Hi,
    I am trying to assign the  UDO to CFL. While i am trying to assess the CFL It will throw Internal Error
    oCFLCreationParams.MultiSelection = False
                oCFLCreationParams.ObjectType = "DSS_UDO1"
                oCFLCreationParams.UniqueID = "CFL6"
                oCFL = oCFLs.Add(oCFLCreationParams)
    oEdit = objForm.Items.Item("4").Specific
                oEdit.ChooseFromListUID = "CFL6"
                oEdit.ChooseFromListAlias = "U_BPProjec"
    i am using SAP 2007 A Patch 00.
    if anyone having solutions pls let me know.
    Thanks in advance
    Senthil Kumar

    Hi Senthil,
    Did you define the finding items in the UDO.if you didnt, when you open the CFL
    it will throws an error.
    First Go to Update the UDO.
    Give me reward points,
    Regards,
    G.Suresh

  • UDO problem

    Hi I've created a UDO of type Master Data. It has a header and rows. It works fine apart from one thing:
    When I find an existing entry and add a row to it, I press update and get the following error:
    "This entry already exists in the following tables (@SM_TEST1) (ODBC -2035)"
    Does anyone know why? It is important that I am able to update existing entries.
    Thanks

    Hi I've managed to get the UDO to work as Document. I'm having problems inserting the new record however.. this is my code
                SAPbouiCOM.DBDataSource oDS;
                oDS = Globals.SBO_Application.Forms.Item(FormUID).DataSources.DBDataSources.Item("@SM_test21");
                oDS.InsertRecord(oDS.Size);
                oDS.Offset = oDS.Size+1;
                oMatrix.AddRow(1, 0);

  • UDO Problem (I am Using UDO For My Custom Form.......)

    Hi   Friends
    I am Using UDO's For My Custom Form The Form Is Created using Screen Painter . In This Form Two Buttons One For OK and Another for Cancel  Button ID's Are 1 & 2. According to Form Mode The Button Caption is Changing. Second Button Caption is Always CANCEL. By Default form open with ADD Mode.But I want to OK MODE. or UPDATE MODE.
    My Main Quation is I Want to Open My Form in OK Mode or UPDATE Mode.
    Thanks & Regards
    Naresh.K

    It so simple Naresh,
            After loading xml file write the below code...
    oForm.Mode=SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
    If it helps give reward points,
    Regards,
    Anitha

  • SAP 2005-2007 UDO Problem

    Dear All,
    We had nearly 10 UDO with respective tables in SAP 2005. After up gradation from 2005 to 2007 all tables and UDO
    Successfully upgraded to 2007. All documents getting generated except one document.  Itu2019s asked for generating new numbering series.  But we are not able to generate numbering series for that document. All my add-ons tasks totally sopped because of that document. Any help / suggestion will be highly helpful to me.
    For ref: My UDO name: OISC document table: @ISCH document lines: @ISCR
    rgds,
    Ganesh.

    Hi ,
      Please go to ur table - see ur last Docnum - UDO table
    Again open NNM1 -Table Update NextDocnum = ur DocNUm + 1 w r to Ur UDO
    By
    Firos C

  • UDO...Adding records..grids problems...

    Hi all,
    i developed an UDO bounded to a custom B1 Form, which handles a couple of text fields bounded to user datafields.
    In this form there is also a grid bounded to a DataSource  which takes data from a query. The enabled property of the grid is off thus to only display tabular data.
    The problem is that when i click on new button (to add a new record) the grid becomes automatically cleared.
    The problem is the same if i use a matrix, always bounded to a DataSource , and also if it is bounded to userdatasources.
    Why this ? Is there a workaround ?
    Thanks in advance.
    Best regards.

    Hi Anoop,
    the question i posted is that i don't understand why UDO needs to clear all data in the form, instead to clear only data related to UDO. The grid in the form shows results from a query in another tables, not related with UDO.
    Plus the grid in readonly mode.
    I think it' s only an UDO problem, and SAP should provide the solution.
    Thanks for you answer.
    F.

  • How to popup form according to query by  CFL for user defined tables?

    Hi Experts!
    Please write a simple code for adding CFL in UDO and popup the window according to query. suppose i want to execute query
    "select code,name from [@WITM]". I want to add CFL in edittext which is on UDO. how can we add CFL in that Edittext by code.
    Thanking You
    vishwajit kumar

    Hi Vishwajit,
    Please response to your previous posting or close it first. Whatever the answer working or not, you need reply.
    Thanks,
    Gordon

  • CHOOSEFROMLIST FOR UDO

    Hello,
    please i wants to develop my own CFL for UDO,any suggestion or sample code to get it done.
    Thanks

    hi Ankit ,
    i have tried the choosefromlist sample but it gives me "Internal Error" when is mapped to my UDO ObjectType.
    sample code below
    Dim oCFLs As SAPbouiCOM.ChooseFromListCollectio
    oCFLs = oForm.ChooseFromLists
    Dim oCFL As SAPbouiCOM.ChooseFromList
    Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
    oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                oCFLCreationParams.MultiSelection = False
                oCFLCreationParams.ObjectType = "ER_DED"
                oCFLCreationParams.UniqueID = "CFL1"
                oCFL = oCFLs.Add(oCFLCreationParams)
    binding it to my UserDefinedField below
    oEdit.ChooseFromListAlias = "U_szCode"

  • Create Tables and UDO using Addon

    Hi,
    I created addon using simple installer. Before installing that add on i have manually create UDO and tables. is there any way i can modify my Addon which will create UDO and tables when i install addon in server.
    Developed my Add on using C#. for package using  B1DE Simple installer.
    Can some send me sample code for this at [email protected] or reply to this post your suggestions.
    Appreciate your help

    > UDO's are not accessable via code. 
    Hi Edward,
    but I created UDO via code and it works correctly.
    P Guddimath, here is a thread where I paste a code to create UDF, UDT and UDO Problem With Tables
    Regards,
    Hmg

  • Choose from list in find mode

    I have a form build in Screen painter and i have added a Choose from list to that form. I have asocieted the CFL with a EdiText. It work perfectly in add mode, but i cannot open the CFL when the form is in find mode.(I cannot even see the button to press for oppening the CFL). Can someone help me?

    I am in the phase of binding the edittext, comoboxes and other controls on my form. I want to search by parameters. For instance i want to find all the entrys from a business partener.
    I would like to know if I can choose from a list of business partener when i am in a find mode using CFL .
    My problem it is not when i click find button but when i complete the fields, how can i select a business partener from a list?

  • How to Use ChooseFromList with a DataBind Matrix

    Hi there,
    I get a problem with DataBind Matrix, I like to show CFL
    in one column in Matrix, the Matrix bind with a DBDataSource,when user press TAB Key in the cell that link with CFL, it show the CFL dialog, the problem is after user choose one row from CFL, I should fill the cell with the choose value, but the datasource do not content the new value, the CFL will show again, do I need add the new row to DB and Load data from datasource again, or have other better way to show CFL and fill the choose value as user input value?
    Thanks in advance!
    Lanjun Wang

    Hi Harshad,
         Try this......
    Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
                           If pVal.BeforeAction = False Then
                                Dim db1 As SAPbouiCOM.DBDataSource = frm.DataSources.DBDataSources.Item("@DetailTableName")
                                Dim mat As SAPbouiCOM.Matrix = frm.Items.Item("matMatrix").Specific
                                Dim cflevent As SAPbouiCOM.ChooseFromListEvent = pVal
                                Dim cfl As SAPbouiCOM.ChooseFromList
                                Dim a As String = cflevent.ChooseFromListUID
                                cfl = frm.ChooseFromLists.Item(a)
                                Dim dt As SAPbouiCOM.DataTable = cflevent.SelectedObjects
                                If Not (dt Is Nothing) Then
                                   If cfl.UniqueID = "ItemCFL" Then
                                        If pVal.Row = mat.VisualRowCount Then
                                            db1.Offset = db1.Size - 1
                                            db1.SetValue("U_ItemID", db1.Offset, "")
                                            db1.SetValue("U_ItemDesc", db1.Offset, "")
                                            mat.SetLineData(db1.Size)
                                            mat.FlushToDataSource()
                                        End If
                                        db1.SetValue("U_ItemID", db1.Offset, dt.GetValue(0, 0))
                                        db1.SetValue("U_ItemDesc", db1.Offset, dt.GetValue(1, 0))
                                        mat.SetLineData(pVal.Row)
                                        mat.FlushToDataSource()
                                    End If
                                End If
         End if

  • Problem with ChooseFromList on UDO

    Hi, I have a UDO form that works well except for one small issue.  I have an EditText that is tied to a field in the UDO table for the B1 Item Code.  This field saves, loads and navigates fine, but when adding a new UDO record, I need to have the user pop up a ChooseFromList to see a list of the B1 items.  The only problem is that this edit text is already bound to the UDO table/field and therefore the Choosefrom list isn't able to automatically populate the edit text like it normally would when the field is bound to a user datasource. 
    What is the preferred way to have a UDO field bound to an edit text box on the UDO to also work with a ChoosefromList?
    I just wanted to ask before I spend time programming a work-around to code the choosefromlist value into the edit text myself.
    Thanks!

    Hi Curtis,
    Have you tried to create a CFL and asign it to your edit text (linked to a DB Datasource)? I have tried it and it works fine, it works for UDS and also for DBDS.
        'Add EditText to the form for User Object
        oItem = oForm.Items.Add("EdTxtUO", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oItem.Left = 105
        oItem.Top = 50
        oItem.Width = 100
        oEdit = oItem.Specific
        'Link DBDS to EditText
        'oEdit.DataBind.SetBound(True, "", "ET_UDS_UO")
        Dim etDDSuo As SAPbouiCOM.DBDataSource
        etDDSuo = oForm.DataSources.DBDataSources.Add("@T_MD")
        oEdit.DataBind.SetBound(True, "@T_MD", "Code")
        ' Add ChooseFromList for EditText to the form
         oCFLCPuo = SB1_App.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
        oCFLCPuo.ObjectType = "TT_MD"
        oCFLCPuo.UniqueID = "UserObjectCFL"
        oCFLuo = oForm.ChooseFromLists.Add(oCFLCPuo)
        'Link CFL to EditText
        oEdit.ChooseFromListUID = "UserObjectCFL"
        oEdit.ChooseFromListAlias = "Code"
    Regards
    Trinidad.

Maybe you are looking for

  • DVI video switch for MB Pro

    I would like to watch movies and Netflix that a stream on my computer to my regular TV instead of my monitor. I was wondering if a product existed that allowed me to come out of the Computer (DVI) into a splitter or switch of some sort and then out t

  • Messages struck in Queue

    Hi , I am doing a IDoc to JDBC scenarios ,the number of IDoc hitting XI is huges.Most of them pass XI successfully and create records in XI.But some of them get stuck in Queue.I can see them in SMQ2.When I check them they are struck there with the er

  • Preview Problem for DSC 2.0 files in CS4

    I'm having problems getting a preview for a file created in Adbobe PSCS4. The file is a Multi-channel using spot colors. The file was created new by going from a blank RGB straight to Multi-channels and spot colors assigned to each channel with an ad

  • Exporting to OMF for audio and After effect + delay in performance question

    Hello I have two questions. First I have a problem with performance of FCP 5 I'm using a 500 GB firewire 800 external drive (not . Every time I hit the play button there is a delay of 2 seconds before playing my sequence I'm not sure why this is happ

  • Invoke Runbook Activity doesn't finish

    Hello, I have a Problem with the Invoke Runbook Activity, if I just test the Child Runbook manually it works fine but if I want to start it via the Parent Runbook it gets stucks and never finishes. Parten Runbook: Child Runbook: The Child Runbook is