cancel
Showing results for 
Search instead for 
Did you mean: 

Show a Website in SAP B1

Former Member
0 Kudos
689

Hello Forum,

I'm looking for a possibility to show a website within SAP B1. I have done some web search and the only possibility I found is to use a .net Form and place a internet explorer control on it. (Or a Chrome or Firefox Control, if this web browsers are defnitly installed on the client machines)

For example this Coresuite Snippet: WebBrowser Control - auf Form? - coresuite customize - coresystems community

There is no Web Browser Control within SAP?

Thanks

Mark

Accepted Solutions (1)

Accepted Solutions (1)

maik_delly
Active Contributor
0 Kudos

Hi Mark,

you can use an activex control ( webbrowser ). You find an example in SDK samples or a lot of code samples in SCN ( search for activex ).

Also I have in mind that 9.1 has a built in webbrowser control ( never tried  it )

regards,

Maik

maik_delly
Active Contributor
0 Kudos

Here is a minimal working example :


SAPbouiCOM.Item oBrowser = UIAPIRawForm.Items.Add("browser", SAPbouiCOM.BoFormItemTypes.it_ACTIVE_X);

oBrowser.Top = 5;

oBrowser.Left = 5;

oBrowser.Width = UIAPIRawForm.Width - 10;

oBrowser.Height = UIAPIRawForm.Height - 10;

SAPbouiCOM.ActiveX oActive = ((SAPbouiCOM.ActiveX)(oBrowser.Specific));

oActive.ClassID = "Shell.Explorer.2";

SHDocVw.WebBrowser WebBrowserChen;

WebBrowserChen = ((SHDocVw.WebBrowser)(oActive.Object));

WebBrowserChen.Navigate2(@"http://localhost/index.html");

regards,

Maik

pedro_magueija
Active Contributor
0 Kudos

Hi Maik,

Yep, there is a "native" control in the 9.1 SDK:

SAPbouiCOM.Item oItem = oFirstForm.Items.Add("WebBrowser", SAPbouiCOM.BoFormItemTypes.it_WEB_BROWSER); 
oItem.Left = 20;
oItem.Top = 20;
oItem.Width = 200;
oItem.Height = 200;
SAPbouiCOM.WebBrowser oWebBrowser = (SAPbouiCOM.WebBrowser)oItem.Specific;
//Open the WebPage
oWebBrowser.Url = "www.sap.com"; 
//Open the local html
oWebBrowser.Url = @"C:\Users\Administrator\Desktop\Test.html";


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

maik_delly
Active Contributor
0 Kudos

Hi Pedro,

thank you very much.  This is very interesting for future projects.

regards,

Maik

Former Member
0 Kudos

Our customers still have SAP 9.0, and I'm stuck with this system. It would be a good idea if we upgrade one day. Thanks

Former Member
0 Kudos

Thanks for the Code Snipped, but we are still developing with 9.0.

maik_delly
Active Contributor
0 Kudos

Hi Mark,

the first snippet ( ActiveX) is working in all versions. Only the new WebBrowser control ( what Pedro showed ) is from 9.1.

regards,

Maik

Former Member
0 Kudos

Where can I find UIAPIRawForm? Its a property of a base form?

maik_delly
Active Contributor
0 Kudos

Hi Mark,

it is a regular SBO UI API form.

In this case it is the name given from SBO Studio VS Template.

regards,

Maik

Former Member
0 Kudos

Oh, my mistake. Thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mark,

Did you take the chance to check out the cockpit functionality, you could drop and resize a widget and then link that to a website?

Regards,

Paul Finneran (mod)

Former Member
0 Kudos

I will take a closer look to the widgets. Until this moment I havent worked with them.