You can implement the reusable component from the Reuse Library in a Fiori Elements
app in order to display an application log.
In order to implement the reusable component in a Fiori Elements app, you first have to add the application log reuse component to your manifest.
-
Open the
manifest.json
file of the application and locate thesap.ui5
section. -
Add the
sap.nw.core.applogs.lib.reuse.smarttemplate
component:"sap.ui5": { "dependencies": { "libs": { "sap.nw.core.applogs.lib.reuse": { "lazy": true } }, "components": {} }, "componentUsages": { "ApplicationLogs": { "name": "sap.nw.core.applogs.lib.reuse.smarttemplate", "lazy": true } }
-
Next, you need to add the smarttemplate component of the application log reuse library to an
ObjectPage
. In themanifest.json
file, you have to add the application log reuse component as an embedded component to yourObjectPage
:Snippet (embeddedComponents)
"embeddedComponents": { "appLog": { "id": "<enter an ID>", "componentUsage": "ApplicationLogs", "title": "<the name of the tab>", "settings": { "logHandle": "{LogHandle}", "persistencyKey": "<your content>" } } }
-
You can set the following parameters:
-
log handle: The application log handle
-
Optional persistencyKey: Set a personalization key which is then used to set app-specific variants for
SmartTable
. This parameter is optional. The default value is defined in the Application Log app.Make sure not to change the key value again, since users might lose their variants.
-
-
Here are some examples for binding:
-
logHandle
:{myOdataServiceLogHandle}
-
logHandle
:{path: 'myOdataServiceLogHandle'}
After your app was deployed successfully to an SAP BTP ABAP environment system, the BSP application and the SAP Fiori Launchpad app descriptor item will appear under your created package in Eclipse.
-
-
Now, you need to create a new IAM App. Follow the instructions described here: Defining an IAM App for the Business Service.
-
Once created, you need to maintain the Application Log OData Service to call your application log data. To do this, go to the Service tab and add the Application Log OData Service by naming the service type
OData V2
and add the following service name:APL_LOG_MANAGEMENT_SRV 0001
. Please make sure to add all 13 spaces in betweenSRV
and0001
. Now, go to the Authorization tab and maintain your log objects / sub objects for the authorization objectS_APPL_LOG
. -
Finally, you need to create a new Business Catalog. Please follow the procedure described here: Creating a Business Catalog
Having created the business catalog, you have successfully implemented a reusable component to display your application logs.