Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Pushing SAP Backend Updates to LCDS Middleware

Avatar

Level 1

Hi,

I am using the following architecture for my mobile application :

Flex client <-> LCDS middleware <-> SAP ERP Backend

I understand how I can synchronise and update client => middleware (=> client) changes, which can be persisted in the backend database with a (custom assembler). However, in my case, my "backend" is a SAP system, on which itself data can be saved.

What is the best practice to push changes from my backend to my middleware, so that my clients can get updated automatically with the new data from the backend ?

I have found this : http://help.adobe.com/en_US/LiveCycleDataServicesES/3.1/Developing/WS4ba8596dc6a25eff5473e3781271fa3... but don't really know how to call thedata access object (DAO) in the LCDS middleware when SAP makes changes to the data.

Or do I need to call DataServiceTransaction.refreshFill() in certain intervals/connections ?


Does anyone have an idea or suggestion for this ?

Thanks in advance,

Nico

1 Accepted Solution

Avatar

Correct answer by
Employee

ADEP (just reeleased) actually has the Data Services and SAP Connector that Francois mentions.  It can make building SAP-backed RIA's very easy (see brief demo here:

http://www.youtube.com/watch?v=Kr_iVhomOw8

The Connector is actually sophisticated model-driven Java JCO code generation and by default creates Remoting endpoints for SAP RFM's, does all the marshalling of types, etc, and allows you to very quickly build SAP-backed Flex, AIR and AIR Mobile apps.

You can also use the code generated by the SAP Connector facility to create your own Data Management assemblers if you like.  And of course, with Data Management, you get paging, client-client sync, etc.  ANd there is a server-side Java API called DataServiceTransaction() that allows your to notify any connected clients that data has changed and Data Services will push the updates to them directly.    

Or, depending on the nature of your updates, you could use the default Remoting destinations, but setup a separate Messaging channel that each client subscribes to for important ABAP events, and have the client simply refresh it's SAP data it got from the generated Remoting destination when notified of some event.

Check Chapter 9 of the ADEP Developers Guide for more details here:

http://adobe.ly/ntKGDG 

Hope that helps! 

Damon

View solution in original post

4 Replies

Avatar

Employee

Hello Nico,

To push updates to the client I would use messaging, and would use remoting to push updates from the client to the server.

I would also look at our new LCDS SAP connector, it should dramatically streamline your development.

Finally, our recently pusblished article should of interest to you : http://www.adobe.com/devnet/flex/articles/project-hendrix.html.

You'll have there a glimpse at the architecture of one of our past project where sap lcds and flex were involved.

Cheers,

François

Avatar

Level 1

Hi François,

Thanks already for the useful information.

The architecture I would like to use looks partially like the link you gave of project Hendrix. I am also using SAP JCO for connecting the LCDS server application to the SAP backend.

You are suggesting to use messaging for pushing updates to the client. On the internet I found a examples that implement a custom service adaptor that pushes on certain intervals data to all its subscribed clients.

In those examples I saw that there was always a thread waiting for a certain amount of time before pushing again an update to the registered clients.

However, how can I determine on the LCDS middleware when such a new push needs to be done ? Is there a way to sent from the SAP backend an event that data has been changed in SAP and needs to be read again from SAP ?

Or is it maybe advisable to program on the LCDS Java middleware to select all the data in SAP on certain intervals (for instance 1 minute) and push it to the subscribed clients ?

=> How did you manage that in the Hendrix application suite ? The JCO query is invoked from the middleware to the SAP backend, and does not know when something is changed in the backend. I am missing something ?

Btw, I already saw some video about the SAP Connector on the tv.adobe.com website... I can't wait until this comes available.

Kind regards,

Nico

Avatar

Correct answer by
Employee

ADEP (just reeleased) actually has the Data Services and SAP Connector that Francois mentions.  It can make building SAP-backed RIA's very easy (see brief demo here:

http://www.youtube.com/watch?v=Kr_iVhomOw8

The Connector is actually sophisticated model-driven Java JCO code generation and by default creates Remoting endpoints for SAP RFM's, does all the marshalling of types, etc, and allows you to very quickly build SAP-backed Flex, AIR and AIR Mobile apps.

You can also use the code generated by the SAP Connector facility to create your own Data Management assemblers if you like.  And of course, with Data Management, you get paging, client-client sync, etc.  ANd there is a server-side Java API called DataServiceTransaction() that allows your to notify any connected clients that data has changed and Data Services will push the updates to them directly.    

Or, depending on the nature of your updates, you could use the default Remoting destinations, but setup a separate Messaging channel that each client subscribes to for important ABAP events, and have the client simply refresh it's SAP data it got from the generated Remoting destination when notified of some event.

Check Chapter 9 of the ADEP Developers Guide for more details here:

http://adobe.ly/ntKGDG 

Hope that helps! 

Damon

Avatar

Level 1

Hi François & Damon,

I understand know what you mean with your "messaging" suggestions. Problem was I did not know that we can use JCO in both ways, also to notify the LCDS middleware (Java) from the SAP ERP Backend.

Thanks !

Nico