cancel
Showing results for 
Search instead for 
Did you mean: 

How to gain control over F8 button in Personas 2.0

Sunitkroy
Participant
0 Kudos

Hi All,

In a screen I have a script button where I have input field validations and also I have script to press the standard SAP provided run button to execute the subsequent flow. So when user is pressing the script button my flow is working as per expectation but when user is pressing F8 button all the field validations getting bypassed which I dont want.

Is there any way/place where  I can put my validation which gets executed while users push F8?

Thanks in advance!

Sunit.

Accepted Solutions (0)

Answers (1)

Answers (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Sure - you can replace the standard F8 button with your own that first runs your validation script and if everything is correct, it presses the standard "Execute" button.

Sunitkroy
Participant
0 Kudos

Hi Tamas - Thx for replying. I have my script button and when users press my script button everything goes smooth as I already stated in my earlier post. Problem is I can not restrict users not to press F8 from Key Board and when they press F8 from Key Pad all my scripting placed in my script button gets skipped!

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Unfortunately Personas doesn't allow disabling function keys.

Sunitkroy
Participant
0 Kudos

Hi Tamas - Ok, in that case how can I catch the event from my script when Users press F8 button from Key Board?

Thanks

Sunit

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

I'm not aware of any way to do that, sorry.

Same like suppressing the right-click context menu... also not possible.

former_member189842
Participant
0 Kudos

Hi Tamas,

This seems a valid business case for me and SAP personas product team needs to be notified about this. Also do we have a feature suggestion page, which I think is needed  a lot for this technology more than any thing as some times we are really struck and there are no possible other ways.

Hi Sunit,

I have a  vague suggestions for you to research if this feature is a blocker for you.


1) edit the personas index page,   /sap/bc/bsp/persos/mainapp/index.html add a  script that listens to f8 and block it right there. You can't propagate the even to personas as there is silverlight in between and you can't access personas DOM.


Try it, it might or might not work though.

Thanks,

Bhaskar

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

I agree that it is a valid business case to be able to control / suppress certain unwanted functions and to disable the right-click context menu too if so desired.

We already talked about this and it is on the radar screen but there is currently no decision when (or if) this will be provided.

The idea about editing the index.html source seems to be interesting, I wonder if this works. The problem with this of course is that if it does work, then it has a global effect which is probably not what most people would want...

former_member189842
Participant
0 Kudos

I Know it is a global effect in personas, but there is no harm as you said the f8 is never handled anyway.

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

I wouldn't agree that "the f8 is never handled anyway". I definitely see many situations where someone would like to keep the standard functionality of F8, so blocking it on a global scale is not a good idea.

0 Kudos

Hi Tamas,

Is there any way to Trigger my script when user hits "F8" key from keyboard.

I didn't understand how my script will be added to the available events provided by SAP, Or is there any other way?

Thanks in Advance.

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

This was a very old thread from almost five years ago, related to Personas 2.0

In Personas 3.0, you can assign your own script to the F8 key's onClick event, so your logic is executed first when the button is clicked. After that, it's up to you whether you want to let the standard F8 logic run or not. In the latter case, you can end your script with 'return true;' which will suppress the standard logic.

0 Kudos

Thanks Tamas for your reply.

But in my system, Script event button is disabled and I checked clicking on F8 Button so that it will be enabled but no result.See below snap.

But when I click on any on screen parameters or text boxes the script event button is enabled showing 'Onclick' and 'OnF4' events, can you please help me to get it?

Thanks.