cancel
Showing results for 
Search instead for 
Did you mean: 

checkbox value in service contract

Former Member
0 Kudos

I am unable to get the present value of the existing checkbox in the form of service contract.

I am using the following command however unsuccessfully

Dim oEditText As SAPbouiCOM.EditText

Dim FlagSegunda As String = ""

oEditText = oMktForm.Items.Item ("81"). Specific

FlagSegunda = oEditText.Value

When I use this parameter shows the error below

Unable to cast COM object of type 'System .__ ComObject' in type interface 'SAPbouiCOM.EditText'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{AE1C43FF-0F2B-4130-A0B7-40E38D5EC60E}' failed due to the following error: There is no support for this interface (Exception from HRESULT: 0x80004002 (E_NOINTERFACE) ).

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Resolved, following method used

Dim oEditFlag as CheckBox

Dim FlagSegunda as String = ""

If oEditFlag.Checked = True Then

                FlagSegunda = "Y"

            Else

                FlagSegunda = "N"

            End If

Answers (1)

Answers (1)

former_member185682
Active Contributor
0 Kudos

Hi Ted,

If the object that you need is a checkbox you should change the type EditText to CheckBox. Change the following line:

Dim oEditText As SAPbouiCOM.EditText


To:


Dim oEditText As SAPbouiCOM.CheckBox



Regards,

Diego