cancel
Showing results for 
Search instead for 
Did you mean: 

how to Insert the value in oitm table

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Dear Varma,

Thanks a lot its working.normally in itemMaster if we select a particular Item Group. the code alone will go to oitm table.like wise i want to insert my combovalue (code alone) to oitm table.

Kindly help me in this regard.

With Regards

G.shankar Ganesh

Edited by: shankar ganesh on Oct 31, 2008 8:07 AM

Former Member
0 Kudos

hi,

use

oitem1.DisplayDesc = false

in the place of

oitem1.DisplayDesc = True

regards,

varma

Answers (1)

Answers (1)

Former Member
0 Kudos

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.