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

pf-status problem

Former Member
0 Likes
1,645

hi,

i am working on a code in which there is mentioned that pf-status is 'Main'. I want to know that what dat means? wha is the fucntionality of pf -status.

plzzz provide me guidleines to solve this problem.

9 REPLIES 9
Read only

Former Member
0 Likes
1,334

Hi,

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.

Regards,

Omkaram.

Read only

Former Member
0 Likes
1,334

hi,

double click on 'MAIN'.

you will be navigated to a screen.

there you will known, what is pf-status.

(or) go to tcode se41,

give your program name and status as MAIN

and choose display.

Regards,

R K.

Read only

Former Member
0 Likes
1,334

Sets a GUI (Graphical User Interface) .

There are many of these statuses in the GUI of a program. Each one describes which functions are available and how you can select these via menus and menu bars or by pressing function keys or pushbuttons.

create it using se41.

set pf-status 'main'.

Press F1 on it for more help.

Read only

_IvanFemia_
Active Contributor
0 Likes
1,334

Hi,

what do you mean?

You have a code like this?

SET PF-STATUS 'MAIN'

If so, main is the name of the status object...

Double click on it or use SE41.

Regards,

Ivan

Read only

0 Likes
1,334

Hi,

I had checked that the program name and pf-status ,when i execute it gives the message :-

Main interface has not been created. but there is a code in the program available in it.

Read only

0 Likes
1,334

hi do like this ...

write the pf-status in capital letters like this ...

set pf-status 'MAIN'.

and double click on 'MAIN' it will take to you to a screen where you can create a custom tool bar.

Read only

Former Member
0 Likes
1,334

HI.

PF-STATUS is used to design your custom menu and to the report program/ dailog program.

SE41 is used to create the PF-STATUS

Refr to this link..http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dba99935c111d1829f0000e829fbfe/content.htm

Read only

Former Member
0 Likes
1,334

hi,

PF Status is used to define ur own menu where in u can have ur own buttons as per ur requirement.

Use SE41 for PF Status.

and Double Click on MAIN and u wil come to know what type of menu it is.

Thanks

Suraj S Nair

Read only

Former Member
0 Likes
1,334

Hello Ricx,

PF-STATUS can be said in a nut-shell as the standard set of buttons given to your screen.

For example; you have BACK, CANCEL, EXIT buttons on a screen, moreover you can give your own buttons besides these standard buttons.

And you got to catch the function-code assigned to these buttons and in the PAI section of screen you give the behavior to screen.

CASE sy-ucomm.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

WHEN 'CANCEL'.

LEAVE TO SCREEN 0.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

Moreover, if you have set Pf-Status for a screen, then you have to reassign another Pf-Status for another screen, since the attributes of the same screen will be carried forward.

Regards,

Zahack