<?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 pf status and function codes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647834#M878544</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;I have a report where in i have to add a new icon with a tick symbol along with the existing execute icon ie f8.I have copied the status of the program into another before adding the new icon and to that i have added the new icon and function code.&lt;/P&gt;&lt;P&gt;i have used set pf-status in the initialisation event.Now when i give the select options and press f8 it enters into the program but sy-ucomm is still empty and does not do the desired functionality.If i click the icon for test run it does not enter the program itself.Can anyone help me out on this.&lt;/P&gt;&lt;P&gt;The status is activated in se41.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points will be rewarded.&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sowmya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Apr 2008 07:31:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-09T07:31:47Z</dc:date>
    <item>
      <title>pf status and function codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647834#M878544</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;I have a report where in i have to add a new icon with a tick symbol along with the existing execute icon ie f8.I have copied the status of the program into another before adding the new icon and to that i have added the new icon and function code.&lt;/P&gt;&lt;P&gt;i have used set pf-status in the initialisation event.Now when i give the select options and press f8 it enters into the program but sy-ucomm is still empty and does not do the desired functionality.If i click the icon for test run it does not enter the program itself.Can anyone help me out on this.&lt;/P&gt;&lt;P&gt;The status is activated in se41.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points will be rewarded.&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sowmya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2008 07:31:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647834#M878544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-09T07:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: pf status and function codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647835#M878545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba34635c111d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba34635c111d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2008 07:38:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647835#M878545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-09T07:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: pf status and function codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647836#M878546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sowmya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the following code to show button in tool bar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dont use 'Set pf-status'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add button to application toolbar&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECTION-SCREEN FUNCTION KEY 1.  "Will have a function code of 'FC01'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'icon_name'to SSCRFIELDS-FUNCTXT_01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Talwinder&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2008 07:44:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647836#M878546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-09T07:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: pf status and function codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647837#M878547</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;just try like that used in the report: &lt;STRONG&gt;demo_list_at_user_command&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

START-OF-SELECTION.
  WRITE: 'Basic List',
       / 'SY-LSIND:', sy-lsind.

TOP-OF-PAGE.
  WRITE 'Top-of-Page'.
  ULINE.

TOP-OF-PAGE DURING LINE-SELECTION.
  CASE sy-pfkey.
    WHEN 'TEST'.
      WRITE 'Self-defined GUI for Function Codes'.
      ULINE.
  ENDCASE.

AT LINE-SELECTION.
  SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
  PERFORM out.
  sy-lsind = sy-lsind - 1.

AT USER-COMMAND.
  CASE sy-ucomm.
    WHEN 'FC1'.
      PERFORM out.
      WRITE / 'Button FUN 1 was pressed'.
    WHEN 'FC2'.
      PERFORM out.
      WRITE / 'Button FUN 2 was pressed'.
    WHEN 'FC3'.
      PERFORM out.
      WRITE / 'Button FUN 3 was pressed'.
    WHEN 'FC4'.
      PERFORM out.
      WRITE / 'Button FUN 4 was pressed'.
    WHEN 'FC5'.
      PERFORM out.
      WRITE / 'Button FUN 5 was pressed'.
  ENDCASE.
  sy-lsind = sy-lsind - 1.

FORM out.
  WRITE: 'Secondary List',
       / 'SY-LSIND:', sy-lsind,
       / 'SY-PFKEY:', sy-pfkey.
ENDFORM.

When you run the program, the system displays the following basic list with a the page header defined in the program:

You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status. 

Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton. 

For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Renjith Michael.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2008 08:10:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647837#M878547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-09T08:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: pf status and function codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647838#M878548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sowmya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check ABAPDOCU, there are so many sample programs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;AK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2008 08:19:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647838#M878548</guid>
      <dc:creator>ak_upadhyay</dc:creator>
      <dc:date>2008-04-09T08:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: pf status and function codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647839#M878549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Can you elaborate a little as to how to proceed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sowmya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2008 08:29:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pf-status-and-function-codes/m-p/3647839#M878549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-09T08:29:44Z</dc:date>
    </item>
  </channel>
</rss>

