cancel
Showing results for 
Search instead for 
Did you mean: 

Error "Extending Smart applications is currently not supported"

tina_petry
Explorer
0 Kudos

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:

  • Customers may use the Annotation Modeler to extend/overwrite standard annotations in an SAP Web IDE project.
  • Using the enhancement framework, the ABAP classes could be enhanced to add a Pre/Post/Overwrite Exit to the standard methods. (Classes: CL_TRV_MTE_ANNOTATION_HELPER and CL_TRV_ANNOTATION_HELPER)

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

View Entire Topic
tina_petry
Explorer
0 Kudos

Hello Huseyin,

I was able to use Annotations to add / hide fields:

Annotations can only be added to a an extension project after first deplpyment.
Via menu: New -> Annotation File

I hope this helps.

Kind regards Tina

former_member464
Explorer
0 Kudos

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 ?

trv-mteanno.png

Thank you for your helps,

Kind regards Huseyin

tina_petry
Explorer
0 Kudos

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

tina_petry
Explorer
Xenia
Advisor
Advisor
0 Kudos
tina.petry

I still struggle to add an annotation.xml file to my extension project for Apps F0584A and F0409A (even after deploying the extension project to the SAP backend). Which note did you have to implement?

tina_petry
Explorer

Hello Oxana,

I didn't implement a note.

The annotation file must be creaed by context meu of the project (I work with local Web IDE):

When creating annotation file manually then it could be that it don't works.

I hope this helps.

Kind regards
Tina

Xenia
Advisor
Advisor
0 Kudos

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!

xykrbck
Explorer
0 Kudos

Hello Oxana,

I created the annotation file, but I am getting the following error while viewing it.

Could you please support me on these error.

Thank you for your helps,

tina_petry
Explorer
0 Kudos

Hello Yusuf,

this seams to be a bug in Web IDE.

Call popup to import application from SAP system:

Select the relevant System:

If list with apps is loaded, press cancel button to leave the popup again.
Now system should be able to open Annotation file.


Kind regards Tina