Let's follow up this discussion at the Neptune Community
(this forum will be kept in read-only mode)
I am running a Neptune app X with an iframe. In the iframe I am running another Neptune app Y. From app Y I want to call a method of app X. I could use window.parent.functionName() and it works only when the apps are running standalone. How to achieve the same when running apps in the launchpad?
I can't make it global using sap.n in app X because app Y doesn't recognize sap.n functions as it is run in an iframe. Any ideas?
You should use the "Embedded inside another App" capability from the launchpad with a parent container of type Panel (or HBox/VBo)x instead of an iframe for your App Y :
Thanks for this great interesting topic Radek and PEB !
I agree with both of you.
App Y which is inside the iframe will not see the scope of App X. PEB's approach is super useful. If using a Panel, please remember to set its height, otherwise you will not see App Y.
Thanks again, have a nice weekend!
Yes this is true and I am aware of it but my case is slightly different. I need an iframe because in the iframe I am showing a 3rd party website. That 3rd party website will send some data using POST which can be captured on the server side. So I make the 3rd party website to open another Neptune app which retrieves the data on the seerver side and renders in the iframe hence I can't use AppCache.Load().
From my understanding, as you probably want (for performance reason) to avoid polling regularly the SAP back-end from your App Y to know if data has been updated after the POST request from the 3rd party has been processed, you may explore ABAP Messaging/Push Channels mechanisms if your SAP version and the web browers used allow to do it :
Unfortunately, I haven't done yet any AMC/APC implementation. Maybe other Community Members have some experience with it and could confirm that it could fulfill your request.