Skip to Content
Author's profile photo Mostafa SHARAF

SAP Business One apps on SAP HANA [Sales-Kit Demo]

This Sales-Kit Demo is an SAP Business One apps, based on HANA. It is web based SAPUI5 Application, which runs on top of HANA XS Engine.

 

The B1 apps on HANA demonstrates mainly 5 business modules;

  • View Business Partners, with intelligent filters, interactive with GoogleMaps and side bar dashboards for Open Deliveries and Open Orders.
  • View Sales Opportunities “Won/Lost/Pipeline” by sales employees, in a tabular and graphical layout.
  • Smart Explorer of Sales Orders “by id, by country and by customer”, integrated with Google Maps for the order’s delivery.
  • Inventory Browser by warehouse code.
  • Dashboards that contain graphical dashboards like;
    • Sales Analysis by country via GoogleMaps, with aggregation and drilling down functionality.
    • Sales Analysis by country via Bubble Charting, with aggregation and drilling down functionality.
    • Top Business Partners by Balance.
    • Top Customer Groups by Net Sales.
    • Customers Balance vs Open Deliveries.
    • Sales Opportunities dashboard by status vs number of opportunities.
      • Drill down to number of sales by Sales Persons.
      • Drill down to potential amount by Sales Persons.
    • Sales Opportunities dashboard by status vs potential amount.
  • Cockpit that represent the SAP B1 Cockpit apps on HANA, built-in the SAP B1 Client, version for SAP HANA.

 

See how easy it is to embed an App into the SAP Business One client and finally demonstrate the integration capabilities between the App we have developed and the SAP Business One master data:

 

       

Please download the SAP Business One App’s package. The package contains the following;

  • The B1 apps Deployment Package, for the SAP Business One Client [lightweight extension]
  • The guide for how to import, deploy and consume this App in your HANA System.

 

The B1 App can be accessed via the SAP Business One Portal Page;

https://server-address:4300/sap/sbo/portal/?site=/B1AppDemo/WebContent/index.html

 

Troubleshooting for Sales-Kit Demo App:

 

Issue#1: The import of Delivery Unit ends with failure.

Reason#1: No SBODEMOUS DB. The default delivery unit of Sales Kit App is referring to SBODEMOUS.
Solution: Create a DB named SBODEMOUS from B1, or export a demo DB and recovery as SBODEMOUS with the SLD.

or backup and recover with SQL. Please find more details here: 2134959 – Schema Export and Import Guide for SAP Business One, version for SAP HANA

 

Reason#2: No execute/select/insert/update/delete privilege on SBODEMOUS

Solution: Grant execute/select/insert/update/delete privilege of SBODEMOUS with HANA Studio

=>Security=>Select the target user=>Object Privilege.

 

Reason#3: The company DB is not yet initialized for Analytics. Some views are dependent on the ETL_ tables created by the Analytics Initialisation.

Solution: Initialize the analytics for your B1 company schema with the Admin Console of SAP Business One Analytics

https://<<HANA_Server>>:40000/Enablement

 

Issue#2: After importing the delivery unit of Sales Kit App successfully, the app could be open with browser. But some page show with data, some doesn’t, for example, no BP data showed in the Business Partners page. These are most likely due to some views are not activated, so are the xsodata services based on these views.

 

Reason#1: Some views in /B1AppDemo/HANAViews are not activated properly, you can found the views as inactive with red icon in HANA Studio. Mostly likely attribute to the three issues listed above.

Solution: After resolved the import error above, and then import the Delivery Unit again. You can double check if all views in package /B1AppDemo/HANAViews activated.


Reason#2: Some xsodata services in /B1AppDemo/ODataService are not activated, due to its dependent views are not activated.

Solution: [recommended]After resolved the import error above, and then import the Delivery Unit again.

 

Alternatively, you can reactivate each odata service.xsodata with steps below.

In order for the app to run successfully please re-activate all the OData Services under the app’s folder “OData Services” ,as shown in the app guide. A reactivation can be just done by adding a new empty line or adding a space so then odata service.xsodata file becomes inactive, so then when you active it, the odata service will be finally activated.

 

It is a showcase that has been developed by the SAP Business One Solution Architects team, and is for demonstration purposes only. The mentioned SAP Business One App on HANA is restricted to our SAP Business One Partners.

 

Here you go, please let me know your feedback!

 

 

Assigned Tags

      49 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Mostafa,

      When I attempt to import the TGZ file I receive errors.

      Attached is the screenshot of the error.

      Is it possible to send the log files if required?

      The DB version is 1.00.74.03.392810 (NewDB100_REL)
      The studio version is 1.0.7403

      Please let me know if you need more information.

      ImportError.JPG

      Kind Regards,

      Nick Lakasas

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Hi Nick,

      I see that the import was successfull, but the Hana views failed to activate.

      what is your B1 Schema name? In the documentation I show how to rename the schema name in the HANA views and OData Services so then it can be activated successfullly.

      kindly,

      Mostafa

      Author's profile photo Former Member
      Former Member

      Thanks Mostafa,

      I did continue through the document and renamed the schema SBODEMOAU (The documentation said SBODEMODE, however it actually contained SBODEMOUS).

      Although, when I login via the web browser, I only get a blank screen.

      Just to confirm, it is after this step I get a blank screen.

      I have tried with Firefox and IE.

      AppLogin.JPG

      Kind Regards,

      Nick Lakasas

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Thanks for the feedback, I will adjust the DB name in the documentation to be "SBODEMOUS" as the default one.

      Please try the following address:

      https://server-address:4300/sap/sbo/portal/?site=/B1AppDemo/WebContent/index.html

      Let me know how it goes!

      Author's profile photo Former Member
      Former Member

      Thanks Mostafa.

      I did try that other address, however it still shows me a blank page.

      I noticed after logging in, it redirects to the same address:

      https://hanab1:4300/B1AppDemo/WebContent/index.html

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      I think you will need to reactivate the ODataServices subfolder in the B1AppDemo project. You can do this by going through each OData service's file ".xsodata" and just edit it by adding any space or maybe entering new line.

      Although the OData Services look activated, however it sometimes happen that they are not really actively running!

      Author's profile photo Former Member
      Former Member

      Hrmmm,

      I did go into each file make a space and save it.

      Then I noticed the icon changed for each to the grey square.

      When I clicked the "Activate multiple inactive objects" I received this message.

      Error.JPG

      I haven't worked with this before, apologies if they are standard issues.

      Nick

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      No problem 🙂 . Can you please let me know whether the HANA views are already active? Check the sub-folder HANAViews, particularly the view ""SAP_CA_BP_SLP.

      Author's profile photo Former Member
      Former Member

      How can I tell if it's active?

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      You find that the grey diamond has disappear! it will usually look like the below image;Screen Shot 2015-02-10 at 3.59.44 PM.png

      Author's profile photo Former Member
      Former Member

      Ohh ok, definitely active then they are.

      Any other ideas?

      Nick

      Author's profile photo Former Member
      Former Member

      I think I still have some folders that are inactive (ODataServices & XSJS).

      When I try to activate them, I get the error from the message on 09/02/2015 10:56 PM

      Nick

      Author's profile photo Former Member
      Former Member

      Just noticed some with exclamation marks as well.

      Errors.JPG

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Do not worry about such red x, it is sometimes due to formatting, not really real errors. I think the best is to have a remote session together so I can have a look at the App 🙂 . Please send me an email to reschedule a meeting!

      Author's profile photo Former Member
      Former Member

      Hi Mostafa,

      I got the same problem as Nick, I can't preview SAP_CA_BP_SLP view.

      Below is the error message.

      Screenshot 2016-04-19 上午10.56.21.png

      Author's profile photo Andy Brown
      Andy Brown

      Hi Mostafa

      I've had a go at installing your Sales Kit Demo on our internal B1H system (9.1 PL05).  I have it installed and without errors (there was a space vs tab issue in one of the JScripts).  There are a lot of warnings but otherwise it appears to be fine.

      When we run-up the HTML5 page, we're asked to login.  There's a slight pause as though it's retrieving data but then we're presented with a completely blank screen.  We're using Opera.

      I've had the system log my activities and I can see that indeed data is being retrieved.  I've also done some spot-checks to make sure that the various views that were imported are pointing at our SBODEMOGB database.

      Have you any advice?

      Many thanks and regards

      Andy

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Hi Andy,

      Did you try any of the oData services available in the App?

      Let me know if you can retrieve any data by testing the following: https://<hana-server-address>:4300/B1AppDemo/ODataServices/BusinessPartners.xsodata/bp

      Let me know as well whether you used both HANA and B1 credentials to login.

      Kindly,

      Mostafa

      Author's profile photo Andy Brown
      Andy Brown

      Hi Mostafa

      Many thanks for your reply. I think it’s a permission issue but I’ll need your guidance on how to repair this. When I ran your test on the oData service, I get a 403 – Forbidden error.  Which server log do I check to help with this?

      BTW, I logged in with both my server (HDB/SYSTEM) and SBO login (manager).

      Regards

      Andy

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Hi Andy,

      With pleasure 🙂 . It is quite strange that you are getting such HTTP error!

      What credentials do you put while the browser pop-up for username and password? It must be a HANA user account like the HAAN Admin User [SYSTEM].

      Can you tell me what happens when you visit the following address?

      https://<hana-server-address>:4300 OR http://<hana-server-address>:80000

      Kindly,

      Mostafa

      Author's profile photo Andy Brown
      Andy Brown

      Hi Mostafa

      I put in credentials for my SYSTEM user and it seems to pass as I have run a tracelog and the various scripts appear to be running as it gathers data ready to present.

      When I look at port 4300, I can see a message telling me that the XA Engine is running.  Port 80000 doesn't seem to work.

      Cheers

      Andy

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      sorry I meant 8000 🙂 .

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Can you check in the project the  Application-Access File ".access" and tell me what it has inside. It must have the setting {"exposed" : true}.

      Please have a look here for more details:

      http://help.sap.com/saphelp_hanaplatform/helpdata/en/5f/e3b123826d4503aa66eb955a002821/content.htm?fullscreen=true

      Author's profile photo Andy Brown
      Andy Brown

      I checked .xsaccess and "exposed" is set to true but it looks like I have an SSL error because when I go to https://<hana-server>:8000 I get:

      Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.


      We're using a self-generated certificate.


      If I try a non-secure link, i.e. http://<hana-server>:8000, I get a message saying that XSEngine is up and running.


      What confuses me is that port 4300 works using SSL but 8000 doesn't.  Any ideas?

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      This is normal. Port 8000 for http connection and port 4300 is for SSL connection. By the way it should be either 80<instance_no> or 43<instance_no>, where instance number refers to 00.

      Author's profile photo Andy Brown
      Andy Brown

      Thanks Mostafa.  Sorry, but SSL and ports is not my area of expertise - my tech is away on holiday!  Is there anything else you can suggest as to why this is not working?

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      What if you try to replace the content of the .xsaccess file with the following:

      {

        "exposed": true,
        "authentication" : null
      }

      Let me know how it works.

      Author's profile photo Andy Brown
      Andy Brown

      Hi Mostafa

      That's what it's already set to 🙁

      Andy

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      mmh! I think it is time to have a session together to troubleshoot better.

      Please send me a meeting request in my email mostafa.sharaf@sap.com. You can also follow me at Twitter @Mostafa_SAPB1 🙂

      Author's profile photo Jacobo Agami
      Jacobo Agami

      Hi Mostafa

      I also havent been able to use it.

      First i had the privilege issue the same as Nick. I was able to solve it using:

      GRANT SELECT ON SCHEMA "schema_name" TO _SYS_REPO WITH GRANT OPTION;

      But after everything its activated i just get a blank screen in the browser.

      I have tried with http and https.

      Do you have any ideas??

      Regards and thanks

      Jacobo 🙂

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Hi Jacobo,

      Can you test it with Google Chrome, and check what is happening via the Developer Tools? You can use as well other browsers like Firefox or Safari.

      Kindly,

      Mostafa

      Author's profile photo Jacobo Agami
      Jacobo Agami

      Hello I have tried with chrome, firefox, and IE and i have the same result.

      Apparently there is a 404 not found error.

      Here i attach the error.

      Thanks a lot

      Jacobo

      /wp-content/uploads/2015/04/error_b1appdemo_684443.jpg

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      can you send me a screenshot of the B1App project structure in your HANA Project Explorer?

      Author's profile photo Jacobo Agami
      Jacobo Agami

      Of course

      /wp-content/uploads/2015/04/project_explorer_685342.png

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      can you try to access one of the odata services? try to find out which resource that it does not exactly find? you get an error of 404, which means that there is something missing!

      Author's profile photo Diogo Conte
      Diogo Conte

      Hi Mostafa,

      When i try to import on the extension manager, i browse the zipped file

      (B1appsHANA_SBO_Package) and when i click upload, but the screen keeps processing without success. Do you know what can be done?

      On the browser i was able to show the app, but in b1 not.

      Thanks and regards,

      Diogo Conte/wp-content/uploads/2015/08/xapp_764822.jpg

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Hi Diogo,

      Do you still have this error? maybe just restart your ServerTools and it should work fine.

      Kindly,

      Mostafa

      Author's profile photo Former Member
      Former Member

      Hi,

      After fixing some troubles (Not authorized and Views which reference to ETL_... tables or views), I managed to activate the project without error.

      When I try the app, after login I also get a blank page.

      When I look in the debugger there are just like Jacobo has, error 404 within the execution of SAP UI librairies.

      Any idea ?

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Hi,

      Pls double check the path to the SAPUI5 Core libraray, which is usually /sap/ui5/1/resources/.....Maybe it works now with you 🙂 !

      Kindly,

      Mostafa

      Author's profile photo Former Member
      Former Member

      Good job, Thank's Mostafa !

      Author's profile photo Former Member
      Former Member

      Hi Mostafa,

      Tried downloading the sales kit demo app but the link seems to be broken

      Regards

      JP

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Hi JP,

      Did you try again? Is it working now?

      Kindly,

      Mostafa

      Author's profile photo Lars Jönsson
      Lars Jönsson

      Hi Mustafa!

      I cannot import the TGZ file. I get error message:

      Error occurred during import of delivery unit./nRepository: Encountered an internal error in the repository code, this is most likely a bug in the implementation;failed to write attached content to file: See trace file for more information

      I cannot find any more information about this error.

      We are running hana 102.03. Is the package compatible with this version?

      Regards

      Lars

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Hi Lars,

      it should be ok! Can you restart the HANA server and see what happens?

      Kindly,

      Mostafa

      Author's profile photo Former Member
      Former Member

      Hi Mostafa,

      thanks for your job. I have only a problem. The app works well but when I select the cockpit, the flower run but nothing appens.

      Have you an idea what is it the problem?

      Thank in advance for your time.

      Best regards

      Mirko

      Author's profile photo Former Member
      Former Member

      Hi Mustafa,

      and thanks for your excellent job. I installed your app and I will use it in a hana's demo. I have only a problem with the cockpit section. When I select the cockpit section, the dashboards and kpi defined for the user don't appear.

      From B1 Client dashboards and kpi work correctly.

      Can you help me? Have you an idea what is the problem?

      Best regards

      Mirko

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Hi Mirko,

      Thanks to your feedback. I am aware of this and still checking with the dev team. I will get back to you once any news.

      have a nice day!

      Thx

      Mostafa

      Author's profile photo Jacob Tan
      Jacob Tan

      Hi Mirko Fileni,

      It should be able to work fine.

      Maybe there are some configuration not set properly? Might want to re-setup everything again?

      But in any case, I've looked into the code and it's an iFrame getting response from SBO server (url below). On a separate note, you can add a browser widget in your b1 to navigate to https://your-hana-server-ip:4300/sap/sbo/cockpit/

      Screenshot 2016-08-22 22.46.17.png

      HANA Revision - 1.00.102.05.1455873859

      SBO - 9.2 PL 03

      Author's profile photo Former Member
      Former Member

      Where can I find the code for this? We are really interested in how this application is interacting with the Master Data forms in SAP Business One client

      Author's profile photo Mostafa Sharaf
      Mostafa Sharaf
      Blog Post Author

      Please download the app package including the source code, from the above download link "under the video":

      http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c0b4ff01-9f8f-3210-7298-cdc97da09454

      Kindly,

      mostafa