cancel
Showing results for 
Search instead for 
Did you mean: 

Can we display an error message in the input field when a service error occurs in SAP FioriElements?

Seetharam1
Associate
Associate
0 Kudos
241

Is it possible to display an error message directly in the input field when the service encounters an exception in SAP Fiori Elements with CAP Java?

I know this is achievable on the object page in edit mode, but we require a similar functionality in the list report during the create action.

We have implemented a create action using annotations that include several specific input fields. When we click on the value help or dropdown in one of these fields, we encounter service exceptions if certain configurations are missing.

Currently, the error message only appears in a popover once we close the create dialog. However, we want the error message to be displayed directly in the input field without closing the create dialog as in the below image.

Error message:  {"error":{"code":"400","message":"Common destination PLM_COMMON_LAUNCHPAD_PATH does not exist. Please create a new destination with this name.","target":"in/workflowDefinitionId"}}

Looking for the solution as in the below image.

Seetharam1_0-1739513827772.png

Current behaviour as in the below image.
Once we close the create dialog, the message popover dialog opens.

Seetharam1_1-1739514045018.png

List Report with create action:

Seetharam1_3-1739514758499.png

 


Annotations Code:

Seetharam1_2-1739514360886.png

 

 

 

View Entire Topic
sandeep_rs
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

To my knowledge this will not work (also not in OP!). What you are trying is to have a validation against the entry from user in the parameter (and not validation against action) - so the response is for the valuehelp call, correct? If so the target does not help as it is looked for in the context of the valuehelp - which is the typeahead table - and not the context of the action (where the target lies)!

Could you setup a call with me and Marcel (D030990) to discuss the options here in more detail?

Best Regards,

   Sandeep

Seetharam1
Associate
Associate
0 Kudos
so the response is for the valuehelp call, correct? - That's right
Marian_Zeis
Active Contributor
0 Kudos

@Seetharam1 @sandeep_rs   Please post the solution if you have one here. Thanks!