cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Default values with abstract entity

rameshputta
Participant
0 Likes
3,588

Hello,

On click of a button on my list report I am calling an abstract entity as a popup with couple of parameters in it.

Is it possible to set default values into these parameters based on the user ?

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Harish_Vatsa
SAP Champion
SAP Champion

Hello rameshputta,

In the abstract entity, define the input parameters that will be passed to the popup. Within the onBeforeRendering method of the abstract entity, implement the logic to set default values for these parameters based on the user. Retrieve user-specific data, such as the logged-in user's ID, using the appropriate APIs or methods. Utilize this user-specific data to determine the default values for the parameters and assign them directly to the respective parameter fields within the onBeforeRendering method.

When the button is clicked and the popup is opened, the default values specified in the abstract entity will be passed to the popup. These default values can then be used as required within the popup logic.

--

Regards,

Answers (2)

Answers (2)

patrick_winkler
Product and Topic Expert
Product and Topic Expert
0 Likes
cedietan1
Newcomer
0 Likes
Hi, thank you but I am getting "Annotation 'UI.defaultValue' unknown"
Ramjee_korada
Active Contributor
0 Likes

Hi Ramesh,

Please check this and it should work for custom action with parameters.

https://sapui5.hana.ondemand.com/sdk/#/topic/5ada91cc1ad8455bbfb7e6aee96383f2.html

Best wishes,

Ramjee Korada