‎2009 Mar 04 11:44 AM
hi experts..
how to assign a function key (f1, f2, f3...) to any push button, in modul pool programming.
thanks in advance.
Edited by: SAP ABAPER on Mar 4, 2009 12:56 PM
‎2009 Mar 04 12:01 PM
Hi,
in GUI Status we can maintain the Function keys, need to assign the Function code for the function keys.
‎2009 Mar 04 12:34 PM
‎2009 Mar 04 3:23 PM
Hi,
In PBO of the screen write:-
SET PF-STATUS 'ZPF_STAT'.
Double click on this pf-status name and you will be promted to create a pf-status. Click YES.
Now when you create buttons in this pf-status, you will be asked for shorcut keys for each one of them.
You can choose any one of the shorcut keys form the list displayed.
Now when you execute the program, these shortcuts will work...
Hope this solves your problem.
Regards,
Tarun
‎2009 Mar 04 12:40 PM
‎2009 Mar 04 1:43 PM
Hi
in the module module status_2000. uncoment it and there
set pf-status 'STATUS'.
u can assign a pf-status name for the above syntax as done on ' '.
Double clicking on it u go to the screen where u can define function codes in the application toolbar or assign function keys.
‎2009 Mar 05 6:31 AM
Hi,
First Doble click on ur screen
In PBO of the screen write:-
SET PF-STATUS 'ZPFStatusName'.
Double click on this pf-status name and you will be asked to create a pf-status. Click YES.
Now here you can create buttons in application toolbar and while creating assign shorcut keys (f1,f2,f3)for each one of them.
You can choose any one of the shorcut keys form the list displayed.
For events:
Now on screen PAI module:-check the value of sy-ucomm compare it with button naem and do the needful.
module user_command_9010 input.
case sy-ucomm.
when 'CREATE'.
write 'fg'.
when 'CHANGE'.
write 'changed'.
when 'DELETE'.
write 'Deleted'.
While execute the program, you can also use these shortcut keys.
http://www.sapdb.info/dialog-programming-module-pool/
Thanks,
Smita
Edited by: Smita Gupta on Mar 5, 2009 7:44 AM
Edited by: Smita Gupta on Mar 5, 2009 7:46 AM
‎2009 Mar 05 12:09 PM
THANKS ALL..
but u all are telling me about pushbuttons on application tool bar.
but my push buttons are on screen.
they are simple push buttons naming NEXT, CLEAR, BACK ETC.
SO TELL ME HOW TO ASSIGN FUNCTION KEYS TO PUSH BUTTONS WHICH ARE ON SCREEN NOT ON APPLICATION TOOL BAR.
‎2009 Mar 05 1:45 PM
‎2009 Mar 05 2:59 PM
you can click on push button in screen painter. It displays the attributes window. In attributs Function code and function types are there.
‎2009 Mar 05 3:14 PM
Please do not yell.
For emphasis, you can underline or use italics but NOT THIS.
If I understand you correctly, you want to assign a PF key to a button, but don't care about the function code. Is that correct?
Rob
Edited by: Rob Burbank on Mar 5, 2009 10:16 AM
‎2009 Mar 06 5:51 AM
‎2009 Mar 09 5:40 AM
For the Pushbuttons on screen you can assign a Function code in Screen. Double click on Screen and goto Element List.. Where there is a section to assign the Function code in Mod. Groups / Functions tab..
Second option is to create GUI_STATUS wherein you can add a button and assign a code to it. Which you can use as a constant (to refer in the program) like shown below.
Constants : c_fcode_ok LIKE sy-ucomm VALUE 'OK',
c_fcode_cancel LIKE sy-ucomm VALUE 'CANCEL'.
Please let me know if this helps.
‎2009 Mar 10 6:39 AM
Hi,
to assign Func keys to Push Buttons on Screen....
take for example u've created NEXT pushbutton on screen->Double click on it>Screen Attributes>Assign Func code there,say NXT->save+activate.
got to Status u've created for the screen say STATUS_100->Utilities> F Key Consistency> here u will find all the Func keys to which u want to assign Func code,say u want to assign F1 to NEXT pushbutton so there in F1 assign func code same as that of push button NEXT i.e. NXT->save activate
this is how you can link func code of pushbutton on screen with Funnc keys.
similarly you can do for others.
and in User-command you can check like:
if sy-ucomm = 'NXT'.
processing*
endif.
Hope this is clear to u....else tell me
Regards,
Neha
Edited by: Neha Shukla on Mar 10, 2009 12:09 PM
‎2009 Mar 09 10:16 AM
Hi , double click on that push button on designing screen,
it will take u to th eproperties in that u can find the funcion code there u write the key ((for e.g: for create assingn the key as create.)
and in program you write the logic with that f.key.
e.g:
case sy-ucom.
whren 'CREATE'.
write ur logc.
endcase.
Regards
‎2009 Mar 11 9:14 AM
hi
for example if u have created a UPDATE push button on a screen
then double click on that push button u will see one screen painter : attributes screen appears
in that u can see FCTCODE field & FCTTYPE field , in that field u assign the function code and function code type what ever u want.
Regards