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

Need to change the F1 function code

Former Member
0 Likes
1,403

Hi,

I have created a custom screen in which there are two push button. I need to create keyboard shortcuts using F1 and F4 function keys.

F1 and F4 are standard shortcuts. In my program, I need to use the F1 to go next screen and F4 is to clear the input fields.

F4 is working fine. It is clearing the input fields. But F1 doesnt work. When I press F1, it says "function code cannot be assigned"

What could be the issue?

Thanks,

Ezhil

3 REPLIES 3
Read only

Former Member
0 Likes
857

Hi,

try the below way..




process on value-request.

  field <field-name>    module f1_nextscreen.


module f1_nextscreen input.

      leave to screen <screennumber>.
endmoduel.

Prabhudas

Read only

Former Member
0 Likes
857

F1 is always SAP's HELP key....I wouldn't change that....use F2 or something else.

Read only

Former Member
0 Likes
857

Hi,

You can use ON HELP REQUEST for F1 help and ON VALUE REQUEST for F4 help if it is a report.

If it is module pool use Process on Help Request and Process on Value Request respectively.


at selection-screen on help-request for s_vbeln-low.
    message 'F1 hitted' type 'I'.

at selection-screen on value-request for s_vbeln-low.
    message 'F4 hitted' type 'I'.

Thanks,

Anmol.