Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem with Option Buttons and Event Handler

Hi, everybody

Please see the attached picture which summarizes my problem.

My code for the Event Handler is as foll:

Private Sub OnBeforeB_OKPressed(ByVal Source As Object, ByVal pVal As SAPbouiCOM.SBOItemEventArg, ByRef Bubble As Boolean)


        If O_CrRq.Selected = True And O_ToShp.Selected = True Then  

            If C_ToShip.Value <> "" Then     

            SBO_Application.MessageBox("OK! ")


                SBO_Application.MessageBox("Error! You have not selected a ship!")

            End If

        End If


My code is too lengthy to post here. So, I am not sure I have given you all the relevant information.

Also, I can expect only general answers, or hints to help me investigate further.


Any comments, or hints are most welcome



Former Member replied

Hi Leon,

I adise you to check the Linked DataSources values instead of using the Item Value.

For Exemple,

Instead of checking the Radio Button Value, check it's linked DataSource like That :

if oForm.DataSources.UserDataSources.Item("O_CrRq ").Value == 'Y' then.

You do that also for the Combobox Value :

Not String.IsNullOrEmpty(oForm.DataSources.UserDataSources.Item("C_ToShip").Value) 

Hope it helps


Mohamed BEGAA

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question