User Defined Field migration with long predelined list in DTW

Hi Expert,
The project is using 2007A PL30. Due to mapping to customer existing legacy system, there are UDF with a set of predefined value so that user can select from drop down list. The list is very long and description is more than 30 characters which we cannot make use of link table.
Any idea whether DTW can migrate this type of UDF rather than manually keying into UDF?
Regards
Tlhomas

Hi Thomas
Let's clarify your question first.Do you try to import the content of the drop down list?
Or you want to import the content of the UDF while importing other objects(ex:BP,Invoices)?
As DTW can only import the content of UDF into the system.It is not possible
to create/modify UDF themselves via DTW.
However,It is possible to create UDF via DIAPI,maybe you can try to import UDF
into system by coding a little addon.
Here is a sample code about how to create UDF via SDK.
Dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD
oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.
BoObjectTypes.oUserFields)
oUserFieldsMD.TableName = "OCRD"
oUserFieldsMD.Name = "BE_UserField1"
oUserFieldsMD.Description = "A user field"
oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Date
oUserFieldsMD.SubType = SAPbobsCOM.BoFldSubTypes.st_Time
oUserFieldsMD.Add()
End Sub
Regards,
Syn Qin
SAP Business One Forums Team
Edited by: Syn Qin on Nov 21, 2008 6:03 AM

Similar Messages

  • User-Defined Fields Window

    Hi All,
    I have one issue with the User-Defined Fields window of the ACTIVITY form.
    I had added some user defined fields (UDF) to the Activities so that the User-Defined Fields are displaying in a separate window just near to the Activity window with Type (-651). All the UDFs are bound to the table, "OCLG".
    I want to initialize the values in the User defined fields controls with a text when the form is loading.
    I had tried to do this using
    oForm.Datasources.DBDatasources.Item("OCLG").SetValue("U_CUST",0,"MyValue");When I executed this statement, i am getting HResult error.
    Then I tried this by using UserDataSources.
    The same error repeats.
    But the code with .Specific.String = NewVal is working fine.
    Can you please explain the scenarios that we are able to do it using .Specifc.String. Is this a true method for doing this?
    if not
    please tell me How can we do this using Datasources (DBDatasources/ UserDataSources),?
    Please Help.
    Thank you in Advance
    Anoop

    Anoop,
    when you have created UDF in master item data, the textbox you can see on left side of form (separate form) is bounded already to this field. You cannot rebound it (its system form).
    When you want to change the value, you must use specific.string or specific.value for that textbox (as you wrote), but the calcualted value will be stored into master table (change of udf will set formmode to update mode). If you dont need to update formmode, set the formmode by code to normal mode.
    hope it helps
    Petr

  • User Defined Field that gives the date output of the last price update.

    We would like to create a User Defined Field (UDF) with a Formatted Search (FMS) on the Item Master form that gives the date output of the last price update specifically the wholesale price.
    Last Price Update
    Pricelist 2 = Wholesale
    Is this feasible?
    If it is feasible what is the recommended approach?
    Current working UDF on Item Master.
    /* Date output is based on all the latest updates on the Item Master.*/
    select max(updatedate)
    from aitm
    where itemcode = $[oitm.itemcode]
    Resources that were helpful.
    1.(Note:1165947 - Tracking Item Price Changes.)
    2. Case 4-I6: Query on price updates. Mastering SQL Queries for SAP Business One By: Gordon Du

    Thank you Gordon,
    We are looking for the date output of the 'Last Price Update' based on 'Pricelist 2 = Wholesale' which is the challenge.
    These 2 are the parameters for the date output, I should have mentioned that in my original message.
    Last Price Update
    Pricelist 2 = Wholesale
    Per reading a bunch of other similar Forum Questions it looked like it is might not be possible to do. With there being no date on the AIT1 table and AITM.Updatedate is based on any and all updates not just last 'Last Price Update' and not sure how to use the loginstanc.
    Thanks,
    Vern

  • User defined fields in task list

    What is the significance of adding user defined fields in task list operation?

    Dear Maniaba
    We have used user fields in task list to capture quantity in terms of nos & its weight for each operation. This we used as a work around to capture the repair jobs quantity & tonnage. While mapping repair of a particular machine with out any reference to material(that is we have not created them as serialised material as in the case of refurbishment) we have created task list for its repair and user wanted to capture the quantity of repair (say how many & also its weight) so we have maintained the tonnage per 1 no in these fields. later when order is being created user selects the task list & changes the quantity field then we have developed report where we calculate the total tonnage of that job & also no of items repaired.
    Regards
    S P Behera

  • Use of user define field in Task list

    Hi,
    Please give the solution for the strange requirement of the client as:
    My client wants to define the operation for preventive maintenace in two parts like
    check temperature  :  45 deg celcius.
    check temperature should be like operation and rest what he has to check to be defined in other field  i.e. both should not be together.
    so i find the solution as user defined fields in the task list where i can define this second parameter.
    But the problem is that system is not proposing this second field in the preventive order, only operation field is proposed.
    Please suggest some solution, how can this requirement can be mapped.

    Both operations of the inspection lot will need to be completed at some point.  They are in the same lot so they belong together.  Both operations should be available to the user.  (Unless you used workcenters and security to limit users to specific workcenters).
    Once set up, it will only be available to new inspection lots.  Few things in SAP are retroactive.
    Craig

  • Binding a Check Box with a User Defined Field

    Hi everyone,
    i v created a user defined field (U_CheckPro)in the system table "OITM" with two values: Y for Yes and N for No. In relation to that i v also created a check box on the form "150" and would like to know how can i bind my checkbox with  my user defined field properly.
    The user would be than able to enable or disable the check box for each item (article). The user setting schould be than be active and valid in sbo-business logic, each time an item is selected. (for example in case of sales order ID 133, "OINV").
    Any helfpul hints? Samples would be welcome as well.
    Thanks and regards
    Alban

    > First of all you should remove the valid values
    > because checkboxes does not work with valid values...
    > Just give a default value.
    Hi Rasmus,
    thank you very much for your helpful hint. I guess my problem is solved by that - nevertheless here is my complete code sequence once again in case of possible errors.
    I would appreciate any additional suggestion for improvement of the same.
    Thanks and regards
    Alban
    >>>
    Private Sub AddItem()
            ' Test UserSource
            oForm.DataSources.UserDataSources.Add("U_CheckPro", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
            oItem = oForm.Items.Item("122")
            ' Adding a Static Text item
            oNewItem = oForm.Items.Add("StaticTxt2", SAPbouiCOM.BoFormItemTypes.it_STATIC)
            oNewItem.Left = oItem.Left + 20
            oNewItem.Width = 100
            oNewItem.Top = oItem.Top + 12
            oNewItem.Height = 25
            oNewItem.FromPane = oItem.FromPane
            oNewItem.ToPane = oItem.ToPane
            oNewItem.LinkTo = "CheckBox1"
            oStaticText = oNewItem.Specific
            oStaticText.Caption = "Test_Caption"
            ' Adding a Check Box item
            oNewItem = oForm.Items.Add("CheckBox1", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
            oNewItem.Left = oItem.Left
            oNewItem.Width = 20
            oNewItem.Top = oItem.Top + 15
            oNewItem.Height = 19
            oNewItem.FromPane = oItem.FromPane
            oNewItem.ToPane = oItem.ToPane
            oNewItem.DisplayDesc = False
            oCheckBox = oNewItem.Specific
            'binding check box to source
            oCheckBox.DataBind.SetBound(True, "OITM", "U_CheckPro")
        End Sub
    >>>

  • Problem Occurs when CFL is added with User defined field

    form-672-BOM
    item-3-datagrid
    U_EmpNo - user defined field column
    if i will give following codes under form load event will CFL bound with U_EmpNo
    or else plz suggest me with write codes
    oForm = SBO_Application.Forms.Item("672")
                oItem = oForm.Items.Item("3")
                oClmn = oItem.Specific
                oClmns = oClmn.Item("U_EmpNo")
                oClmns.DataSources.UserDataSources.Add("U_EmpNo", SAPbouiCOM.BoDataType.dt_SHORT_TEXT)
                MessageBox.Show("Did")
                AddChooseFromList()
                oClmns.DataBind.SetBound(True, "", "U_EmpNo")
                oClmns.ChooseFromListUID = "CFL1"
                oClmns.ChooseFromListAlias = "CardCode"

    hi

  • User defined fields in SC with searchhelp ?

    is it possible to link a searchhelp to user defined fields in a shoppincart ?
    I have already defined 2 fields in ZINCL_EEW_PD_ITEM_CSF which I can see and edit when I create a shoppincart, but for 1 field I would like to add a searchhelp which connects to the backend for retrieval of possible values. is this possible ?
    kind regards
    arthur de smidt

    Hi Arthur,
    Yes, this is possible
    Follow the below text in note 672960 User-defined fields 2
    ===
    Search results                                                           
    You have the option to see user-defined fields in the list of search     
    results. To specify them, use the following structures depending on the  
    document type:                                                                               
    Doc.type Set type Structure name                                  
           SC HEADER INCL_EEW_PD_SEARCH_HDR_CSF_SC                           
           SC ITEM INCL_EEW_PD_SEARCH_ITM_CSF_SC                             
           PO HEADER INCL_EEW_PD_SEARCH_HDR_CSF_PO                           
           PO ITEM INCL_EEW_PD_SEARCH_ITM_CSF_PO                             
           QUOT HEADER INCL_EEW_PD_SEARCH_HDR_CSF_QUT                        
           CONF HEADER INCL_EEW_PD_SEARCH_HDR_CSF_CNF                        
           INV HEADER INCL_EEW_PD_SEARCH_HDR_CSF_INV                                                                               
    Search criteria                                                          
    You can also use user-defined fields as search criteria. To do this, you 
    have to set fields XINPUT and XDISPLAY to 'X' in table ET_FIELDS for the 
    fields you want to use in BADI BBP_CUF_BADI_2 in method MODIFY_SCREEN.   
    The so                                                                   
    The fields defined this way are displayed if you choose the 'Extended    
    search' link.                                                            
    ===
    Also the below notes may help,
    752586     Customer fields in extended classic scenario             
    732112     CUF. Customer fields on item level disappear             
    728782     CUF. Account assignment fields disappear when openi      
    710474     CUF. User-defined fields on search screen                
    683684     CUF. Values are not transferred from input help          
    672960     User-defined fields 2                                    
    458591     User-defined fields: Preparation and use
    Kind Regards,
    Matthew

  • Display of document line items with user defined fields

    Hi all,
    I have created two user defined fields in CI_COBL structure and they are available on OBC4 screen. I maintained  optinal for entry in the screen layout. I posted one document with user defined fields and saved.
    Now the document is updated in BSEG table. I then display the document, and it display the doucment
    But when i double click on the one of the line items system gives an error that there is some problem in customising and entries missing in Table COBM.
    I checked OXK3 and see that in field information for user fields, it says entries maintained in table COBM.
    But still i couldnt display my line items in detail.
    Any solutions
    Thanks in advance
    Ram

    Yes your are looking at the correct sap note.
    Things look pretty straight forward in the notes documentation.
    1)Extend the VBKRED structure with the fields you want.
    2)Populate thse values in the user exit in program DBKMVF02 in FORM routine USER_EXIT_FUELLEN_XVBKRED.
    For extending a standard structure you need to create a zstructuree in se11 first and then append it to the standard structure.
    In your case you need to  extend VBKRED_EX1 structure rather than VBKRED.
    Regards,
    ravi

  • User defined field with Linked Table property

    Hi All,
    I know this has been posted several times but I cannot get this to work.  I am trying to add a user defined field and link it to a table. 
    I am getting the error "The field 'Related Table' should consist of 8 alphanumeric characters with no valid or default values " 
    Everything I check says that the code I am using is correct.  Is it possible the problem is that I am trying to connect to an SAP table instead of a user defined table.  Is it possible to link a user defined field to an SAP table?
    My code below:
                    oUserFieldsMD.TableName = "OITM"
                    oUserFieldsMD.Name = "SHP"
                    oUserFieldsMD.Description = "Must ship via"
                    oUserFieldsMD.LinkedTable = "OSHP"
                    oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha
                    oUserFieldsMD.SubType = SAPbobsCOM.BoFldSubTypes.st_None
                    oUserFieldsMD.EditSize = 8
                    oUserFieldsMD.Size = 8
                    oUserFieldsMD.Mandatory = SAPbobsCOM.BoYesNoEnum.tNO
    Thanks
    Karen

    Hello  Karen,
    you cannot link a userfield to a system table. it has to be link to a user table.
    oUserFieldsMD.LinkedTable = "OSHP"
    when you have error, just try to do it using the same value in the application. If you cannot do it, it means you cannot do it neither with the DI
    Sebastien

  • User Defined Field with Link Type

    Hi,
    I am trying to create a user defined field to allow users to attach word documents to Item Master Data.
    I have successfully created a User Defined Field under master data with Type: Data, Structure: Link.
    It appears in the Item Master Data as I would expect. My questions relates to how to use this field. The first time I click on the field, a file browser window appears where I can select a file. Once I select the file I want I click ok and the path to this file appears in the field. The next time that I click on the field the file will open in its respective application.
    My question is: How when the field already contains a path to a file do I change this path so it points to a different file.
    Any help I can get on this would be greatly appreciated.
    Thanks
    Brian

    Hi,
    If you hold down Ctrl on your keyboard and then double click in the link it will allow you to browse to a different file.
    Regards,
    Adrian

  • Formatted Search with user defined fields??

    Hai everyone,
    I know how to use the search.. I did like this...
    SELECT U_Discount FROM OITM WHERE ItemCode = $[$38.1.0]
    But now i want to know the other way...ie.
    SELECT U_TVal FROM OITM WHERE U_Tcode='??????'
    the where condition is to be like this -I have 2 user defined fields
    1. U_TCode
    2. U_TVal
    I want to select the U_TVal where the U_Tcode= ????
    HOW TO SPECIFY THE USER DEFINED FIELD HERE like  this one $ $38.1.0 ....or is there any other method??
    Thanks
    Vibin

    Its Same..I didnt try your way but i tried this
    select oNHand from OITW where ItemCode=$[RDR1.ItemCode]
    Here in sales order- when an item selected the Stock in different warehouse will be listed in quantity...
    Try that
    $[Tablename.FieldName]

  • User defined fields via DI-API

    I want to read user defined fields using the DI-API.
    The following code works but lists only UDFs defined for articles:
    SAPbobsCOM.Items item =
    (SAPbobsCOM.Items) GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);     
    int count = item.UserFields.Fields.Count;
    MessageBox.Show("count == "+anzahl.ToString(), "OK");
    for(int i=0; i<count; i++){
      MessageBox.Show("index == "+i.ToString(), "OK");
      MessageBox.Show("name == "+item.UserFields.Fields.Item(i).Name, "OK");
    If I try to list all UDFs defined in the system using the oUserFields object I get an exception when I assign the business object:
    try{
      SAPbobsCOM.UserFields ufd = (SAPbobsCOM.UserFields)
      GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields); // exception
      int count = ufd.Fields.Count;
    catch(System.Exception ex){
      MessageBox.Show("ex.ToString(), "OK");
    The exception says something like
    InvalidCastException: COM object of type 'System.__ComObject' can not casted into
    interface type SAPbobsCOM.UserFields
    Thank you for help,
    Frank Romeni

    Hi Vítor,
    thank you for the hint to UserFieldsMD - now the access works.
    You wanted to know what I am trying to do - let me explain the background even it is a bit complicated:
    I have to access a certain UDF defined for articles.
    To access this UDF I can't use a fixed index like e.g. '5' in
    item.UserFields.Fields.Item(5).Value
    because this index is 5 only on my local machine - it could be a different index on the target machine.
    I solved this in writing some sql-code to access table CUFD and to find the index of this UDF in CUFD.FieldID.
    But sometimes there is a problem when there are UDFs deleted from the database. It is possible that there are 'holes' between the FieldId of UDFs of one object, e.g.
    Initial entries in CUFD (Table, FieldId, Name  => code to access field):
    OITM 0 'myUDF1'   ==> item.UserFields.Fields.Item(0).Value
    OITM 1 'myUDF2'   ==> item.UserFields.Fields.Item(1).Value
    OITM 2 'myUDF3'   ==> item.UserFields.Fields.Item(2).Value
    After deletion of 'myUDF2':
    OITM 0 'myUDF1'
    OITM 2 'myUDF3'
    Now the access to 'myUDF2' with item.UserFields.Fields.Item(2).Value fails!
    You have to use index '1' in .Item(index) to access 'myUDF2' because this UDF is now the second UDF in the item object (zero based).
    After I realized this I didn't use the sql-code to get FieldID any longer and searched with a loop all existing indices and compared them with the name of my special UDF, e.g. (this code works as expected):
    public int getUDFIndex(string udfName){
      index = -1;
      for(int i=0; i<item.UserFields.Fields.Count; i++{
        if(item.UserFields.Fields.Item(i).Name == udfName){
          index = i;
          break;
      return index;
    Now I tried to make this method more general to find UDFs in any object - not only in item objects.
    This is the background I wanted to access SAPbobsCOM.UserFields for.
    The problem is that UserFieldsMD has no method like Item(index) as I used it in my example.
    Do you have an idea to solve the problem with the 'holes' between FieldId in the UFD-table CUFD?
    Frank Romeni

  • User Defined Field in Material master

    Hi Friends,
    Can we add any user defined fields in any views in  material master (preferably with F4 help)
    If so, please let me know how to do it and its impact.
    Regards
    Ram

    Hi Ramachandran,
    Of course. 
    1.  If there is an existing Material Class, use it, unless modifying that class interferes with existing business processes.  Otherwise create a new class using CL01.  Use class type 001.
    2.  Create a characteristic using CT04 that represents your new field.  The characteristic will be your new field name and the description will be the description.
    3.  Using CL02, assign the characteristic to the existing material class, or to the new one you just created in step 1.
    4.  If this is a new system, you will have to create user instructions as to how to maintain the field.  The field will exist in the Classification view of the Material master in MM01/02/03, and the contents can be edited just like any field.
    5.  If this is an existing system, you will have to populate this field in all of the existing material masters.  Depending on the size and complexity of data, you may have to create a Legacy System Migration Workbench (transaction LSMW) project to bring all the fields up to date.
    As far as F4 help, depends on where you want to see it.  Within the classification view of the material master, it is possible to establish a validation in CT04 that will require your users to pick from an established validation list when they select the F4 key.  If you want F4 help in other places, you should consult your ABAP'ers, who should be able to set this up for you.
    Impact of a new characteristic/class is zero.  Impact of adding a characteristic to an existing class is dependent on your current use of the existing classes.  Writing reports which use these data is a well understood technique within the ABAP community.  Although the field will not exist in MARA table, it can still give you the same functionality as if it did.
    I do not recommend that you add a field to MARA, even though this is possible.  Although hotpack upgrades will leave a customer generated MARA field alone, whatever functionality you create to use this new field will be endangered with every OSS note and every hotpack upgrade you install.  Since Characteristics and Classes are considered master data, SAP hotpacks pretty much leave them alone.
    Regards,
    DB49

  • Ceartion of User Defined Field in EXCHANGE RATE AND INDEXES

    Hi Experts,
                     I want to create  User Defined Field in EXCHANGE RATE AND INDEXES.But while creating the UDF from User Defined Field-Management unable to find the table for it.Write now My Client are using SAP B1 2007 Ptach-08.Is there any way out to create user defined field in EXCHANGE RATE AND INDEXES.
    Plz help me out on this issue.
    with regards,
    Pankaj K and Kamlesh N

    Pankaj,
    When you do the Manage User Fields area to define a UDF, all the possible areas where UDF's can be created in B1 is listed.  You would be able to create UDF's only on these.
    Suda

Maybe you are looking for