<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Pf-Status in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332649#M513436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;If you think your question is answered please close the thread asssigning&lt;/P&gt;&lt;P&gt;reward points to the replyees.&lt;/P&gt;&lt;P&gt;Regards:&lt;/P&gt;&lt;P&gt;Sapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2007 15:45:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-18T15:45:12Z</dc:date>
    <item>
      <title>Pf-Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332643#M513430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you please tell me what is pf-status with some good examples?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 12:52:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332643#M513430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T12:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Pf-Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332644#M513431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET PF-STATUS&lt;/P&gt;&lt;P&gt;Finds out the current GUI status.&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;GET PF-STATUS &amp;lt;f&amp;gt; [PROGRAM &amp;lt;prog&amp;gt;] [EXCLUDING &amp;lt;itab&amp;gt;].&lt;/P&gt;&lt;P&gt;Returns the name of the current GUI status (the same as SY-PFKEY) into the variable &amp;lt;f&amp;gt;. The&lt;/P&gt;&lt;P&gt;PROGRAM addition writes the name of the ABAP program to which the status belongs into the&lt;/P&gt;&lt;P&gt;variable &amp;lt;prog&amp;gt;. The EXCLUDING addition returns a list of all currently inactive function codes&lt;/P&gt;&lt;P&gt;into the internal table &amp;lt;itab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aneesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 12:54:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332644#M513431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T12:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Pf-Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332645#M513432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SET PF-STATUS... 


Basic form 1 
SET PF-STATUS pfstat. 


Additions: 

1. ... EXCLUDING f or ... EXCLUDING itab 
2. ... IMMEDIATELY 
3. ... OF PROGRAM progname 



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. 



Note 
You can use a namespace prefix with status names. 


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. 


Example 
PBO module: 

MODULE PBO_100 OUTPUT. 
SET PF-STATUS 'S001'. 
ENDMODULE. 


Displays the screen 100 with a GUI framework which allows you to select functions assigned to the status S001. 



Note 
If you want to set a status for a screen, you must do so during the PBO event. The system always searches for the status pfstat in the GUI of the main program of the current program group . (However, see also the addition OF PROGRAM progname.) 

Example

PROGRAM PROGRAM1. 
... 
PERFORM UP1 IN PROGRAM PROGRAM2. 
... 


PROGRAM PROGRAM2. 
... 
FORM UP1. 
SET PF-STATUS 'ABCD' 
ENDFORM: 


The status ABCD of program PROGRAM1 is activated if PROGRAM1 is the program specified in the transaction definition. 


Notes 
If no GUI is defined in the list processing (or it is deactivated with SET PF-STATUS SPACE), the system supplies a standard user interface. 

This statement converts the contents of the field pfstat to type C. The converted value is used to search for the desired status. Since the conversion employs the standard conversion rules as for MOVE, you should use a field of type C for pfstat to avoid unwanted conversions. In this case, a field of type I with a value of 12 would give the key ' 12 '. 


Addition 1 
... EXCLUDING f 

... EXCLUDING itab 



Effect 
Deactivates one or more of the status functions, so that they cannot be selected. Specify the appropriate function codes using one of the following: 


a field f or a literal which contains a function code 

an internal table itab which contains several function codes 


This method allows you to modify the selectable functions of a status easily at runtime. 


Example
TYPES: BEGIN OF TAB_TYPE, 
        FCODE LIKE RSMPE-FUNC, 
      END OF TAB_TYPE. 

DATA: TAB TYPE STANDARD TABLE OF TAB_TYPE WITH 
               NON-UNIQUE DEFAULT KEY INITIAL SIZE 10, 
      WA_TAB TYPE TAB_TYPE. 

CLEAR TAB. 
MOVE 'DELE' TO WA_TAB-FCODE. 
APPEND WA_TAB TO TAB. 
MOVE 'AUSW' TO WA_TAB-FCODE. 
APPEND WA_TAB TO TAB. 
SET PF-STATUS 'STA3' EXCLUDING TAB. 


Sets the status STA3 which renders the functions with the function codes DELE and AUSW inactive. 


Addition 2 
... IMMEDIATELY 

Effect 
List processing: The status becomes effective for the last list displayed and is not flagged for the next secondary list. In screen processing, this addition has no effect because every status becomes immediately effective anyway. 


Example 
Event in program: 

START-OF-SELECTION. 
  SET PF-STATUS 'MAIN'. 
  WRITE SY-PFKEY. 

AT USER-COMMAND. 
  CASE SY-UCOMM. 
    WHEN 'F002'. 
      SET PF-STATUS '0002' IMMEDIATELY. 
      EXIT. 
    ... 
  ENDCASE. 


Selecting the function F002 in the basic list (contents MAIN, status MAIN) redisplays the basic list, but this time with the status 0002. 


Note 
Without the addition ... IMMEDIATELY, the old status MAIN becomes active again. 



Addition 3 
... OF PROGRAM progname 


Effect 
The system does not look for the status pfstat in the GUI of the main program of the current program group, but in the program whose name is specified in the field progname. 



Note 
Only use this addition if the status contains no dynamic texts. 
Since the system searches for the texts in the program to which the status belongs (that is, in program progname) the calling program will not be able to fill the dynamic texts. External statuses containing dynamic texts should be assigned to a functino group, and activated by a function module that both fills the dynamic text fields and sets the status. 

Example 

DATA PROGR LIKE SY-REPID. 

... 

MOVE 'TESTPROG' TO PROG. 

... 

SET PF-STATUS 'ABCD' OF PROGRAM PROG. 


The system activates the status ABCD of program TESTPROG. 


Note 
You can use the OF PROGRAM addition in conjunction with the EXCLUDING itab and IMMEDIATLEY additions. 


Additional help 
Using GUI Statuses 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 12:57:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332645#M513432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T12:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Pf-Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332646#M513433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  With Set PF-Status you can set the Gui status of a screen. You can create your own buttons in both the application tool bar and menu bar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Haritha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 12:57:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332646#M513433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T12:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Pf-Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332647#M513434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To assign a dialog status to a screen, use the ABAP statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SET PF-STATUS stat [OF PROGRAM prog]&lt;/P&gt;&lt;P&gt;                   [EXCLUDING f|itab].&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM demo_dynpro_gui_status.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: ok_code TYPE sy-ucomm,&lt;/P&gt;&lt;P&gt;      save_ok LIKE ok_code,&lt;/P&gt;&lt;P&gt;      output  LIKE ok_code.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;MODULE init_screen_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  SET PF-STATUS 'STATUS_100'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;  SET TITLEBAR '100'.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;MODULE user_command_0100 INPUT.&lt;/P&gt;&lt;P&gt;  save_ok = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  CASE save_ok.&lt;/P&gt;&lt;P&gt;    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.&lt;/P&gt;&lt;P&gt;      LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;    WHEN OTHERS.&lt;/P&gt;&lt;P&gt;      output = save_ok.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sapna.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*do assign points for the same...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 13:00:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332647#M513434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T13:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Pf-Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332648#M513435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba34635c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba34635c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_sem60/helpdata/en/9f/dba99935c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_sem60/helpdata/en/9f/dba99935c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Look at the Demo program&amp;lt;b&amp;gt; demo_list_menu_painter&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 13:01:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332648#M513435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T13:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Pf-Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332649#M513436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;If you think your question is answered please close the thread asssigning&lt;/P&gt;&lt;P&gt;reward points to the replyees.&lt;/P&gt;&lt;P&gt;Regards:&lt;/P&gt;&lt;P&gt;Sapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 15:45:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332649#M513436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T15:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Pf-Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332650#M513437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt; We can define our own GUI status for lists and attach it to a list level using the   SET PF-STATUS statement&amp;lt;/b&amp;gt;. If you do not set a particular GUI status, the system sets a default list status for the list screen in an executable program. In other programs, for example, when you call a list from screen processing, you must set this status explicitly using the statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SET PF-STATUS space.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You set the dialog status for lists in the same way as for normal screens, that is, using the statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SET PF-STATUS &amp;lt;stat&amp;gt; [EXCLUDING &amp;lt;f&amp;gt;|&amp;lt;itab&amp;gt;] &lt;/P&gt;&lt;P&gt;                     [OF PROGRAM &amp;lt;prog&amp;gt;]&lt;/P&gt;&lt;P&gt;                     [IMMEDIATELY].&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement sets the status &amp;lt;stat&amp;gt; for the current output list. The dialog status &amp;lt;stat&amp;gt; must be defined for the current program, unless you have used the OF PROGRAM addition to set a status from another program &amp;lt;prog&amp;gt;. The status is active for all subsequent list levels until you set another status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT demo_list_menu_painter.

START-OF-SELECTION.

  SET PF-STATUS 'TEST'.

  WRITE:  'Basic list, SY-LSIND =', sy-lsind.

AT LINE-SELECTION.

  WRITE:  'LINE-SELECTION, SY-LSIND =', sy-lsind.

AT USER-COMMAND.

  CASE sy-ucomm.
    WHEN 'TEST'.
      WRITE:  'TEST, SY-LSIND =', sy-lsind.
  ENDCASE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This program uses a status TEST, defined in the Menu Painter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function key F5 has the function code TEST and the text Test for demo. &lt;/P&gt;&lt;P&gt;Function code TEST is entered in the List menu. &lt;/P&gt;&lt;P&gt;The function codes PICK and TEST are assigned to pushbuttons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ashokreddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 16:01:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status/m-p/2332650#M513437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T16:01:44Z</dc:date>
    </item>
  </channel>
</rss>

