Take the 2-minute tour ×

We have a self made Sales Tool which is developed to use SAP Business One System through the DI Server. We have like 40 employees which are logged in through remote desktop to the same machine with their own users. All users have a desktop shortcut to our salestool. Right now we can't use the DIAPI because SAP is licensed per CPU. So if all the employees (salespersons) log in through remote desktop to one and the same machine there would be a license problem.

Our solution is pretty dirty in my honest opinion. We developed a cmd tool which runs on a server in our house. This cmd tool is listening to the clients and receiving XML from the clients. After it have received some xml, it sends the XML to the DI Server and waits for the response and sending back the result to the client. We have huge performance issues with that architecture and like i said before, it's a very dirty solution.

Now i am up to find another solution for the communication between the clients and SAP B1. I am thinking of using either WCF or WebAPI (maybe any suggestions how i can decide which one would be better for me?)

So when i decided to build either a WCF or WebAPI solution how can i resolve the license problem with a clean architecture? I mean we have for all our employees (users) SAP B1 licenses. Each User have his username and password saved in LDAP. So i can read the users and passwords from LDAP to log them with their correct license into SAP.

I want to have all my business logic in the WCF/WebAPI. Right now the complete business logic is in the Sales Tool.

So my thinking is like this: I have my WCF/WebAPI Service with the business logic in it. A user starts the tool (logging in through remote desktop). LDAP gets the users SAP username and Password and logs in SAP through the Service. After the user is logged in, he can work with the tool while multiple users can work parallel. i think the transaction logic for multiple users is given by the DIServer/DIAPI i don't even know which of this i have to use. i hope someone can tell me which i need for my solution

So if anyone have any suggestions about a good architecture / a good solution for my problem would be great.

thanks so for

share|improve this question

2 Answers 2

Is there no way you can use per-user licensing? I've never actually seen a per CPU license in the wild; the per-user is much better as each pro user automatically has an addon (DIAPI) license attached to it...maybe check with your partner on this actually because I'm pretty sure the DIAPI licenses should just have been given to you - never saw a situation where a custgomer had to pay for DIAPI.

  • That being said I'm out of the SBO game for a few months and it's possible that they have changed their licensing system so pehaps I am mistaken, and even if you do get DIAPI licenses it sucks for a WAN based solution because it is slow (you can delegate out to a service that uses connection pooling and makes several DIAPI connections up front, handing them out to clients on a round-robin basis, but it leaks memory like a sieve, so don't go there!)

  • As for architecture - I have personally written in the past a webservice (asmx, old school!) that used the DI Server to import using only a single license; once you have done an initial login to the DI Server (which only takes a few seconds if its running on the same as the DB server) then subsequent accesses are very fast; using this system we imported 10 million Item Master inserts in 3 days, which is pretty fast for SBO.

  • The only downside is that you can't see exactly which user made the transaction by using the SAP view history screens, but to be honest you can just do your own transaction logging into your own tables and use for e.g a UDF to record the username that last modified the data. The SAP change log is a bit rubbish anyway and if writing your own service, you have full control over what gets logged and what doesn't.

  • So if you used for example a WebAPI service (I would recommend this over WCF,it's easier to setup and can be hosted even outside of IIS) you can transform the requests into DI Server-formatted XML and then send the DIS a Login message using a single special-purpose user you setup for this, perform the transaction, and then send a Logoff off so that the next request has a license.

  • Maybe consider buying a couple more DIS licenses, they are not very expensive, that way you can have some pooling on the service as well; since it only takes a few seconds for even 100 documents to import, you can just keep clients "on hold" if you don't currently have a license for them to use.

Hope that helps...

share|improve this answer
Indeed your answer is more than helpful. Actually we have enough licenses (for each user who uses SAP). But all users log on one and the same computer over remote desktop (right now i am not even sure if the license per cpu is correct, need to check it out) –  darkdog Oct 1 '13 at 7:50
@darkdog, yes do because that sounds very odd the way it's working at the moment (although it's not unusual for a remote SAP solution as the client does not work over a WAN). But making a custom client to do limited things and having it talk to DIS over HTTP is possible. Let us know if any problems... –  Stephen Byrne Oct 1 '13 at 8:10

WebAPI service will do, but you have to create the whole application.

One of my consultant did this before, so the license is just to access the Database.

It's possible, but very time consuming as you have to build the whole application on web-based interface. Not sure if this is a feasible solution.

Mr Byrne is right, you should check with the SAP Partner in your country.

Hope this help.

share|improve this answer
i don't understand the "you have to build the whole application on web-based interface" part. I'd like to have my business logic in the WebAPI. (there is no web-based interface ?) –  darkdog Oct 2 '13 at 11:14
Sorry, i mean web-based application. Are you referring to business logic of your Sales Tool or SAP? I was assuming that you want to use the SAP Company Database, and create your web application to interact with those Database using DI API, am I getting it right? –  JMS786 Oct 3 '13 at 9:30
i mean the business logic of our sales tool. i am not developing a web application. I just want to create a webservice which will contain the business logic of the sales tool (WPF .NET Application) –  darkdog Oct 7 '13 at 6:10

Your Answer


