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

modulpool programming

Former Member
0 Likes
1,513

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

15 REPLIES 15
Read only

Former Member
0 Likes
1,481

Hi,

in GUI Status we can maintain the Function keys, need to assign the Function code for the function keys.

Read only

0 Likes
1,481

I CAN NOT GET U???

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,481

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

Read only

Former Member
0 Likes
1,481

HI,

Check this link..

Read only

Former Member
0 Likes
1,481

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.

Read only

Former Member
0 Likes
1,481

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

Read only

0 Likes
1,481

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.

Read only

0 Likes
1,481

You're screaming. Now i'm not telling how to do it.

Read only

0 Likes
1,481

you can click on push button in screen painter. It displays the attributes window. In attributs Function code and function types are there.

Read only

0 Likes
1,481

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

Read only

0 Likes
1,481

sorry...to all..

but that was not my intension.

Read only

0 Likes
1,481

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.

Read only

0 Likes
1,481

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

Read only

Former Member
0 Likes
1,481

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

Read only

Former Member
0 Likes
1,481

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