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

Former Member
0 Likes
869

Hi

What is pf status? Pls explain in detail with sample code.

Hi

What is pf status? Pls explain in detail with sample code.

6 REPLIES 6
Read only

Former Member
0 Likes
810

if you see any screen in SAP, that screen will have

1. menu bar

2. standard tool bar

3. application tool bar.

the same 3 options,if you want to give it to your programs,you can do that with PF STATUS.

this can be achieved in programs by using the ABAP statement,

SET PF-STATUS 'STATUS_01'.

IF YOU double click on this STATUS_01, it will take you to the SE41 transaction,where you can give the above 3 fields.

Regards

Srikanth

Read only

abdul_hakim
Active Contributor
0 Likes
810

HI

Itz used to define the user interface for screens..say for eg..buttons in the application tool bar

,menu items etc..

it seems u r brand new to ABAP.

Plz read the documentation under http://help.sap.com

for sample programs check the tcode ABAPDOCU.

Cheers,

Abdul Hakim

Mark all useful answers...

Read only

Former Member
0 Likes
810

Hi,

To assign a dialog status to a screen, use the ABAP statement

<b>SET PF-STATUS stat [OF PROGRAM prog]
                   [EXCLUDING f|itab].</b>

This statement defines the user interface for all subsequent screens of a screen sequence until another dialog status is set using a new SET PF-STATUSstatement. The dialog status stat must be a component of the current ABAP program, unless you use the OF PROGRAM addition to set a dialog status of another program prog.

The EXCLUDING addition allows you to change the appearance and function of a dialog status dynamically. This is useful if the individual user interfaces for a range of screens are very similar. You can define a single global status, and then just deactivate the functions you do not need using EXCLUDING. Specify f to deactivate the function code stored in field f. Specify itab to deactivate all function codes stored in the internal table itab. The field f and the rows of table itab should be of the type c with the length 20.

You should set the dialog status for a screen in the PBO event. If you do not specify a dialog status for a screen, it is displayed with the interface of the previous screen. If you do not specify a dialog status for the first screen of a program, it has no user interface, and the user may not be able to leave the screen.

<b>Example Program</b>

PROGRAM demo_dynpro_gui_status.

DATA: ok_code TYPE sy-ucomm,
      save_ok LIKE ok_code,
      output  LIKE ok_code.

CALL SCREEN 100.

MODULE init_screen_0100 OUTPUT.
<b>  SET PF-STATUS 'STATUS_100'.</b>
  SET TITLEBAR '100'.
ENDMODULE.

MODULE user_command_0100 INPUT.
  save_ok = ok_code.
  CLEAR ok_code.
  CASE save_ok.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
      LEAVE PROGRAM.
    WHEN OTHERS.
      output = save_ok.
  ENDCASE.
ENDMODULE.

Click on the STATUS_100, it will open a screen, you can fill the fields and go on with the navigation

Regards

Sudheer

Read only

Former Member
0 Likes
810

To represent ur report aoutput with menu bar and application tool bar u have to use this PF-status.

Suppose in ur report out put u want save button or so on u have to use this.

Syntax:

set pf-status

Once u double click on pf-status, u will be guided to next screen where u can enter the reuired things.

Regards

Read only

Former Member
0 Likes
810

hi,

<b>1</b>. <b>MENU BAR, STANDARD TOOL BAR, TITLE BAR and APPLICAION TOOL BAR</b> together are called PF status.

<b>2</b>. if u have no PF-status of ur own, SAP will have its standard items. u can change them by creating ur own PF-STATUS and attach it to a screen.

<b>3</b>. syntax : SET PF-STATUS <status>. u write it in PBO.

<b>4</b>. in menu painter <b>SE41</b> u do this.

hope it helps..

reward if useful..

Read only

anversha_s
Active Contributor
0 Likes
810

hi,

SET PF-STATUS pfstat.

Effect

Sets a GUI (Graphical User Interface) status pfstat which can be up to 20 characters long. 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. For further information about this, refer to the Menu Painter documentation.

Each status has a name which may be up to 8 characters long.

Setting a status makes the functions contained therein selectable.

This method allows you to vary the available functions according to the current screen, list level and/or previous program flow.

The current status is stored in the system field SY-PFKEY.

A status remains valid for the duration of a transaction or until you set a new status.

Example

Event in program:

START-OF-SELECTION.

SET PF-STATUS 'MAIN'.

WRITE SY-PFKEY.

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'F001'.

SET PF-STATUS '0001'.

WRITE SY-PFKEY.

...

ENDCASE.

Produces a list (contents MAIN) with a GUI framework which allows you to select functions assigned to the the status MAIN. If you choose the function code F001 (e.g. from the menu or by pressing a pushbutton), you trigger the event AT USER-COMMAND . This generates a secondary list (contents 0001) with a GUI framework which allows you to select functions assigned to the status 0001. On returning from the secondary list to the basic list the status MAIN is reactivated.

rgds,

anver

pls mark points if helped