on 09-22-2008 2:55 PM
i have field like dd no and value is 1124 once we enter the value (1124)in data base next time when i enter the same ddno some duplicate message will show...
p do u have any function or code?
On which document will be the field dd?
If it will be on SAP documents, you can use transaction notification stored procedure for this blocking. When it is on your form, in event of adding document you must check the existing values in table and in case that the value is there already, block the event of adding document.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Private Function test_con(ByVal congNo As String) As Boolean
Dim RS As SAPbobsCOM.Recordset
Dim Bob As SAPbobsCOM.SBObob
Try
Bob = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge)
RS = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
RS.DoQuery("SELECT U_csNo FROM [@SM_OTPR] WHERE U_csNo ='" & congNo & "' ")
RS.MoveFirst()
Do While Not RS.EoF
congNo = RS.Fields.Item("U_csNo").Value
Return True
Loop
Catch ex As Exception
MessageBox.Show(ex.Message)
Return False
End Try
End Function
If (pVal.ItemUID = "CSno") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS) Then
Dim csno11 As String
Dim test As String
csno11 = oForm.Items.Item("ChlnVal").Specific.value
test = test_con(csno11)
If test = True Then
SBO_Application.MessageBox("21")
Else
SBO_Application.MessageBox("22")
End If
End If
End Sub
but when it is true SBO_Application.MessageBox("21")
is not showing........ anything wrong my code...
User | Count |
---|---|
94 | |
11 | |
9 | |
5 | |
3 | |
3 | |
3 | |
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.