on 11-26-2019 7:10 AM
Dear community,
we use travel management Fiori Apps at an SAP ERP system to create travel requests and travel expenses. We need to add custom functionality (customer fields, adaption of UI texts, …) to Fiori app “My Travel and Expenses” version 2 (F0584A).
Therefore I tried to extend the app “My Travel and Expenses” at Web IDE by creating an Extension project, but I get the error message "Extending Smart applications is currently not supported".
I checked the extensibility note 2775801 “My Travel and Expenses (Version 2) - Extensibility concept” https://launchpad.support.sap.com/#/notes/2775801. There stands:
...
OData definition and UI
The SAP Fiori app “My Travel and Expenses (Version 2)” was developed using smart controls.
Smart controls are based on OData annotations which are already part of metadata models.
(GW service: TRV_MTE_SRV)
Depending on your preferences and expertise, 2 options are available to enhance OData annotations:
This will allow customers to add/remove fields, sections and actions to/from smart tables and object pages.
…
Frontend controller extension:
"Travel and Expenses (Version 2)" supports the extension of a base controller by merging the delivered standard controller with a custom controller.
An extension must be added to the app descriptor file in section “sap.ui5.extends.extensions” in file conf/ListPage.manifest.json or conf/DetailPage.manifest.json.
Please note that you can find an example of a controller extension in "Travel and Expenses (Version 2)" app.
Frontend view extension:
"Travel and Expenses (Version 2)" app supports view extensions by using extension points to insert, replace or modify custom content (views or fragments).
An extension must be added to app descriptor file in section “sap.ui5.extends.extensions”.
Please note that you can find an example of a view extension in “Travel and Expenses (Version 2)” app.
...
.
I’m an ABAP developer and unfortunately I have only basic knowledge in area of Fiori App development.
Can anybody give me some information or tips, how I can extend an app using smart controls?
How customer app must be built to be able to use the described extension possibilities?
Or how I can extend the … ANNOTATION_HELPER classes at backend –> means what do I need to do to add additional fields?
Many thanks
Tina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Tina,
Thank you for your response.
I have added a field from CL_TRV_MTE_ANNOTATION_HELPER classes -> DEFINE_TRV_EXPENSE_ANNOTATIONS methods. I can see to the annotation file.
However, Is there any way to get my new custom field data without extending OData service (TRV_MTE_SRV). I added field to the structure (MTE_S_TRAVEL_EXPENSE).
Because I have got some string problems when extending OData service, as the link below.
https://answers.sap.com/questions/13217782/extension-standard-odata-service-annotation-string.html
How did you get data for your custom field from OData service ?
Thank you for your helps,
Kind regards Huseyin
Hello Huseyin,
I don't change class CL_TRV_MTE_ANNOTATION_HELPER to add a new field. I extended the database table / relevant structures and added the field by extending the OData service.
I had no problem to add the field via annotations, I don't know this string error. Sorry, but I can't help here.
My ZZ Field:
Kind regards
Tina
Thanks Tina,
for some reason I tried generate the annotation.xml via "Import" -> "Annotation File" and it did say that there was no annotation.xml to be found for ODatat Service TRV_MTE_SRV.
But after creating the folder "annotations" in the "webapp" folder the file gets generated via "new" -> "Annotation File"... Happy it works now!
User | Count |
---|---|
84 | |
9 | |
6 | |
6 | |
4 | |
3 | |
3 | |
2 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.