‎2006 Nov 06 6:50 AM
‎2006 Nov 06 6:54 AM
Hi,
Fcode is function code.
Mainly used in dialogue programming and menubar.
EG.
If you have created any push button in application toolbar. How program will know that a specific push button is pressed.
via fcode.
hence in program logic we shall put desired code for pushbutton when fcode is called.
*MARK all helpful answers
‎2006 Nov 06 6:54 AM
Hi sarika,
1. Whenever the user does some action
eg.
a) presses ENTER
b) presses some BUTTON on screen,
c) presses some Toolbar button
d) presses some radiobutton/checkbox,
2. then some SIGNAL / CODE
is generated,
so that we can DETECT which button the user has pressed.
3. Such SIGNAL/CODE
gets stored in SY-UCOMM.
(this is called as fcode = function code)
regards,
amit m.
‎2006 Nov 06 6:54 AM
Not sure in what context you are talking. But usually you have FCODE associated with all the menu items / buttons that you have on the screen. You need to know these codes in order to write a BDC program.
Regards,
Ravi
‎2006 Nov 06 6:55 AM
Hi,
Fcode is normally used to allow user interaction.
If you press any Push button or u select any menu option, or icons in Standard tool bar, The function code will be set to SY-UCOMM. This is a system variable. Using this u can write ur logic.
ex.If-sy-ucomm eq 'DISP'.
perform disply.
If sy-ucomm eq 'SAVE'.
perform savecode.
Regds,
Vinsa.R
‎2006 Nov 06 7:03 AM
In each PAI event that a user triggers by choosing either a pushbutton on the screen or an element in a GUI status, the corresponding <b>function code</b> is placed into the system field syst-ucomm or sy-ucomm and placed in the OK_CODE field (as long as the function code is not empty). Empty function codes are placed in neither the sy-ucomm field nor the OK_CODE field.
In the Screen Painter, you can assign a function code (up to 20 characters long) to checkboxes and radio buttons. When a function code is assigned to a checkbox or radio button, clicking it not only changes the field contents, but also triggers the PAI event and places the function code in the OK CODE field.
Have a look at below links. It will surelu give you the idea abt how to use and where to use fcodes:
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbaa1335c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e6/83a0375b5dd003e10000009b38f8cf/content.htm
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers