daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //add _launchCrossApp() function to the base controller and invoke as below
  2. const semanticObject = "MyCustomApp";
  3. const semanticAction = "display";
  4. let mParams = {};
  5.  
  6. mParams["myParameter"] = "myValue";
  7.  
  8. this._launchCrossApp(semanticObject, semanticAction, mParams);
  9.  
  10. // the function
  11. _launchCrossApp: function _launchCrossApp(semanticObject, semanticAction, mParams) {
  12.   const oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation");
  13.  
  14.   // generates a hash for the Fiori Launchpad to follow
  15.   const hash = (oCrossAppNavigator && oCrossAppNavigator.hrefForExternal({
  16.     target: {
  17.       semanticObject: semanticObject,
  18.       action: semanticAction
  19.     },
  20.     params: mParams
  21.   })) || "";
  22.  
  23.   // navigates to the new hash
  24.   oCrossAppNavigator.toExternal({
  25.     target: {
  26.       shellHash: hash
  27.     }
  28.   });
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top