on 10-31-2008 6:40 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.