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: 

PF-STATUS

Former Member
0 Kudos

What does PF stand for in PF-STATUS.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Well it used to be that function keys were known as PF-Keys = personal function keys... I have therefore always assumed PF-STATUS reflects this history - it's just where you set the personal function codes for the program.

Jonathan

see also

http://en.wikipedia.org/wiki/Function_key

2 REPLIES 2

Former Member
0 Kudos

Hi

PF means FUNCTION CODE

PF-STATUS is used to set the GUI Status of a screen, ie you can control the options on your menu bar, application toolbar, the function keys assigned to various options etc.

Implementing the status for a screen can be done in 2 ways:

1) Create the GUI status using the object list of the program or by using the transaction SE41. Then, assign it to the screen using SET PF-STATUS statement.

2) Create the GUI status by means of forward navigation, ie, use the SET PF-STATUS 'XXX' statement where 'XXX' is the name of the GUI status and double click on it to create it.

Status names can have a maximum of 20 characters.

After assigning a GUI status to a screen, this is inherited to all subsequent screens. In order to have a different status for each of the subsequent screens, you have to set a separate status for each screen.

In transaction SE41,

1) Give the program name and the status name and click on the Create button.

2) Go to 'Function keys' and expand.

3) On top of the save icon type SAVE, on top of the back icon type BACK, on top the the exit icon type EXIT etc ie on top of all the icons that you want to use, type the respective names that you want to give.

Whatever you have typed now becomes the function codes of these icons and can be used in your program.

For example you have a screen 100.

In the 'Element list' tab of the screen, give "ok_code" as the name where "OK" is the type of screen element. Activate screen.

The flow logic for the screen looks like this:

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0100.

Create the modules STATUS_0100 and USER_COMMAND_0100 in the main program by simply double clicking on them.

The code for these modules can be something like this:

MODULE status_0100 OUTPUT.

SET PF-STATUS 'Example'. "Example is the name of the GUI status

ENDMODULE.

MODULE user_command_0100 INPUT.

CASE ok_code.

WHEN 'SAVE'.

"call a subroutine to save the data or give statements to save data.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE.

Reward points if helpful.

Former Member
0 Kudos

Well it used to be that function keys were known as PF-Keys = personal function keys... I have therefore always assumed PF-STATUS reflects this history - it's just where you set the personal function codes for the program.

Jonathan

see also

http://en.wikipedia.org/wiki/Function_key