cancel
Showing results for 
Search instead for 
Did you mean: 

Null record storing while save

Former Member
0 Kudos

Hi All,

Null record has being stored with our any record, when press add button in my Add-on user defined form. And some of the fields has to be set as mandatory. How it can be achieved.

I used the following code.

If (pVal.Before_Action = True) Then

If pVal.ItemUID = "1" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then

Dim oForm As SAPbouiCOM.Form

Dim oEdit As SAPbouiCOM.EditText

oForm = SBO_Application.Forms.Item(pVal.FormUID)

oEdit = oForm.Items.Item("txtdocno").Specific

If oEdit.Value = "" Or oEdit.Value = Nothing Then

'BubbleEvent = True

'oEdit.Active = True

'SBO_Application.SetStatusBarMessage("Customer Ref No cannot be blank")

Exit Sub

'Else

' BubbleEvent = False

End If

End If

End If

Kindly give me the solution please and it would be appreciated.

Thanks & Regards,

Venkatesan G.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

But the code above given is not works/controls the null record posting.

expecting the solution please.

Thanks & Regards,

Venkatesan G.

Former Member
0 Kudos

Hi ,

if pVal.ItemUID="1" and pVal.BeforeAction=True then

If Trim(oDBs.GetValue("U_operid", 0)).Equals("") = True Then

app.StatusBar.SetText("Operation ID should not be left empty!!!")

BubbleEvent=False

End If

If Trim(oDBs.GetValue("U_opername", 0)).Equals("") = True Then

app.StatusBar.SetText("Operation Description should not be left empty!!!")

BubbleEvent=False

End If

End if

Hope its help for you. Give me reward points.

Regards,

Suresh.G

Answers (0)