cancel
Showing results for 
Search instead for 
Did you mean: 

Disable selection of item based on a condition in SAP RAP

0 Kudos

Dear Experts,

We are in the process of creating a BTP APP via RAP, which will have the following scenario.

The initial screen of the app, will be looking as the attached screenshot. I am looking at a possibility of disabling of the selection of items based on the condition, e.g if the weight is 40, the selection of the product should be disabled. just and ex scenario.

Is there a way this can be achieved using the annotations or the virtual component concept?

Any inputs will be highly appreciated. Thankyou

Best Regards,

Sudha

Altarkawi
Participant

Hello Sudha,

I'm don't know if this is possible in RAP but you can extend the RAP based application with Controller Extension and then that would be possible, is that the case?

Best Regards,
Mohammed

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member14709
Contributor
0 Kudos

Hello Sudha,

I assume you would want to click on some buttons to perform some action after selecting some item(s) in the list. Instead of disabling the items, you can always disable the action which you want to perform based on your condition using RAP Feature control. You can learn more about feature controls in RAP here

https://help.sap.com/docs/ABAP_PLATFORM_NEW/fc4c71aa50014fd1b43721701471913d/a5055eef86fa492d99a29b3...

Hope this helps!

Thanks,

Aman Garg

0 Kudos

Hi Aman,

Thanks for the hint. In our case here, since multi selection is available, there is a lot chance that other items which are relevant could be selected as well. If i am not wrong, if one item which is relevant for selection is available, then the button will be enabled, this would be confusing to the users.

Looks like there is an option to do the same in the UI5 frontend, was wondering, if this could be used in RAP as well

Best Regards,

Sudha