Skip to Content
author's profile photo Former Member
Former Member

how to Insert the value in oitm table

Dear Members,

In Item Master, i have created a combobox next to Price List through SDK. if i select a particular value in the combobox and click Add Button in itemMaster, the selected value has to go to oitm table. i dont want to put separate table for that.any body can help me in this regard.

Thanks in Advance

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 31, 2008 at 06:50 AM

    hi,

    for eg create a field in OITM table as UDF

    TOOLS >>> UserDefinedFields >>> Manage User Fields >>> Master Data >>> Items >>> Items

    create UDF Field so that a field UDF will be created in the table OITM (Table for ItemMaster).

    Use the Following Code in ItemEvent.

    If pVal.FormType = 150 pVal.BeforeAction = False And pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD Then

    Try

    Dim oitem As SAPbouiCOM.Item = SBO_Application.Forms.Item(pVal.FormUID).Items.Item("214")

    Dim oitem2 As SAPbouiCOM.Item = SBO_Application.Forms.Item(pVal.FormUID).Items.Item("107")

    Dim oitem1 As SAPbouiCOM.Item = SBO_Application.Forms.Item(pVal.FormUID).Items.Add("UserItem", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)

    oitem1.Left = oitem2.Left

    oitem1.Width = oitem2.Width

    oitem1.Top = oitem.Top

    oitem1.Height = oitem.Height

    oitem1.LinkTo = "215"

    oitem1.Visible = True

    oitem1.DisplayDesc = True

    Dim oCombo As SAPbouiCOM.ComboBox = oitem1.Specific

    oCombo.DataBind.SetBound(True, "OITM", "U_UDF")

    oCombo.ValidValues.Add("M", "M")

    oCombo.ValidValues.Add("L", "L")

    oCombo.ValidValues.Add("E", "E")

    Catch ex As Exception

    SBO_Application.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)

    End Try

    End If

    after binding UDF field to Combobox it adds to database automatically on clicking add.

    regards,

    varma

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 31, 2008 at 06:43 AM

    Create user field with valid values for OITM table and bind the combo you have to this field. Than it will be saved into OITM table.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.