Skip to Content
0

Real Time DB connection in SAP UI5

Apr 19 at 07:34 AM

55

avatar image
Former Member

Hi,

Need suggestion on how to update UI on data change in oracle DB without refresh/reload or polling , need the data to be pushed automatically to UI.

Thanks,

Wasim

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Nicholas Owen O’Malley Apr 19 at 08:49 AM
0
Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Nicholas,

Thanks for you response.

Let me explain my scenario in more detail:

We are using SAP PO server and not SAP Cloud. We have a UI built in SAP ui5 and all DB operations are done using REST services built using JAVA session bean.

Now our requirement is to trigger a message to UI when ever there is a change in DB entry (also we can use Java System property instead of DB).

I know there is an api to capture the event triggered when a value is changed in Java System property. I need to make a call to UI through this event capturing Java service.

Is there a way to do this.Or there is other way possible which I am not able to look at.

Your response will be really helpful.

Thanks,

Wasim

0

Hello.

So to trigger the message to the UI you will need a middle layer. This middle layer can be a websocket to update the UI.

Client connects to websocket middleware.
When New insert into DB => SAP PO POST to middleware => Middleware Pushes data to client via Websocket => Client triggers a function when receiving data.

This will give you a live update. No refresh, reload or POST to REST service to check for updates, it will tell the client when it is a update and you can push data thru the websocket. Its a data stream if i am not mistaking.

Or check out MQTT, works the same way. I just like socket.io better for some reason.

https://blogs.sap.com/2016/04/21/advantco-mqtt-adapter-fro-sap-pipo/

0
Former Member

Hi Nicholas,

So let me state what i understood.

I have create a Java Webservice to update the DB, in the same Java Service do I need to call the Websocket to push data to UI?

Also I am working on SAP PO server with Java 7.40, does it allow websocket, as in one of the blog I read that it does not.

Thanks,

Wasim

0

Yes, you need to push a message to a microservice/middleware that is running a Websocket, or MQTT (Java suport) http://mqtt.org/tag/java. With one of those two you can run a function live in the frontend. And pas data to the front end. So you can add a new row to a table without a refresh in the frontend or a new cal to the backend.

I am a javascript dude my self, so i would create a microservice with NodeJS and Socet.io. And it is hard for me to explain this better.

0