on 11-07-2012 3:16 PM
hi
As i move from 1 record to another i want to display Employee ID value in a message box.
Thanks
Hi Sunny,
The best to do this is you catch the After Form Data Load event.
In this event, the screen is already populated with the data, so you can easily get the value from the Edit Text of ItemUID 33.
Do note that Form Data event has its own event handler method. Not the same as Item Event.
This event falls under this method :
Private Sub SBO_Application_FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.FormDataEvent
'Your codes here
End Sub
The logic is:
1. Catch After Form Data Load event.
2. Get the Edit Text of Item UID '33'
3. Get the value of this edittext and pop up the message box.
Try it out, if you have any problem let us know.
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Edy
I have written this , it displays first message but it is not going in If condition
Private Sub SBO_Application_FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.FormDataEvent
SBO_Application.MessageBox("in")
If ((BusinessObjectInfo.FormTypeEx = "60100" And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD) And (BusinessObjectInfo.Before_Action = True)) Then
oForm = Me.SBO_Application.Forms.GetForm(BusinessObjectInfo.FormType, BusinessObjectInfo.FormTypeCount)
SBO_Application.MessageBox(oForm.Items.Item("33").Specific.value.ToString())
SBO_Application.MessageBox("in")
endif
end sub
Thanks
Hi Sunny,
You missed a few things.
1. BusinessObjectInfo does not have BusinessObjectInfo.Before_Action property. Instead, use BusinessObjectInfo.BeforeAction.
2. You should catch it on BeforeAction = False.
3. BusinessObjectInfo does not have BusinessObjectInfo.FormTypeCount property. use this line instead :
oForm = Me.SBO_Application.Forms.Item(BusinessObjectInfo.FormUID)
The rest should be okay.
This is the complete code :
Private Sub SBO_Application_FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.FormDataEvent
SBO_Application.MessageBox("in")
If ((BusinessObjectInfo.FormTypeEx = "60100" And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD) And (BusinessObjectInfo.BeforeAction = False)) Then
Dim oForm As SAPbouiCOM.Form = Me.SBO_Application.Forms.Item(BusinessObjectInfo.FormUID)
SBO_Application.MessageBox(oForm.Items.Item("33").Specific.value.ToString())
SBO_Application.MessageBox("in")
End If
End Sub
Regards
Edy
Hi Sunny,
Can you post your code please?
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.