Skip to Content
author's profile photo Former Member
Former Member

exception Unable to cast COM object of type 'System.__ComObject'

Hi All,

I am getting this exception:

$exception

{"Unable to cast COM object of type 'System.__ComObject' to interface type '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: No such interface supported (Exception from HRESULT: 0x80004002

(E_NOINTERFACE))."}

System.Exception {System.InvalidCastException}

when I try to read the content of a UDF into a EditText object...

The UDF in SAP is Alphanumeric; in my code, I am trying to read it as:

SAPbouiCOM.EditText u_airline = (SAPbouiCOM.EditText)udfForm.Items.Item("U_Airline").Specific;

Also, I need to read some Date fields in SAP... Any hint how should I read them using DI?

TIA,

Leo

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2007 at 03:27 PM

    object must be ComboBox

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.