Skip to Content
author's profile photo
Former Member

Null record storing while save

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Posted on Sep 29, 2007 at 09:52 AM

    Hi

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

    expecting the solution please.

    Thanks & Regards,

    Venkatesan G.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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