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: 

Assign a function key to a push button in module pool program

former_member190312
Active Participant
0 Kudos

Hi all,

In my module pool program,there is 4 push buttons on screen 100.Those are SAVE,CLR , REPRINT & BACK.

i want to activate the function keys of computer keyboard

for those push buttons.

i.e F1 for SAVE.

F2 for CLR.

F3 for REPRINT.

F4 for BACK.

plz suggest me how to assign these function keys for those

functions(system commands).it is very urgent.

Regards

pabitra

1 ACCEPTED SOLUTION

former_member223537
Active Contributor
0 Kudos

Hi,

in the PBO type

SET PF-STATUS `ZPF`.

Double click on ZPF, enter the pf status description.

Then click Application Toolbar.

Type the button names as

SAVE - Then double click on save, a pop-up comes and asks for function key. Assign the required one. Also enter the description - Tool tip text

CLR - same as above

REPRINT - same

BACK - same

Activate the pf-status.

Now in the PAI, User command, handle the above ok-codes

eg.

okcode = sy-ucomm.

CASE okcode.

WHEN `BACK`.

Leave to screen 0.

ENDCASE.

Best regards,

Prashant

7 REPLIES 7

former_member223537
Active Contributor
0 Kudos

Hi,

in the PBO type

SET PF-STATUS `ZPF`.

Double click on ZPF, enter the pf status description.

Then click Application Toolbar.

Type the button names as

SAVE - Then double click on save, a pop-up comes and asks for function key. Assign the required one. Also enter the description - Tool tip text

CLR - same as above

REPRINT - same

BACK - same

Activate the pf-status.

Now in the PAI, User command, handle the above ok-codes

eg.

okcode = sy-ucomm.

CASE okcode.

WHEN `BACK`.

Leave to screen 0.

ENDCASE.

Best regards,

Prashant

0 Kudos

Hello pabitra,

look at status in the module pool.

regards.

Former Member
0 Kudos

Hi,

Double click on PF-status 'ABC',

goto utilities-> F key consistency. give your function code beside function keys F1,F2...

START-OF-SELECTION.
SET PF-STATUS 'ABC'.
WRITE 😕 'NEW'.
AT USER-COMMAND.
CASE SY-UCOMM.
  WHEN 'NEWB'.
   WRITE 😕 'TEST'.
ENDCASE.

Regards,

Sailaja.

0 Kudos

Hi

Double click on PF-status 'ABC',

goto utilities-> F key consistency. give your function code beside function keys F1,F2...

Thanks

Pranay

Former Member
0 Kudos

<>

Former Member
0 Kudos

You can use the 'freely assigned keys' in the PF-STATUS of the screen for this. However, you should not use F1, F3 and F4 , as they are standard shortcuts used by SAP.