We want to make a connection between SAP and ORACLE using the OLE interface library 'SAP.BAPI.1'.
When we make this call to the function 'SAP_CWdoAuto.DimAs':
declare
bapictrl SAPBAPIControlLib_CONSTANTS.SAPBAPIControl;
oboOrder SAPBAPIControlLib_CONSTANTS.z_CWdoAuto;
oheader SAPBAPIControlLib_CONSTANTS.z_CWdoAuto;
oreturn SAPBAPIControlLib_CONSTANTS.z_CWdoAuto;
oconnection SAPBAPIControlLib_CONSTANTS.SAPBAPIControl;
begin
-- crea el objeto OLE2 de tipo aplicación Outlook
bapictrl := ole2.create_obj('SAP.BAPI.1');
oconnection := SAP_CWDOAUTO.Connection(bapictrl);
ole2.invoke (oconnection, 'logon');
oboOrder := SAP_CWdoAuto.GetSAPObject (bapictrl,'MaintenanceNotific');
oheader := SAP_CWdoAuto.DimAs(bapictrl, oboOrder, 'CreateFromData', 'NotifHeader');
END;
we get the following error: 'FRM-40922:Se ha producido un error OLE: 0x80020005('The datatype of a PL/SQL local variable used to store a returned property value or a method return value did not match the Visual Basic datatype of the property or method return value.').
Any ideas? Do anybody know how to solution this?
Thank you,
Eduardo Cueto
-----------------------------------------------------------
Para llamar a una Bapi de SAP desde Oracle hemos utilizado la interface de bibliotecas OLE 'SAP.BAPI.1' al utilizar la función 'SAP_CWdoAuto.DimAs' asociada al interface se produce el siguiente error OLE
'FRM-40922:Se ha producido un error OLE: 0x80020005'
La causa de este error es
'The datatype of a PL/SQL local variable used to store a returned property value or a method return value did not match the Visual Basic datatype of the property or method return value.'
¿Cómo podemos solucionar este error?
El código de llamada de nuestro programa es el siguiente:
declare
bapictrl SAPBAPIControlLib_CONSTANTS.SAPBAPIControl;
oboOrder SAPBAPIControlLib_CONSTANTS.z_CWdoAuto;
oheader SAPBAPIControlLib_CONSTANTS.z_CWdoAuto;
oreturn SAPBAPIControlLib_CONSTANTS.z_CWdoAuto;
oconnection SAPBAPIControlLib_CONSTANTS.SAPBAPIControl;
begin
-- crea el objeto OLE2 de tipo aplicación Outlook
bapictrl := ole2.create_obj('SAP.BAPI.1');
oconnection := SAP_CWDOAUTO.Connection(bapictrl);
ole2.invoke (oconnection, 'logon');
oboOrder := SAP_CWdoAuto.GetSAPObject (bapictrl,'MaintenanceNotific');
oheader := SAP_CWdoAuto.DimAs(bapictrl, oboOrder, 'CreateFromData', 'NotifHeader');
END;
When we make this call to the function 'SAP_CWdoAuto.DimAs':
declare
bapictrl SAPBAPIControlLib_CONSTANTS.SAPBAPIControl;
oboOrder SAPBAPIControlLib_CONSTANTS.z_CWdoAuto;
oheader SAPBAPIControlLib_CONSTANTS.z_CWdoAuto;
oreturn SAPBAPIControlLib_CONSTANTS.z_CWdoAuto;
oconnection SAPBAPIControlLib_CONSTANTS.SAPBAPIControl;
begin
-- crea el objeto OLE2 de tipo aplicación Outlook
bapictrl := ole2.create_obj('SAP.BAPI.1');
oconnection := SAP_CWDOAUTO.Connection(bapictrl);
ole2.invoke (oconnection, 'logon');
oboOrder := SAP_CWdoAuto.GetSAPObject (bapictrl,'MaintenanceNotific');
oheader := SAP_CWdoAuto.DimAs(bapictrl, oboOrder, 'CreateFromData', 'NotifHeader');
END;
we get the following error: 'FRM-40922:Se ha producido un error OLE: 0x80020005('The datatype of a PL/SQL local variable used to store a returned property value or a method return value did not match the Visual Basic datatype of the property or method return value.').
Any ideas? Do anybody know how to solution this?
Thank you,
Eduardo Cueto
-----------------------------------------------------------
Para llamar a una Bapi de SAP desde Oracle hemos utilizado la interface de bibliotecas OLE 'SAP.BAPI.1' al utilizar la función 'SAP_CWdoAuto.DimAs' asociada al interface se produce el siguiente error OLE
'FRM-40922:Se ha producido un error OLE: 0x80020005'
La causa de este error es
'The datatype of a PL/SQL local variable used to store a returned property value or a method return value did not match the Visual Basic datatype of the property or method return value.'
¿Cómo podemos solucionar este error?
El código de llamada de nuestro programa es el siguiente:
declare
bapictrl SAPBAPIControlLib_CONSTANTS.SAPBAPIControl;
oboOrder SAPBAPIControlLib_CONSTANTS.z_CWdoAuto;
oheader SAPBAPIControlLib_CONSTANTS.z_CWdoAuto;
oreturn SAPBAPIControlLib_CONSTANTS.z_CWdoAuto;
oconnection SAPBAPIControlLib_CONSTANTS.SAPBAPIControl;
begin
-- crea el objeto OLE2 de tipo aplicación Outlook
bapictrl := ole2.create_obj('SAP.BAPI.1');
oconnection := SAP_CWDOAUTO.Connection(bapictrl);
ole2.invoke (oconnection, 'logon');
oboOrder := SAP_CWdoAuto.GetSAPObject (bapictrl,'MaintenanceNotific');
oheader := SAP_CWdoAuto.DimAs(bapictrl, oboOrder, 'CreateFromData', 'NotifHeader');
END;