Linking a User Defined Field in Items table

How to Link a User Defined Field in 'Item Master Data' table, to my own User Defined Table?
Example:
In Item Master Data table, I want to add 3 User Defined Fields, for e.g, Country, State and Region.
When the value of Country combo is changed, values loaded in State and Region combos should change automatically.
I'm storing the relationship between Country,State and Region in my own user defined table. I want to load the comboboxes with a query from that table.
Or, if there's no solution to the above problem:
when the Item Master data table is opened, can we launch our own form?
Is there a way to specify that?
Please reply me back.. I'm a beginner learning SAP.
With Thanks in advance,
Geetha
Key: Loading a user defined field through Query defined by us.

Geetha,
You should search this forum on user defined fields as you will find many posts that may assist you with your question.
HTH,
Eddy

Similar Messages

  • User Defined Fields/data items

    How can I add user defined fields on runtime in a pre-defined data blocks wiht the user defined attributes of data type, length and format masks.
    Ofcouse I should have those fields defined in DB first.
    Thanks for any help

    I have a similar need.
    I have a DB table that stores a list of questions and data types/sizes/usages of the answers required by the user of the form.
    In a multi-record database block, I currently list the questions, and supply a Text Item to capture the user's answers, and then provide validation code to check for the proper data type & number of characters.
    I would like to be able to use the data type/size/usage information that is stored with each question to create, at runtime, an appropriate item (numeric text item max length 3, or character drop-down list box, or character text item with an LOV, etc.) for each question record. In other words, one record could have a drop-down list box, while another record could have a numeric text item.
    I think that I can create separate fields for each type of item, and then enable/disable the fields when required, but this solution is less elegant than the programmatic solution that I desire.
    Is there a way to do this programmatically in Oracle Forms 6.0.5.0.2 for Windows, or with an OCX, or some other add-in? We do not have Oracle Applications in this group. Is there a way to get "FlexField" without having Oracle Applications?
    I agree that this is a normal requirement these days as administrator-type users (as opposed to data-entry end-users) of applications want to be able to dynamically customize the app for their usage.
    Oracle needs to address this issue by creating the ability in Forms/Reports to create customizable apps.
    Thank you in advance for any help you can provide.

  • User-defined field in existing table

    Hello,
    I would like to know if it is possible to add a user-defined field in an existing table.
    Actually, I would like to add a combobox with other types of partners than vendors, customers and leads and add a user-defined field in the OCRD table.
    Thank you
    Regards,
    Thibault

    Hello,
    Your answers help me a lot !
    My code is working, i.e. when I create a new BP and choose another type in my comboBox, the information is saved.
    When I search a BP who has this type, SAP find the good BP.
    But, I don't see where the data is stored, I don't see anything which make the difference between 2 BP with 2 different types in the OCRD table.
    So, where SAP can make the difference?
    Thank you
    Regards,
    Thibault
    Message was edited by: Thibault Romieu

  • 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 Fields on System Form

    Dear All,
                   I want to know that how much User Defined Fields can be added on a system form. My problem is that I am developing an add-on for the Item Master Data. And I have used a lot of User Defined Fields on Item Master Data Forms which contains table 'OITM'. Now if I am trying to add any extra User Defined fields in OITM Table, I am not able to do so. I am getting an error as  'Internal Error Occurred'. What can i do regarding this problem.?  Help me. It is something very important.
    Thanks and Regards

    Hi,
    There is theoretically no limit on the number of UDF for a table. there is however a maximum number of characters for a record in SQL Sever.
    As far as I know this is 4000 in SQL Server 2005 and older and 8000 in SQL Server 2008.
    pls check Microsoft for the exact numbers
    Regards
    Ad

  • Cannot remove user define fields

    Hi,
    I am trying to remove a user defined field (U_Prirev) in Table (OHEM) and am getting the following error:
    Ref count for this object in higher then 0. Error No -1120
    The code is as follows :
            Dim sRequete As String
            Dim errCode As Long
            Dim errMsg As String
            Dim IdField As Integer
            Dim oUFields As SAPbobsCOM.UserFieldsMD
            oUFields = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
            Dim oRecordSet As SAPbobsCOM.Recordset
            oRecordSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            sRequete = "SELECT FieldID FROM CUFD where TableId = '" & pNomTable & _
                       "' and AliasID = '" & pNomChamp & "'"
            oRecordSet.DoQuery(sRequete)
            If (oRecordSet.EoF = False) Then
               IdField = CType(oRecordSet.Fields.Item(0).Value, Integer))
                If (oUFields.GetByKey(pNomTable, IdField) = True) Then
                    If (oUFields.Remove() <> 0) Then
                        oCompany.GetLastError(errCode, errMsg)
                        Console.WriteLine("Erreur => Code = " & errCode.ToString + " Message = " + errMsg)
                    End If
                End If
            End If
                 System.Runtime.InteropServices.Marshal.ReleaseComObject(oUFields)
            oRecordSet = Nothing
        End Sub
    Anyone knows why i am getting this error.
    Thanks
    Laurent.

    Hi Laurent
    That error you are getting is the error that you get is when there is more than one instance of meta data object open. You see only one metedata object can be open at a time.....if it's higher than zero it means others are available. I see you have,
    System.Runtime.InteropServices.Marshal.ReleaseComObject(oUFields)
    oRecordSet = Nothing
    this is good and what closes the meta data object. But check that you have done this in previous funtions where you might of added other things.Also your recordset, close it before adding.....move oRecordSet = Nothing to before your Remove of the field. that has be the case for me before. Do it without the recordset as a test and you'll see it works.
    Hope it helps

  • User-Defined Fields and Form Settings

    I have a User-Defined Field in the table "OCLG" and I'd like to show it in the "Activities Overview for Business Partner - xxx" window.
    Is possibile to do that by the "Form Settings" window? Here I don't find U-D Fields. Is there a way to show them?
    Or is there an other solution?

    Hi,
    This report is hardcoded. You need to create your own report for it. Better by Crystal Report.
    Thanks,
    Gordon

  • User defined field:item master

    Hi,
    In item master data, I want to create a user defined field which is linked to an external table wherein the end-user can automatically upload new item master details into the sap appl frm an external table.

    Dear Ayesha,
    As far as I understand, what you would like to do is the following :
    1. A user adds some data into an external table.
    2. The user defined Field in SAP B1 is automatically updated with the data in the external table.
    If you would like to achieve the above, then I would suggest you to use one of the following methods :
    1. DTW to import the tables' content.
    2. Import/export option from Excel
    3. or an Addon created via the SDK.
    If I understood the issue incorrectly, please let me know.
    Regards
    Arshdeep

  • User defined field in SD and its link to Value field in COPA (??)

    Dear All,
    We have created one "Z" field i.e. user defined field and its in VBRP Table. This is a quantity field. to update the values in this field we have used an exit in sales and distribution module. Now, by defining this exit values are correctly populated in VPRP table on line item basis.
    Requirement here is we need to get this field in COPA, for same i have carried out the quantity field assignment to value field (KE4M).
    Even after this configuration profitability segment is not updated.
    Regards,
    Sayujya
    Edited by: sayu on Mar 15, 2010 10:13 AM

    In the past I did something similar and had to use function module EXIT_SAPLKEAB_001 in enhancement COPA0002 to populate the field.  To use this exit you'll first need to add a user exit id to your valuation strategy (transaction KE4U).  The help on the function module is pretty good, but if you run into a problem let me know.
    thanks,

  • Error -5002 when adding linked user defined field using DI API

    Hello,
    When I try to add a linked user defined field using DI API I get the error number -5002 with description:
    "The field 'Related Table' should consist of 8 alphanumeric characters with no valid or default values"
    I Get the error when I use the Add method.
    What is the solution for this problem? I use SBO 2005 A SP1 Patch 18
    The code I use is (.NET C# 2.0):
    SAPbobsCOM.IUserFieldsMD uf = (SAPbobsCOM.IUserFieldsMD)company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields);
    uf.Name = "S_BUCO";
    uf.TableName = "OPOR";
    uf.Type = SAPbobsCOM.BoFieldTypes.db_Memo;
    uf.SubType = SAPbobsCOM.BoFldSubTypes.st_Link;
    uf.LinkedTable = "S_BU";
    uf.Description = "Description";
    uf.Add()
    Regards,
    Jeffrey

    Hi Jeffrey,
    Your code above does not match the settings you are using in the UI. In particular, the type and subtype you are setting in code are not correct.
    To create the UDF via code, set the field types as follows:
    SAPbobsCOM.IUserFieldsMD uf = (SAPbobsCOM.IUserFieldsMD)company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields);
    uf.Name = "S_BUCO";
    uf.TableName = "OPOR";
    uf.Type = SAPbobsCOM.BoFieldTypes.db_Alpha;
    uf.EditSize = 8;
    uf.LinkedTable = "S_BU";
    uf.Description = "Description";
    uf.Add()
    There's no need to set the SubType property as you require a regular alphanumeric field.
    Kind Regards,
    Owen

  • 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

  • Linking the UDO of type document to user defined field

    I created the user defined field and i need to link the UDO of type document to that user defined field. How to link the UDO to user defined field.

    Dear
    do you mean to add a user defined field to an document type UDO? if this  is the case,
    1. create the UDT
    2. go to Tools-> customization tools->User Defined Fields-Management, expand User Tables, add the udf to the UDT
    3. register the UDT as UDO.
    best regards,
    xiaodan an

  • User Defined Field as a Link

    Hi All.
    I have an issue I need clearing up with.
    We have created a user defined field in the Item Master data..
    This field is a link to an image.
    the location/path is different from the default image folder specified under the genreal settings window.
    The picture does not appear when you click on the link in the user defined field, we have discovered that the folder give a permission denied message when trying to access it over the network.
    Could this be the reason the picture does not show?
    Thanks
    Jerusha

    You should have Full Permissions to the 'B1_SHR' folder in your Server, so that this problem will not occur.

  • User defined field that looks up a system table?

    I want to create a user defined field that looks up parts in the items table (i.e. OITM).
    I know I can use a formatted search and that works, but I don't want users to be able to edit the field after the item has been looked up and pasted into the field.
    In the user defined field menu, there doesn't seem to be a solution to this. The only solution I can think of is to create a user defined table and then move over the items, and then periodically have the table be updated from the master item table (OITM).
    Thoughts?

    Here is the stored procedure I wrote, but it doesn't seem to work:
    IF @transaction_type IN ('A', 'U') AND @Object_type = '97'
    BEGIN
    IF NOT EXISTS (SELECT T0.ItemCode, T1.U_Part FROM [dbo].[OITM] T0, [dbo].[OOPR] T1
    WHERE T0.ItemCode = T1.U_Part AND T1.DocEntry = @list_of_cols_val_tab_del)
        BEGIN
            SELECT @error = 1, @error_message = 'Testing'
        END
    END
    So basically, I have a UDF called U_Part in the Sales Opportunity form, which will have a formatted search to look up parts, but if a user changes the text to something else (which is possible because it's a basic text field), then this should look up what is in that UDF and check it against the Item Master and give an error if it doesn't exist. However it isn't doing anything.
    Any ideas?
    Edited by: Gary Rey on Jan 21, 2009 4:56 PM

  • 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

Maybe you are looking for