Form Mode validation
created Add-on Form using screen painter. in form update mode i want to make my document no fleld(user defined) to be non-editable(enabled=fasle) like normal SAP screens.i used the following code for that.
Select Case pVal.FormUID
Select Case pVal.Before_Action
If pVal.FormMode = "2" Then
OForm = sbo_application.Forms.Item("Frmuid")
OForm.Items.Item("Doc_No").Enabled = False
its working fine. but the event will trigger again and again until change in form mode.
i want to eliminate execution of statement once the docnumber field is set to Enabled = False in update mode.where i can add my code exactly?