Application Development 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: 

function keys to call screen

Former Member
0 Kudos

hi guys,

how to set my function keys (e.g. F8) to call another screen (e.g. screen 200)?

Thanks..

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi !

Define in your GUI-Status any key of your choice i.e.

set 'NEXT' to the 'F12' Key.

In the PAI of you entry-screen do the following:

IF sy-ucomm = 'NEXT'.

call screen 200.

endif.

If the screen 200 is defined that should work.

Regards

Rainer

Some points would be fine if that helped a bit.

11 REPLIES 11

Former Member
0 Kudos

Hello,

Do u want to call the screen from the list output?

Thanks,

Bharadwaj

0 Kudos

I have a screen with button labeled f1, f2 so on..

if i press the function key f2 from my keyboard for example, i should go to another screen.

0 Kudos

HI lana,

1. I don't think we can assign

F1-F4 (they are reserved for sap)

2. F5 and onwards we can assign.

3. however we can assign

Shift-F2

Shift-F3 and onwards.

4. In that case also, (whether we have buttons on screen

or not)

we have to create GUI STATUS

and assign function codes there itself.

5. Create a new program.

and copy paste this code.

report abc.

SELECTION-SCREEN : PUSHBUTTON 10(10) but1 USER-COMMAND mybut.

initialization.

set pf-status 'ABCD'.

at selection-screen.

break-point.

6. Double click on ABCD and create a new gui status.

there u create a new icon in application toolbar .

The system will automatically ask

to assign the function key.

regards,

amit m.

0 Kudos

Hi You can use Function keys from F4 to F9 to set your process .

check the following code .

REPORT ZSETPF .

START-OF-SELECTION.

WRITE: 'TEST' .

AT PF4 .

WRITE:'F4' .

AT PF5 .

WRITE:'F5' .

AT PF6 .

WRITE:'F6' .

AT PF7 .

WRITE:'F7' .

AT PF8 .

WRITE:'F8' .

AT PF9 .

WRITE:'F9' .

----


for your Requirement .

you can use following

REPORT ZSETPF .

START-OF-SELECTION.

WRITE: 'TEST' .

AT PF8 .

WRITE:'F8' .

call screen 2000 .

.

Hope it helps you

Regards

Siddharth

naimesh_patel
Active Contributor
0 Kudos

Hello,

In start of selection, you can use like if sy-ucomm = 'ONLI' then call screen 200.

Regards,

Naimesh

Former Member
0 Kudos

Hi lana,

1. For that we will have to first

explicitly create a toolbar

(gui status)

2. In that we need to take

button(s)

and assign them the function key (eg. F8)

3. Then the toolbar will also appear,

and function keys will also work.

4. For that we have to detect

sy-ucomm and write our code.

regards,

amit m.

Former Member
0 Kudos

I think you can assign this function keys to any button on your previous screen. Then you can hide those buttons if you dont want to show them. Finally from SY-UCOMM you can check out for function code you assigned to that button. This is the simplest way i can think of.

Hope it helps a little !!! Reward if it was useful !!

Jignesh.

Former Member
0 Kudos

Hi !

Define in your GUI-Status any key of your choice i.e.

set 'NEXT' to the 'F12' Key.

In the PAI of you entry-screen do the following:

IF sy-ucomm = 'NEXT'.

call screen 200.

endif.

If the screen 200 is defined that should work.

Regards

Rainer

Some points would be fine if that helped a bit.

0 Kudos

hi rainer,

how to do this:

Define in your GUI-Status any key of your choice i.e.

set 'NEXT' to the 'F12' Key.

0 Kudos

Hi !

Is your programm a report or a module-pool ?

See online help to the command SET PF-STATUS.

Regards

Rainer