Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dynamically assign function keys to gui-status

JaySchwendemann
Active Contributor
0 Likes
1,354

Hi all,

I have a function module pretty much like "POPUP_TO_CONFIRM". I would like to ask if it is possible to dynamically assign function keys to the buttons on the popup dialog. The assigned function keys would have to change according to the question / button coding, see the examples below

Example 1:

Question: "Do you want to execute?"

Button 1: Execute (Function key should be F8)

Button 2: Abort (Function key should be F12)

Example 2:

Question: "Do you want to save?"

Button 1: Yes (Function key should be F5)

Button 2: No (Function key should be F3)

So: Is it possible to change the linked function key in the gui status dynamically?

Thanks a lot

Cheers

Jens

1 ACCEPTED SOLUTION
Read only

Kiran_Valluru
Active Contributor
0 Likes
872

Hi.,

Yes it is possible to dynamically change Function Codes in Gui Status., But for your requirement.,

You create 1 screen (100) with text .

Now Create 2 Gui Statuses ., One with Function buttons Execute (F8) and Abort (F12) and Other with Function Buttons Yes (F5) and No (F3).

Now In your Report.,

When you press Execute or save .,

call screen 100 starting at ... ending at ... .

In PBO.,

if execute.

text = 'Do you want to execute?'.

set pf-status 'ZPFSTAT1'.

else if you press Save.,

text = 'Do you want to Save?'.

set pf-status 'ZPFSTAT2'.

Also .,

You can create 2 screens with two defferent texts and in each screen PBO Set the Corresponding PF Status.

hope this helps u.,

Thanks & Regards,

Kiran

2 REPLIES 2
Read only

Kiran_Valluru
Active Contributor
0 Likes
873

Hi.,

Yes it is possible to dynamically change Function Codes in Gui Status., But for your requirement.,

You create 1 screen (100) with text .

Now Create 2 Gui Statuses ., One with Function buttons Execute (F8) and Abort (F12) and Other with Function Buttons Yes (F5) and No (F3).

Now In your Report.,

When you press Execute or save .,

call screen 100 starting at ... ending at ... .

In PBO.,

if execute.

text = 'Do you want to execute?'.

set pf-status 'ZPFSTAT1'.

else if you press Save.,

text = 'Do you want to Save?'.

set pf-status 'ZPFSTAT2'.

Also .,

You can create 2 screens with two defferent texts and in each screen PBO Set the Corresponding PF Status.

hope this helps u.,

Thanks & Regards,

Kiran

Read only

0 Likes
872

Hi Kiran,

you mention that it is possible to change function codes in a gui status dynamically.

Cann you give me a hit how that is possible?

Thank you very much,

Gianpietro