cancel
Showing results for 
Search instead for 
Did you mean: 

Connect Windows Forms With SAP B1

Former Member
0 Kudos

Hi All,

I can open and connect a new windows form in sap b1 through an new menu in SAP B1 through code. Now my query is that how do I make an exe and ard so that I can deploy/Start my program from Add-on Manager. I tried to make an ard and exe using the B1DE for VS2005, but after the ard and exe was generated I tried to register it in SAP B1 from Add-on Administration. It got registered successfully but when I tried to start the add-on from Add-on manger it gave me an error. Which files do i need to map while making the ard and exe file?

I also tried to make a windows based setup but could not run the application. It did not run and gave an error.

Pls help me out how to make an ard and exe of this application which is a window based with SAP interface which is integrated with SAP B1. Let me once again tell you that this vb.net project runs very well through code but I cannot deploy this application in SAP B1 either through setup or ard/exe.

Regards,

Murtaza.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks Jane,

My connection code was write but what i was doing is that i was calling the SetApplication Function on each and every Form Load of Windows Form. So this was Clashing internally. Now i just called it once and referenced it to other windows form, so it worked fine.

Anyways thanks a lot for your helpful tip.

Regards,

Murtaza

Former Member
0 Kudos

Dear Murtaza,

Please check if the add-on connection code is correct as following sample:



        Dim SboGuiApi As SAPbouiCOM.SboGuiApi
        Dim sConnectionString As String

        SboGuiApi = New SAPbouiCOM.SboGuiApi

        '// by following the steps specified above, the following
        '// statment should be suficient for either development or run mode

        sConnectionString = Environment.GetCommandLineArgs.GetValue(1)

        '// connect to a running SBO Application

        SboGuiApi.Connect(sConnectionString)

        '// get an initialized application object

        SBO_Application = SboGuiApi.GetApplication()

Best Regards

Jane Jing

Former Member
0 Kudos

Hi,

The Error Meassage has message Box with 3 button, Details, Continue, Quit.

On the main Error Message box you find the below details.

Error Heading = Microsoft .NET Framework

Unabled exception has occurred in your application. If you click Continue the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

The request lookup key was not found in any active activation

If i click the Details button the error in it is as below,

  • * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

                            • Exception Text **************

System.Runtime.InteropServices.COMException (0xFFFFE3E0): The requested lookup key was not found in any active activation context.

at SAPbouiCOM.SboGuiApiClass.Connect(String ConnectionStr)

at Align_QueryBuilder.SubMain.SetApplication()

at Align_QueryBuilder.frmQueryBuilder.frmQueryBuilder_Load(Object sender, EventArgs e)

at System.Windows.Forms.Form.OnLoad(EventArgs e)

at System.Windows.Forms.Form.OnCreateControl()

at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

at System.Windows.Forms.Control.CreateControl()

at System.Windows.Forms.Control.WmShowWindow(Message& m)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

at System.Windows.Forms.ContainerControl.WndProc(Message& m)

at System.Windows.Forms.Form.WmShowWindow(Message& m)

at System.Windows.Forms.Form.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

                            • Loaded Assemblies **************

mscorlib

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

-


Align_QueryBuilder

Assembly Version: 1.0.0.0

Win32 Version: 1.0.0.0

CodeBase: file:///C:/Program%20Files/SAP/SAP%20Business%20One/AddOns/ALI/Align_Query_Builder/Align_QueryBuilder.exe

-


System.Windows.Forms

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

-


System

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

-


System.Drawing

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

-


Interop.SAPbouiCOM

Assembly Version: 6.8.0.0

Win32 Version: 6.8.0.0

CodeBase: file:///C:/Program%20Files/SAP/SAP%20Business%20One/AddOns/ALI/Align_Query_Builder/Interop.SAPbouiCOM.DLL

-


Interop.SAPbobsCOM

Assembly Version: 2005.0.0.0

Win32 Version: 2005.0.0.0

CodeBase: file:///C:/Program%20Files/SAP/SAP%20Business%20One/AddOns/ALI/Align_Query_Builder/Interop.SAPbobsCOM.DLL

-


Microsoft.VisualBasic

Assembly Version: 8.0.0.0

Win32 Version: 8.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll

-


System.Xml

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

-


System.Configuration

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

-


                            • JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.

For example:

<configuration>

<system.windows.forms jitDebugging="true" />

</configuration>

When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.

  • * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

If I click Contiue the Windows form is displayed but I cannot add the data what I have written in my code.

Can you let me know why am I getting this message box with the Title u201CMicrosoft .NET Frameworku201D with these 3 buttons.

Pls help me out with this problem.

Regards,

Murtaza.

Former Member
0 Kudos

Dear Murtaza,

What error do you get?

Best Regards

Jane Jing