2 weeks ago
Hello,
we have a CAP Application with a FIORI-App running on BTP (CloudFoundry).
The FIORI-App is a List-Report Page with some custom extensions. The share-Button works on Detail-/Object Page and at Search-Page it doesn´t work properly. The filter criterias where not shared. I think it has to do with an error i can see in console of the browser.
TypeError: s.storeInnerAppStateAsync is not a function.
Have someone this error too, and can someone give me a solution for it?
Maybe it's also related to the fact that the app doesn't run in FLP?
We have no WorkZone subscribed only Cloud Foundry.
Hence my assumption and question if it works outside of FLP or Workzone?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Please try this
1. Check if Your App is Set Up for FLP
Open `manifest.json`
Look for the section: `"sap.flp"`—this indicates FLP integration.
Confirm the presence of `"routing"` under `"sap.ui5"`.
2. Check App State Management
Inspect `manifest.json`
Under `"routing"`, ensure you have defined routes like this:
```json
"routes": [
{
"pattern": "",
"name": "ListReport",
"target": "ListReport"
},
{
"pattern": "Object/{objectId}",
"name": "ObjectPage",
"target": "ObjectPage"
}
]
```
Review Your Component
In `Component.js`, check for state management in `createContent` or `init` methods.
3. Update Router Configuration
Confirm Router Setup
Ensure your routes point to the correct views and targets in the `targets` section of `manifest.json`.
Quick Test
Launch Your App
Open the Fiori Launchpad and run your app to see if it displays correctly and handles navigation as expected.
By following these steps, you can quickly verify your app's setup for the Fiori Launchpad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
1. Check if Your App is Set Up for FLP-To ensure your app runs within the FLP:
Deployment: Make sure your app is deployed to the FLP environment and not running as a standalone application. This typically means it should be part of the Fiori launchpad's tiles or catalog.
Manifest Configuration: Check your `manifest.json` for the following:
sap.ui5 section should have the `crossNavigation` property set up to indicate the app can be navigated from the FLP.
SAP Fiori Launchpad Configuration: Ensure the app is configured correctly in the FLP's configuration settings.
Launchpad URL: Ensure that when you're accessing your app, you're using the FLP URL (like `https://<your-flp-host>/sap/bc/ui5_ui5/sap/<your_app>`) rather than a direct URL to the app.
2. Check App State Management Setup
To verify if app state management is correctly set up:
Router Configuration: In your `manifest.json`, ensure that the `sap.ui.generic.app` section is correctly configured. Look for:
`routing`: Check that routes and targets are defined properly.
`navigation`: Ensure that the `target` configurations are properly set up for navigating between views.
App State Handling:
In your controller (e.g., the List Report), ensure you are using the `storeInnerAppStateAsync` function where appropriate. This might look like this:
```javascript
onInit: function() {
// Store app state on initialization or relevant event
this.getOwnerComponent().getRouter().getRoute("yourRoute").attachPatternMatched(this.onRouteMatched, this);
},
onRouteMatched: function(oEvent) {
// Logic to store app state
let oAppState = {/* Your app state logic */};
this.getOwnerComponent().getAppStateManager().storeInnerAppStateAsync(oAppState);
}
```
State Retrieval: Make sure you have implemented the logic to retrieve and apply the stored state when the app initializes or the route changes.
Additional Tips:
Browser Console: Use the browser's console to check for any other errors or warnings that might give hints on why the function isn’t recognized.
Documentation: Consult the [SAP Fiori Elements documentation](https://ui5.sap.com/#/topic/9e2581ccbe6a4ef4a1a7a308cd06f6b7) for examples on implementing app state management effectively.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, but to 1. in my initial post i wrote, that the app isn´t running in FLP. We have no chance to run in FLP because it is a side-by-side project on an old sap system. So maybe this is the problem, but i am not sure and i can not find something about. If you can confirm that is not working outside of flp it is ok for me and i will not spend more time in it.
2. is it mandatory to implement own logic for appstate handling? I will use the standard
Hi
Please try this
The issue you're facing with the `s.storeInnerAppStateAsync is not a function` error in your Fiori app running on SAP BTP (Cloud Foundry) typically indicates a problem with the Fiori Elements framework or the application's integration with the Fiori Launchpad (FLP). Here are some steps to troubleshoot and potentially resolve the issue:
1.Ensure FLP Compatibility:
Make sure your application is set up to run within the Fiori Launchpad. The sharing functionality often relies on the FLP's internal mechanisms, which may not be available when running standalone.
2.Check SAPUI5 Version:
Ensure you are using a compatible version of SAPUI5 for your application. Check the `manifest.json` file for the UI5 version and update it if necessary. It should ideally be a version that supports the `storeInnerAppStateAsync` function.
3.Update the Router Configuration:
Verify that your router configuration in the `manifest.json` includes the correct routes and settings for the List Report and Object Page. Ensure that the app state management is correctly set up.
4.Implement App State Handling:
Implement app state handling correctly in your List Report. Use the `storeInnerAppStateAsync` function explicitly in your application code to handle state management, especially when filters are applied. You may need to check the `onInit` or `onBeforeRendering` methods to ensure state is stored and retrieved properly.
5.Debugging:
Use the browser’s developer tools to set breakpoints and inspect the function calls related to state management. This can provide insight into why `storeInnerAppStateAsync` is not recognized or is failing.
6.Consult Documentation:
Review the official SAP documentation on Fiori Elements and app state management for further guidance on correct implementation patterns.
7.Community and Support:
If the problem persists, consider reaching out to the SAP Community or SAP Support for assistance. Provide them with details about your application setup and the specific error messages.
By following these steps, you should be able to address the issue with the share button and ensure that filter criteria are correctly shared in your Fiori app.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your reply.
i checked SAP UI5 - Version and it seems ok.
Can you give some help to your answers?
1. What dou you mean or how can i check if my app is set up to run within the FLP?
Under point 3 you said "Ensure that the app state management is correctly set up". How can i check this?
User | Count |
---|---|
69 | |
11 | |
10 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.