Hello All,

Greetings !!!

  1. Open Item Master Data Form in OK Mode
  2. Click On Foreign Name Field
  3. All Default UOM Group will be set as Manual Using the Following Code
Public Sub ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles GOD_Application.ItemEvent Select Case pVal.FormTypeEx Case "150" If pVal.ItemUID = "44" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK And pVal.BeforeAction = True Then Dim GOD_Rec As SAPbobsCOM.Recordset Dim GOD_Form As SAPbouiCOM.Form GOD_Rec = GOD_Main.GOD_Company.GetBusinessGODect(BoGODectTypes.BoRecordset) GOD_Rec.DoQuery("SELECT ItemCode FROM OITM WHERE UgpEntry  -1") For i As Integer = 1 To GOD_Rec.RecordCount Dim iRet As Long = 0 Dim strErr As String = "" Dim GOD_ItemMasterForm As SAPbouiCOM.Form Dim GOD_ComboBox As SAPbouiCOM.ComboBox GOD_ItemMasterForm = GOD_Main.GOD_Application.Forms.GetFormByTypeAndCount("150", 1) GOD_ItemMasterForm.Select() GOD_Main.GOD_Application.ActivateMenuItem("1281") GOD_ItemMasterForm.Items.Item("5").Specific.value = GOD_Rec.Fields.Item("ItemCode").Value GOD_ItemMasterForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular) GOD_ComboBox = GOD_ItemMasterForm.Items.Item("10002056").Specific GOD_ComboBox.Select("Manual", SAPbouiCOM.BoSearchKey.psk_ByDescription) GOD_ItemMasterForm.Update() GOD_Form = GOD_Main.GOD_Application.Forms.GetForm("0", pVal.FormTypeCount) GOD_Form.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular) System.Windows.Forms.SendKeys.SendWait("{ENTER}") If GOD_ItemMasterForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE Then GOD_ItemMasterForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular) End If GOD_Rec.MoveNext() Next End If End Select End Sub

 

Thanks and Regards,

Mahendrakumar

 

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !