We are trying to develop a mobile app that connects to SAP Business One Service Layer, which provides an OData v4 interface.
We can connect fine and exchange data successfully (with the caveat of the missing $select parameter, see here), but the concept of our app should allow each customer to connect directly to their own endpoint. The reason is that many customers still don’t want to expose their ERP systems to the Internet and we also want to avoid the overhead of setting up API proxies for each customer.
Is there a way of setting this up with AppGyver? As far as I can tell from my tests and readings, the OData endpoint seems to be fixed from the data source definition.
Any insight would be appreciated.
Thanks and best regards,
right now, this is not possible with the OData connector, but an upcoming (slated for January) release will bring in an improvement that lets you parametrise the base URL and bind the dynamic part directly to e.g. an app variable from within the data configuration screen.
In the meantime, the other option is to recreate the OData resource as a REST API integration, which then allows you to modify the base URL by adding a Path parameter that can then be bound to e.g. an app variable when using the flow function.
may I ask you how you set up connection from AppGyver to SAP B1 SL?
I was working on that via SAP Cloud Connector running on SAP Business One onpremise env.
Set up connection between on prem and SAP BTP.
But I cannot find a way to actually configure and interact with Service Layer APIs from external systems.
Also posted a question here: Expose SAP B1 Service Layer APIs via Cloud Connector.
Thanks for any hint
I have not used Cloud Connector, but instead made a direct connection to Service Layer.
The steps should be more or less:
- Set up an oData endpoint (use Basic authentication here to be able to access the metadata)
- Create a POST Login request in the login form submitting the user info
- The cookie from the login response is stored automatically (in the Android preview app at least), so from there on you can send any request to B1 (GET, POST, PATCH, etc.)
Here’s the logic for my login button. If the login is successful I retrieve the AdminInfo object (company name, etc.) and store it for later usage. If it fails, I show the error message returned.
Hope this helps.
Thanks for you hint!
I’m stuck more on the starting part of the process: making a direct connection to Service Layer, so before working with AppGyver implementation.
Mine it’s way more a network / infrastructure issue… can you share how did you set up those steps?
Sorry, but I never did set up Cloud Connector, since I don’t like the hoops you have to jump through to get it all set up. If you plan to develop for multiple customers, Cloud Connector is not an option for us, since it complicates setup by a lot. What we are looking for is “install app, configure a handful of settings, and done”.
Hello @Joerg_Aldinger ,
Sorry to open the old thread again, but i am also trying to make an app on top of SAP B1 SL, i am facing one issuue, the app is working fine on Web and IOS, but on android it is not able to reach to SAP B1 SL API . Any help ? as you already have achieved it.
Thanks in advance.
Hello @Taseeb_Saeed ,
Are you using a valid certificate for your endpoint? It might simply be a certificate issue.
Hi @Joerg_Aldinger ,
Certificate is intalled at endpoint , it is working fine when i am using same app from browser or ios, but when i open it from android preview its not reaching.
Is there anything i am missing particularly for android while i am fetching the API , i means header or any other stuff?
@Mevi may be you can help?
Try to open the Service Layer URL from the Android device in a browser (Chrome/Edge), to check connectivity and certificate recognition by the device itself…
@Joerg_Aldinger , Service Layer URL is accessible from chrome of android , and if i open the app from mobile browser , app is working fine , SSL is also shown is valid certificate. BUT when i open the app from AppGyver Preview App, nothing is happening, i tried to debug from debugger option of appgyver, its showing “type error network request failed”.
Same app is working from ios.
I’m having the same issue as you describe, did you manage to solve it?..
Hi @Jorge_Pinto ,
Nops, still facing same issue. Please let me know if you are able to solve it.
Hi, I get similar issue. My app is working fine on laptop web browser and android web browser and appgyver app preview installed on my android device. My problem is the oData, I get this error “Network Error” when I call the oData from my application executed on android device through android web browser and appgyver app preview , when I execute the app on my laptop (without any vpn because this oData is exposed to the internet) I get the oData response without issues.
The only one error that I had on my laptop was the cors error, but I can fix this,
did you solve your issue?