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

function keys to call screen

Former Member
0 Likes
2,140

hi guys,

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

Thanks..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,706

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
Read only

Former Member
0 Likes
1,706

Hello,

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

Thanks,

Bharadwaj

Read only

0 Likes
1,706

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.

Read only

0 Likes
1,706

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.

Read only

0 Likes
1,706

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

Read only

naimesh_patel
Active Contributor
0 Likes
1,706

Hello,

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

Regards,

Naimesh

Read only

Former Member
0 Likes
1,706

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.

Read only

Former Member
0 Likes
1,706

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.

Read only

Former Member
0 Likes
1,707

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.

Read only

0 Likes
1,706

hi rainer,

how to do this:

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

set 'NEXT' to the 'F12' Key.

Read only

0 Likes
1,706

Hi !

Is your programm a report or a module-pool ?

See online help to the command SET PF-STATUS.

Regards

Rainer