Skip to Content
avatar image
Former Member

checkbox value in service contract

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) ).

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 21, 2015 at 12:04 PM

    Resolved, following method used

    Dim oEditFlag as CheckBox

    Dim FlagSegunda as String = ""

    If oEditFlag.Checked = True Then

                    FlagSegunda = "Y"

                Else

                    FlagSegunda = "N"

                End If

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 21, 2015 at 02:16 AM

    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

    Add comment
    10|10000 characters needed characters exceeded