BAPI CommitWork fails DCOM Connector

I have a VB program using BAPIs with the DCOM Connector. The BAPI object and session object are exported to an MTS
server machine. In the VB program I create a global oSession object and logon to R/3 at the form load event. In one function I instantiate the BAPI Object locally with Set oBO = oSession.CreateInstance("BOprogId"), and run some methods on the object that work fine and Set oBO = nothing at the end of the function.
In a followup function I instantiate the BO again locally with Set oBO = CreateInstance("BOprogid"), then do a change method on instance dependant object after doing oBO.InitKeys. The BAPI return is succesful, so I want to commit the change and issue an oSession.CommitWork. The DCOM connector monitor shows the last function is ABAP4_COMMIT_WORK but it remains in an active state there and the VB program gets a nonzero return: error> -2147023170, automation error The remote procedure call failed. I don't know why this happens. If I use oBO.CommitWork I get an error also: -2147467259 Object created in Session, so I assume if you instantiate an object with oSession.CreateInstance you have to commit changes using the Session object.
If I use Set oBO = CreateObject("BOprogId") and commit with oBO.Commit, it works without error. This is not practical since I need to enqueue the SAP object in the first function with oBO.Enqueue method before the user makes changes in the UI. When the user requests the update I invoke the change function, then oBO.Dequeue, then oSession.CommitWork.
Can you tell me why the commit fails, or what I may be doing wrong? Incedentanlly, the SAP object is sucessfully
changed. The change BAPI does not have a commit work, so my program must request it.
Please don't suggest using the dotNet Connector, this is not an option for this project.
Thank you.

Refer to this link
SAP Business One SDK Version 2005 [original link is broken]
Search here for sap software distribution center link
https://websmp203.sap-ag.de/~form/handler?_APP=00200682500000001943&_EVENT=SEARCH&HIDE=&SEARCH_SPAT=X&SEARCH_BPAT=X&SEARCH_CD=X&SEARCH_P=X&SEARCH_PV=X&SEARCH_C=X&SEARCH_CV=X&SEARCH_TA=&SEARCH_V=&HIDE_EXPERT_SEARCH=X&SEARCH_MAX_RESULT=20
Regds
Manohar

Similar Messages

  • BAPI CommitWork error DCOM Connector

    I have a VB program using BAPIs with the DCOM Connector. The BAPI object and session object are exported to an MTS
    server machine. In the VB program I create a global oSession object and logon to R/3 at the form load event. In one function I instantiate the BAPI Object locally with Set oBO = oSession.CreateInstance("BOprogId"), and run some methods on the object that work fine and Set oBO = nothing at the end of the function.
    In a followup function I instantiate the BO again locally with Set oBO = CreateInstance("BOprogid"), then do a change method on instance dependant object after doing oBO.InitKeys. The BAPI return is succesful, so I want to commit the change and issue an oSession.CommitWork. The DCOM connector monitor shows the last function is ABAP4_COMMIT_WORK but it remains in an active state there and the VB program gets a nonzero return: error> -2147023170, automation error The remote procedure call failed. I don't know why this happens.
    If I use oBO.CommitWork I get an error also: -2147467259 Object created in Session, so I assume if you instantiate an object with oSession.CreateInstance you have to commit
    changes using the Session object.
    If I use Set oBO = CreateObject("BOprogId") and commit with oBO.Commit, it works without error. This is not practical since I need to enqueue the SAP object in the first function with oBO.Enqueue method before the user makes changes in the UI. When the user requests the update I invoke the change function, then oBO.Dequeue, then oSession.CommitWork.
    Can you tell me why the commit fails, or what I may be doing wrong? Incedentanlly, the SAP object is sucessfully
    changed. The change BAPI does not have a commit work, so my program must request it.
    Please don't suggest using the dotNet Connector, this is not an option for this project.
    Thank you.

    Dear Rhonda,
    Which OS installed on your machine ? I fronted the same problem with windows 200 and windows server 2003.
    On windows 2000 you have to register: msado15.dll and msado15r.dll.
    On windows 2003 server you have to install MDAC 2.8 and the register those two files.
    If you still have problem feel free to email me.
    Good luck,
    Shay E

  • Error: SAP R/3 DCOM connector

    Hi.
    I kept receiving COM+ error(eventID 4786)for SAP R/3 DCOM connector:
    <i>"The system has called a custom component and that component has failed and generated an exception. This indicates a problem with the custom component. Notify the developer of this component that a failure has occurred and provide them with the information below.
    Component Prog ID:
    Server Application ID: {90C0B162-33A1-4638-BB05-EB38D7065E01}
    Server Application Instance ID:
    {DB8B9626-51C4-41D5-A200-09373CAD9ABC}
    Server Application Name: SAP R/3 DCOM Connector
    The serious nature of this error has caused the process to terminate.
    Exception: C0000005
    Address: 0x000AECEC
    Call Stack:
    ! + 0xAECEC
    OLEAUT32!DispCallFunc + 0x6D3
    CCADMIN! + 0x32AB
    OLEAUT32! + 0x7BF39
    OLEAUT32! + 0x7B1BD
    RPCRT4!NdrProxyFreeBuffer + 0xB5
    RPCRT4!CStdStubBuffer_Invoke + 0x82
    OLEAUT32!VarMonthName + 0xCF89
    ole32!StgGetIFillLockBytesOnFile + 0x10439
    ole32!StgGetIFillLockBytesOnFile + 0x103E3
    ole32!CoReleaseMarshalData + 0x7DC
    ole32!CoReleaseMarshalData + 0x701
    ole32!StgGetIFillLockBytesOnFile + 0x10319
    ole32!StgGetIFillLockBytesOnFile + 0x101C4
    ole32!StgGetIFillLockBytesOnFile + 0xFF1D
    RPCRT4!NdrGetTypeFlags + 0x1C9
    RPCRT4!NdrGetTypeFlags + 0x12E
    RPCRT4!NdrGetTypeFlags + 0x5A
    RPCRT4!CreateStubFromTypeInfo + 0x2E2
    RPCRT4!CreateStubFromTypeInfo + 0x323
    RPCRT4!NdrConformantArrayFree + 0x28B
    RPCRT4!I_RpcBCacheFree + 0x14C
    RPCRT4!I_RpcBCacheFree + 0x5EA
    RPCRT4!I_RpcBCacheFree + 0x403
    RPCRT4!I_RpcBCacheFree + 0x5D2
    kernel32!GetModuleFileNameA + 0x1B4
    "</i>
    and Application Error(EventID1000):
    <i>"Faulting application dllhost.exe, version 5.1.2600.2180, faulting module unknown, version 0.0.0.0, fault address 0x000aecec."</i>
    Besides, i had ErrorID "CALL_FUNCTION_REMOTE_ERROR" (ST22) when calling RFC.
    Does anyone know what's wrong?

    Hi,
    Is this what you are looking for?
    http://help.sap.com/saphelp_46c/helpdata/de/ae/409e36cf0ecb7de10000009b38f889/frameset.htm
    Regards
    Vijaya

  • When using the DCOM connector to build component dll,Error ...

    When ussing the DCOM connector to build component dll,
    i get an error massage saying.
    "Nmake in Project directory failed. A detailed description of the error can be found in C:\Documents and Settings\CTHuang0\My Documents\Lib2\SAPInterface.log "
    and the error massage log note as below
    PS :I have installed VC6.0
    well...thanks for your respond
    C:\Documents and Settings\CTHuang0\My Documents\Lib2>CALL "C:\Program Files\Microsoft Visual Studio\VC98\bin\vcvars32.bat"
    Setting environment for using Microsoft Visual C++ tools.
    Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
    Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
         midl.exe /Oicf /h "SAPInterface.h" /iid "SAPInterface_i.c" "SAPInterface.idl"
    Microsoft (R) MIDL Compiler Version 5.01.0164 
    Copyright (c) Microsoft Corp 1991-1997. All rights reserved.
    Processing .\SAPInterface.idl
    SAPInterface.idl
    Processing C:\PROGRA1\MICROS3\VC98\INCLUDE\oaidl.idl
    oaidl.idl
    Processing C:\PROGRA1\MICROS3\VC98\INCLUDE\objidl.idl
    objidl.idl
    Processing C:\PROGRA1\MICROS3\VC98\INCLUDE\unknwn.idl
    unknwn.idl
    Processing C:\PROGRA1\MICROS3\VC98\INCLUDE\wtypes.idl
    wtypes.idl
    Processing C:\PROGRA1\MICROS3\VC98\INCLUDE\ocidl.idl
    ocidl.idl
    Processing C:\PROGRA1\MICROS3\VC98\INCLUDE\oleidl.idl
    oleidl.idl
    Processing C:\PROGRA1\MICROS3\VC98\INCLUDE\servprov.idl
    servprov.idl
    Processing C:\PROGRA1\MICROS3\VC98\INCLUDE\urlmon.idl
    urlmon.idl
    Processing C:\PROGRA1\MICROS3\VC98\INCLUDE\msxml.idl
    msxml.idl
    Processing C:\Program Files\SAPpc\SAPGUI\rfcsdk\include\sapconn.idl
    sapconn.idl
         rc.exe /l 0x407 /fo "SAPInterface.res" /d "NDEBUG" "SAPInterface.rc"
         cl.exe /nologo /GX /MD /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_ATL_DLL" /FD /c /Fp"SAPInterface.pch" /Yc"SAPInterfaceAfx.h" SAPInterfaceAfx.cpp
    SAPInterfaceAfx.cpp
    ztsd0005.h(227) : error C2059: syntax error : 'constant'
    ztsd0005.h(228) : error C2143: syntax error : missing ';' before '}'
    zssd0021_atp.h(53) : error C2059: syntax error : 'constant'
    zssd0021_atp.h(54) : error C2146: syntax error : missing ';' before identifier 'rfc_padd_4_4bperC'
    zssd0021_atp.h(54) : error C2059: syntax error : 'constant'

    Still having the same problem. Ever the optimist, I submit the following info.
    Error window screenshot can be found here: https://dl.dropboxusercontent.com/u/22465174/safari/safari_fail_01.JPG
    Enent log entry can be found here: https://dl.dropboxusercontent.com/u/22465174/safari/safari_fail_02.txt
    Version info can be found here: https://dl.dropboxusercontent.com/u/22465174/safari/safari_fail_03.JPG

  • Sdk dcom connector

    Hi,
    As anyone used the sdk dcom connector? Can i call sap rfc's from a .net application, or just bapi's? Where can i get the sdk dcom component (download site, cd,...). Thanks in advance,
    Pedro Castro

    Refer to this link
    SAP Business One SDK Version 2005 [original link is broken]
    Search here for sap software distribution center link
    https://websmp203.sap-ag.de/~form/handler?_APP=00200682500000001943&_EVENT=SEARCH&HIDE=&SEARCH_SPAT=X&SEARCH_BPAT=X&SEARCH_CD=X&SEARCH_P=X&SEARCH_PV=X&SEARCH_C=X&SEARCH_CV=X&SEARCH_TA=&SEARCH_V=&HIDE_EXPERT_SEARCH=X&SEARCH_MAX_RESULT=20
    Regds
    Manohar

  • DCOM Connector for SAP SAP 5.x

    Does any one know that the DCOM Connector works with SAP 5.x for BAPI calls? Or SAP 5 only works with .Net Connector?
    Regards,
    Jingmin Wei

    I've answered to this question in the thread:
    SAP DCOM Connector Download
    Check it.

  • Call RFC with DLL created with DCOM CONNECTOR

    I try to call a RFC with a DLL that i created with the SAP R/3 DCOM CONNECTOR (Release 4.5.B):
    My external soft calls the DLL, which calls the RFC, which calls a transaction (Call Transaction Mode N, Update S)...
    When i test the RFC in SAP (SE37), it's OK.
    But when i call the RFC with my soft (and with the DLL), the Call Transaction returns sy-subrc = 1.001 (the methode "AdviseRfcGuiSink" included in the DLL allows me to launch the debugging with my external soft).
    I found no SAP notes about this problem.
    If you met the same problem, could you help me ?
    Thanks.
    Julien.

    Some Years later I have the same Problem.
    As discripet in the post before - first I've got an error in the Method "CreateNewRow()" where the Method wants to return "return new byte[]()". Well I don't know why the .Net-Connector creates that code - but it looks strange to me.
    The origin Code is:
        /// <summary>
        /// Creates an empty new row of type byte[].
        /// </summary>
        /// <returns>The newbyte[].</returns>
           public override object CreateNewRow()
                return new byte[]();;
    With Changing that method I've got the same Error as in the post before:
    System exception thrown while marshaling RFCTYPE_XMLDATAto .NET type.
    Does someone has found a solution for that kind of Problem?

  • DCOM connector: could not load dll

    When I want to add a dll file (created with DCOM connector) to the component services, I get an error 'could not load dll, check to make sure all application runtime files are present etc'.
    This only occurs with a dll created on another machine (but with all the same settings; user, rfc's, etc).
    Anyone can please help me? This is quite urgent :o(

    Hi,
    Can I ask where you found the SAP DCOM connector?  I cannot seem to find it anywhere on the internet
    If you could help me / send the dcom files to me I would be much apprecaited
    Thanks
    Stu

  • ASP DCOM CONNECTOR XI

    I all,
    We've an ASP application wich uses a DCOM Connector to call SAP R/3 RFCs (in a synchronous way, and receiving parameters). We need to use XI instead DCOM Connector for the communication with R/3.
    How can we do this? Do we need first to migrate our ASP application to an ASP.NET application and use the .NET CONNECTOR to communicate with XI?
    Is it possible to call RFCs in a synchronous way and receive parameters back to the web application using XI?
    regards,
    Mario Cristóbal

    Hi,
    Can I ask where you found the SAP DCOM connector?  I cannot seem to find it anywhere on the internet
    If you could help me / send the dcom files to me I would be much apprecaited
    Thanks
    stu

  • SAP DCOM Connector message wrong codepage

    Hi!
    I need help.
    I've got RFC module that executing report through submit.
    Report is generating error messages. When I'm trying to call RFC module through SAP DCOM Connector, I'm always get message text with wrong codepage. Than I'm saying wrong code page, I mean sap server iternal code page, not a windows code page. Any other data transfer works fine with correct windows code page.
    SAP code page is 1500.
    Windows code page is 1504.
    Do you have any solutions?

    I'm using SAP DCOM Connector Version 6.20(english). I don't know where I can get russian version of this product. It seems there is no such one. I don't really know who wrong or right, maybe SAP or DCOM software, because in trace log of DCOM connector I've got something like this:
    >>>>         RFC MESSAGE/ERROR : 104
    RFC_ERROR_SYSTEM_FAILURE
    ³àãßßþÒþÙ ßþØáÚ ÝÕ àÐ×àÕèÕÝ.
    >>>> rfccoctx:985  closing RFC connection (context 016B6708)
    >>>>     FREE abrfcio.c 3253 (26582468)
      -{4A8EB0A1-4D42-44C0-8F2D-1B359DAE74CC}
    Trace file opened at 20050727 132222 Russian Dayligh, SAP-REL 620,0,480 RFC-VER 3 525755 MT-SL
    >>>> rfccopar:100  End Function ( Parameter FILESIZE: Type 8 Length 4 Variant 16387 Req. Vartype 16387 ).
    >>>> rfccopar:100  End Function ( Parameter HTML: Type 5 Length 255 Variant 16393 Req. Vartype 9 ).
    >>>> rfccopar:100  End Function ( Parameter PAR: Type 5 Length 286 Variant 9 Req. Vartype 9 ).
    >>>> rfccopar:100  End Function ( Parameter PDF: Type 5 Length 134 Variant 16393 Req. Vartype 9 ).
    >>>> rfccopar:100  End Function ( Parameter RETURN: Type 5 Length 548 Variant 16393 Req. Vartype 9 ).
    >>>> rfccoctx:1077 SetAbort (context 016B6708)
    sapmtx.h:1273 Error code 0x80004004 ().
    >>>> rfccoctx:720  return to dispenser (context 016B6708)
    >>>> rfccosrc:184  Dispenser: returning resource 016B6718 ...
    >>>> rfccosrc:195  Dispenser: resource 016B670C broken ...
    >>>> rfccoctx:1029 releasing resource (context 016B6708)
    Text of error message we have here in wrong code page(SAP internal-1500), then other text from SAP in correct code page(1504). How to force DCOM software to use correct code page for FREE messages?

  • Error when building object with DCOM Connector

    Hello everybody,
    I'm new to SAP programming so please forgive my ignorance...
    We are trying to build a com object to call some RFC-functions from a VB 6 application. We use DCOM Connector V6.2, I have MS Visual C++ 6.0 installed, unfortunately I don't know the R/3 version of our client.
    Every time I click the button "Build Component DLL", the following message appears: "cannot read value of registry entry software\sap\mts\proxygenerator\additionalincludedirs"
    This registry entry exists, so I don't know, whats wrong. I run DCOM Connector on Win XP, IE 6. I also tried on a Windows 2000 system, with the same error message.
    I hope you can help me, I searched a long time on the forums and didn't find anything.

    Obviously my question did not get to much interest. Luckily I found out the answer myself.
    The message from the component builder results from this registry key beeing empty. For some reason the SAP GUI installation routine did not fill it out. I then found that by inserting whatever value into that key, the compilation started and hung with another error (file mkenv.inc not found). After surching for that file I found it was installed in C:\Programme\SAP\FrontEnd\SAPgui\rfcsdk\include
    So, bingo, the empty registry value "software\sap\mts\proxygenerator\additionalincludedirs" must be filled "C:\Programme\SAP\FrontEnd\SAPgui\rfcsdk\include" or what corresponds to your installation and it works. At least the component dll was built, I have to test now if it is running correctly...

  • Where can I find the DCOM Connector Logon Component?

    Hello,
    I successfully installed the DCOM Connector (from CD SAP GUI for windows 6.20).
    But where can I find the Logon Component?
    As far as I understand the online documentation, this component is based on, but not included in the DCOM Connector.
    (I have used the Logon Control ocx, but need some features of the newer Logon Component.)
    <b>Yes, I know, it is outdated</b> and no longer supported by SAP, but I really need it.
    Where on CD or online can I find it?
    Thanks for any hint!
    Regards
    Steffi

    Dear Steffi,
    Kindly let us know, for what exactly U required the connector compo.
    Regards,
    Shaibaz

  • SAP DCOM Connector

    Hello All,
    Is it possible to use DCOM connector technique to make data available in MS Excel from SAP ECC6.0 without going to SAP GUI? I know it was possible in older versions, but I am not sure about ECC 6.0 as now Duet Add-on is introduced.
    Thanks and regards,
    Chishre

    Hi chishre,
    You cans till use DCOM connector to upload data into the Excel with the higher versions. However, it is advisable to go with Duet since it has been integrated with SAP Higher versions and SAP made data download and upload easy for the SAP User through this functionality.
    Hope this helps.
    Thanks,
    Naga

  • SAP DCOM Connector on Windows Server 2008

    Does anybody know, if it is possible to use the "old" SAP DCOM Connector on a Windows Server 2008 ?
    I want to migrate an old ASP Web Solution with DCOM Connection to SAP from Windows 2003 Server to Windows 2008 Server.
    When I try to install the DCOM Connector I get the Error Message:
    "Setup could not find ActivX(R) Data Objects verion 2.5 or higher on your computer...."
    That is strange, because ADO is there under C:\Program Files\Common Files\System\ado !
    Thanks in advance for your help !

    This forum is dedicated to all other development-related questions which are not directly addressed by other forums. This includes Business Objects SDKs, products, or technologies which do not fall under BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server, or Crystal Reports (for example Desktop Intelligence SDK, Universe Designer SDK, Portal Integration Kits, Java User Function Libraries, and other third party technologies or development languages).
    I think, you'll have better luck getting an answer in one of the SAP product forums.
    Ludek

  • DCOM Connector used by C++ client

    Hello,
    I am looking for some samples on using a DCOM Connector proxy from C++ client.
    Thanks

    Hisham <[email protected]> wrote:
              > Hi, I've read ... that one can do JMS from a C/C++ client by
              > using a servlet.
              Sure, it's possible. There's other ways, too.
              Hisham <[email protected]> wrote:
              > I am not too familiar with C network programming, so
              > can anyone here provide some guidance or pointers for implementing
              > this C client.
              I like that "pointers" pun! Seriously, you may want to get involved
              with learning the basic of C/C++ network (socket) programming before
              attempting to implement this client.
              Hisham <[email protected]> wrote:
              > What libraries should be used? I would prefer to use
              > the https protocol. Any online references or sample code is
              > appreciated!!
              Here's something that I've heard was quite nice: JMS Courier (I think
              they're at release 1.1 these days). It works on both Solaris and
              Windows platforms. Basically, it's a big C++ class library. The
              concept is simple -- the C++ bindings access Java, thus providing all
              the cool JMS functionality for you C++ application.
              Let me know how it goes...
              Brian J. Mitchell
              BEA Systems Administrator
              TRX
              Atlanta, GA
              email: [email protected]
              office: 404-327-7238
              mobile: 678-283-6530
              

Maybe you are looking for