on 10-13-2008 12:58 PM
Hi ,
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
case "FormId"
Select Case pVal.Before_Action
case "true"
If pVal.FormMode = "2" Then
OForm = sbo_application.Forms.Item("Frmuid")
OForm.Items.Item("Doc_No").Enabled = False
End If
End Select
End Select
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?
regards,
Ganesh kl
hi
in the screen painter it self use editable=false for item which u want.
in the menu event for add menuUID and while form loading make item editable=true
and for the menus find,first record,last record,next record,previous record use editable=false
1.while opening the form if u r opening in add mode then make item editable=true
2. If (pVal.MenuUID = "1282") And (pVal.BeforeAction = False) Then 'Add mode
'make item editable=true
endif
3. If (pVal.MenuUID = "1281") And (pVal.BeforeAction = False) Then 'Find mode
'make item editable=false
endif
4.If ((pVal.MenuUID = "1288") Or (pVal.MenuUID = "1289") Or (pVal.MenuUID = "1290") Or (pVal.MenuUID = "1291")) And (pVal.BeforeAction = False) Then 'navigation mode
'make item editable=false
endif
hope this helps u
regards,
varma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi...
u want to avoid the repeated loop use this one
pVal.InnerEvent = False
Regards...
Billa 2007
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this...
Select Case pVal.FormUID
case "FormId"
Select Case pVal.Before_Action
case "true"
If pVal.FormMode = "2" Then
OForm = sbo_application.Forms.Item("Frmuid")
If OForm.Items.Item("Doc_No").Enabled = True Then
OForm.Items.Item("Doc_No").Enabled = False
End If
End If
End Select
End Select
Hope it helps
Vasu Natari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi vasu,
in your coding also for every item event of my form the following code will execute in update mode..
If pVal.FormMode = "2" Then
OForm = sbo_application.Forms.Item("Frmuid")
If OForm.Items.Item("Doc_No").Enabled = True Then
i thought of doing pVal.FormMode = "2" checking only once for every individual form until it closed.To avoid mulitiple time execution of above coding for other validations of my form also.
regards
ganesh k
User | Count |
---|---|
105 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
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.