Hello Please am new to developing addon for sap but am very good at using visual studio to developing apps but I need a simple code to validate a textbox item "SAPbouiCOM.EditText" using sap coding methodology for visual studio. Here is a sample code in normal vb.net and I want the same for sap.
Pls I also need a link where I can study online and get sample codes for SAP Microsoft Visual Studio since the concept is different from screen painter doe I have gone through sample SDK Codes bundled with SAP but the coding concept is different.
--------------------------------------------------------------------------------------------------------------------------
//// NORMAL VB.NET CODE
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
If txtFName.Text.Length = 0 Then
MsgBox("Please enter firstname.", MsgBoxStyle.Information, "System Message")
txtFName.Focus()
Return
Exit Sub
End If
End Sub
------------------------------------------------------------------------------------------------------------------------------
//// SAP CODE THAT I TRIED USING
Private Sub ebtnAdd_ClickBefore(ByVal sboObject As System.Object, ByVal pVal As SAPbouiCOM.SBOItemEventArg, ByRef BubbleEvent As System.Boolean) Handles ebtnAdd.ClickBefore
'Throw New System.NotImplementedException()
If pVal.FormUID = "Form1" And pVal.ItemUID = "btnAdd" And pVal.FormMode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
If Me.etxtFName.Value = "" Then
SBO_Application.StatusBar.SetText("Please enter firstname", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
End If
End If
End Sub