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

Accepted Solutions (1)

Accepted Solutions (1)

tina_petry
Explorer
0 Kudos

Hi,

my problem has solved in the meantime, as SAP changed the travel apps so that they can be extend at Web IDE now.

regrads Tina

former_member464
Explorer
0 Kudos

Hi Tina,

I can not also fix this issue.

I wanted to add some fields in the detail page.

I have tried to change CL_TRV_MTE_ANNOTATION_HELPER classes -> DEFINE_TRV_EXPENSE_ANNOTATIONS methods, but can not see any changes at metadata.

Also I have wanted to see standard annotations in sap web ide project but can not see them when I selected TRV_MTE_SRV.

What do I need to do to add additional fields?

Regards Huseyin.

vamsilakshman_pendurti
Active Participant
0 Kudos

Hi Tina,


We are also having the same kind of requirement to add new fields under Details part in My Travel Request(V2) Fiori app.

Version is 1909 . We have done as followed...

1. Enhance the include ..MTR_S_TRAVEL_REQUEST_INCL of struc: MTR_S_TRAVEL_REQUEST with Append structure.
2. Then we have added those fields in MPC _EXT of the project TRV_MTR . In CL_TRV_MTR_MPC_ext -> Extension class, added the properties in MPC EXT by enhancing the code...


To apply the changes into UI level we have used CL_TRV_MTR_ANNOTATION_HELPER.(For testing purpose, added one field only)

But when we reload the App, this newly added field has been not reflected on the screen, . We followed this process since we are unable to import the application into WEB IDe.

Ref.Note: SAP Note

Kindly guide us...

Thanks,

Lakshman.

tina_petry
Explorer
0 Kudos

Hello Lakshman,

I'm not really familiar with adding customer fields at classes MTR_MPC_EXT / CL_TRV_MTR_ANNOTATION_HELPER.

But: did You refreshed all relevant buffers? This is needed as You changed the OData definition at backend system.

  • Backend system: Transaction /N/IWBEP/CACHE_CLEANUP: set flag for all models an exceute
  • Gateway system: Transaction /N/IWFND/CACHE_CLEANU: set both flags an exceute
  • Gateway system: Transaction /N/IWFND/MAINT_SERVICE: select Your service and press button "Load Metadata". This loads the new Annotation settings fom backend into gateway.
  • Gateway system: Transaction SMICM. Goto -> HTTP Plug-in -> Server Cache -> Invalidate Globally
  • Browser: reset cache + cookies

I hope buffer refresh will helps - is the field now shown?

Kind regards
Tina

vamsilakshman_pendurti
Active Participant
0 Kudos

Hi Tina,

Actually screen fields are now able to see after adding the annotations it took almost 20 to 24 hrs to load the screen fields.

Can you please help us on this below points...

  • How to add the additional tab in details page of the standard My Travel Request V2 App, so that we can add our own custom fields under the same TAB.
  • How to showcase the input field as a check box by using annotations in the respective annotation helper class.
  • When we adding the fields, those all are displaying line after line but how to arrange the fields as row wise i.e., suppose i want 6 rows and each row contains 5 to 7 input fields(Making the fields in a structured format).

Could you please guide us on these points, it would be great help for us...


Thanks,

tina_petry
Explorer
0 Kudos

Hello Lakshman,

Unfortunately, I am not really familiar with UI5 development. I only have basic knowledge.

I don't know how to insert a new tab in the app, create a checkbox or change the layout of the fields.

Sorry and kind regards
Tina

Answers (2)

Answers (2)

former_member631021
Discoverer

Hi, I have the same problem with the app F0673A

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