‎2007 Oct 04 8:49 AM
‎2007 Oct 04 8:50 AM
HI,
that is for attaching menu to a list or screen.
for that u have to use the statement
SET PF-STATUS 'MYMENU'.
this MYMENU we have to define in se41(MENU PAINTER)
see this link
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba34635c111d1829f0000e829fbfe/content.htm
rgds,
bharat.
‎2007 Oct 04 8:52 AM
Hi,
PF status is used to design your own MENU,APPLICATION tool BAR and other FUNCTION key's which is required for your own transaction program,
When you wants the facilities like, BACK,CANCEL,PRINT,SAVE etc on your own screen you have to design them in the PF status only.
Steps :
SET PF-STATUS 'XXX'.
double click on it...n it will give a popup to enter the short descrp.
Then here you can create the fields like Save, Back.
Then you have to write appropriate coding for all fields in SE38.
Case user-command.
When 'Exit'.
leave Program.
Endcase.
‎2007 Oct 04 8:52 AM
SET PF-STATUS - Screen
Syntax
SET PF-STATUS status [OF PROGRAM prog] [EXCLUDING fcode].
Extras:
1. ... OF PROGRAM prog
2. ... EXCLUDING fcode
Effect:
During screen processing, this statement defines the GUI status defined in status for the subsequent screen layouts. The components of the set status are active in the user interface from the next time a screen layout is sent, and remain active until the end of the program or until the next SET PF-STATUS statement. The name of the current GUI status can be read from the system field sy-pfkey .
For status, a character-type data object must be specified that contains either the name of the GUI status of the main program of the current program group, or the program specified in upper case in prog, or it only contains blank characters. If the status is not available, an empty status is displayed, in which no control elements are active except for the predefined system functions. Of these functions, only the Enter key, to which an empty function code is assigned in this case, triggers the event PAI. If the data object status contains only blank characters, the standard list status is set and the additions have no effect.
Note
If a switch is assigned to an element of the GUI status in the Menu Painter, this controls the activation of this element.
Addition 1
... OF PROGRAM prog
Effect:
By default, a GUI status defined in the current main program is used. The addition OF PROGRAM can be used to set the GUI status of the program specified in prog. A character-type data object that contains the name of the ABAP program in upper case is expected for prog.
Addition 2
... EXCLUDING fcode
Effect:
The addition EXCLUDING can be used to deactivate functions of the set GUI status. An inactive function cannot be selected in the user interface. For fcode, either a character-type data object or an internal table with a flat character-type data type can be specified. The functions, whose function codes are contained in the field or in the rows of the internal table, are deactivated. Only one function code can be specified for each row of the table. The codes are not case-sensitive. Function codes specified in fcode, for which there is no function in the GUI status, are ignored.
Notes:
The GUI status of a screen must be set at the latest during the event PBO. If no GUI status is set for a screen, the empty status described above is used.
If the set GUI status contains dynamic function texts, the function texts are read from the assigned global data objects of the program in which the GUI status is defined. If these do not exist, question marks (?) are displayed. For dynamic function texts, an explicitly specified program prog is loaded into the current program group if it does not already exist in the internal session. This enables access its global data objects.
The statement SET PF-STATUS has a variant for the GUI status of lists.
‎2007 Oct 04 8:54 AM
Hi Raman,
PF status is used to design your own MENU,APPLICATION tool BAR and other FUNCTION key's which is required for your own transaction program,
When you wants the facilities like, BACK,CANCEL,PRINT,SAVE etc on your own screen you have to design them in the PF status only
SET PF-STATUS also used for defining menu in the program and screens...
For that first you need to create the GUI Status for the program in which you are going to use the GUI Status....
GUI Status contains the Menubar , Standard Toolbar & Application Toolbar.
You can create it by this way...
SE80
Create Program
Right Click on Program
Create --> GUS Status...
Give Name of that GUI Status.. ( Further it will be useful in the program )
Now it opens the window where you can design your own menu & toolbar...
Design it...
Now save and activate it..
Now come back to your program (ABAP Editor )
Write the first statement like below..
SET PF-STATUS 'MENU1'.
Here MENU1 is the name of the GUI status which you created from SE80..
You can handle the user command here using
case sy-ucomm.
when 'SE11'.
call transaction 'SE11'.
when 'NEXT'.
Some logic...
endcase.
Reward if helpful.
Regards,
Harini.S
‎2007 Oct 04 8:55 AM
setting PF-STATUS is nothing but setting a menu.
u can create a menu in se41