<?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 At line-selection &amp; At user-command in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942836#M388959</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a small doubt. Can we user AT LINE-SELECTION &amp;amp; AT USER-COMMAND in one report..plz gimme an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks is advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Feb 2007 03:48:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-28T03:48:29Z</dc:date>
    <item>
      <title>At line-selection &amp; At user-command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942836#M388959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a small doubt. Can we user AT LINE-SELECTION &amp;amp; AT USER-COMMAND in one report..plz gimme an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks is advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 03:48:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942836#M388959</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T03:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: At line-selection &amp; At user-command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942837#M388960</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; Yeah you can use both of them together. &lt;/P&gt;&lt;P&gt; You can have a list output and when the user click on the list output you can do some call transaction. ( the code for this will be written in AT LINE-SELECTION ) &lt;/P&gt;&lt;P&gt; You can also provide a download button to download the list output. ( The code for this will be writtin in AT USER-COMMAND)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 03:53:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942837#M388960</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T03:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: At line-selection &amp; At user-command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942838#M388961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, try these with example i have given.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write the set pf-status under start-of-selection,&lt;/P&gt;&lt;P&gt;In the set pf-status under the function keys give&lt;/P&gt;&lt;P&gt;F2 Pick Choose.&lt;/P&gt;&lt;P&gt;u can validate the at line-selection by taking..&lt;/P&gt;&lt;P&gt;At line-selection.&lt;/P&gt;&lt;P&gt;case sy-lsind.&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;message....&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;message....&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;similarly, for At user-command.&lt;/P&gt;&lt;P&gt;case sy-ucomm.&lt;/P&gt;&lt;P&gt;when 'back'.&lt;/P&gt;&lt;P&gt;message...&lt;/P&gt;&lt;P&gt;when...&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;____________________________________________________________________&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;AT USER-COMMAND. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;This statement defines an event block whose event is triggered by the ABAP runtime environment if, during the display of a screen list, a function with a self-defined function code was chosen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Self-defined function codes are all those that include character combinations, except for the following: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function codes PICK and PF## ("##" stands for 01 to 24) do not cause the event AT USER-COMMAND, but the events AT LINE-SELECTION and AT PF##. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All function codes that start with the character "%" are interpreted as system functions and do not cause the event AT USER-COMMAND. The system functions for lists are listed in the following table 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function code Function &lt;/P&gt;&lt;P&gt;%CTX Call a context menu &lt;/P&gt;&lt;P&gt;%EX Exit &lt;/P&gt;&lt;P&gt;%PC Save to file &lt;/P&gt;&lt;P&gt;%PRI Print &lt;/P&gt;&lt;P&gt;%SC Search for ... &lt;/P&gt;&lt;P&gt;%SC+ Find next &lt;/P&gt;&lt;P&gt;%SL Search in office &lt;/P&gt;&lt;P&gt;%ST Save to report tree &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function code Function &lt;/P&gt;&lt;P&gt;BACK Back &lt;/P&gt;&lt;P&gt;P- Scroll to previous page &lt;/P&gt;&lt;P&gt;P-- Scroll to first page &lt;/P&gt;&lt;P&gt;P+ Scroll to next page &lt;/P&gt;&lt;P&gt;P++ Scroll to last page &lt;/P&gt;&lt;P&gt;PFILE name Store list lines in a text file named abap.lst in standard character representation in the standard directory of the application server. If a name is entered using name, this is converted to lowercase letters and used as the file name. &lt;/P&gt;&lt;P&gt;PL- Scroll to first line of the page &lt;/P&gt;&lt;P&gt;PL-n Scroll n lines back &lt;/P&gt;&lt;P&gt;PL+ Scroll to last line of the page &lt;/P&gt;&lt;P&gt;PL+n Scroll n lines up &lt;/P&gt;&lt;P&gt;PNOP No effect &lt;/P&gt;&lt;P&gt;PP- Scroll back one page &lt;/P&gt;&lt;P&gt;PP-n Scroll n pages back &lt;/P&gt;&lt;P&gt;PP+ Scroll one page forward &lt;/P&gt;&lt;P&gt;PP+n Scroll n pages forwad &lt;/P&gt;&lt;P&gt;PPn Scroll to beginning of page n &lt;/P&gt;&lt;P&gt;PRI, PRINT Print &lt;/P&gt;&lt;P&gt;PS-- Scroll to first column &lt;/P&gt;&lt;P&gt;PS++ Scroll to last column &lt;/P&gt;&lt;P&gt;PS- Scroll one column to the left &lt;/P&gt;&lt;P&gt;PS-n Scroll n columns to the left &lt;/P&gt;&lt;P&gt;PS+ Scroll one column to the right &lt;/P&gt;&lt;P&gt;PS+n Scroll n columns to the right &lt;/P&gt;&lt;P&gt;PSn Scroll to column n &lt;/P&gt;&lt;P&gt;PZn Scroll to line n &lt;/P&gt;&lt;P&gt;RW Cancel &lt;/P&gt;&lt;P&gt;____________________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; here is an example handling both the commands in a program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXAMPLE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;WRITE: 'Basic List',&lt;/P&gt;&lt;P&gt;/ 'SY-LSIND:', sy-lsind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE.&lt;/P&gt;&lt;P&gt;WRITE 'Top-of-Page'.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TOP-OF-PAGE DURING LINE-SELECTION.&lt;/P&gt;&lt;P&gt;CASE sy-pfkey.&lt;/P&gt;&lt;P&gt;WHEN 'TEST'.&lt;/P&gt;&lt;P&gt;WRITE 'Self-defined GUI for Function Codes'.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;SET PF-STATUS 'TEST' EXCLUDING 'PICK'.&lt;/P&gt;&lt;P&gt;PERFORM out.&lt;/P&gt;&lt;P&gt;sy-lsind = sy-lsind - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT USER-COMMAND.&lt;/P&gt;&lt;P&gt;CASE sy-ucomm.&lt;/P&gt;&lt;P&gt;WHEN 'FC1'.&lt;/P&gt;&lt;P&gt;PERFORM out.&lt;/P&gt;&lt;P&gt;WRITE / 'Button FUN 1 was pressed'.&lt;/P&gt;&lt;P&gt;WHEN 'FC2'.&lt;/P&gt;&lt;P&gt;PERFORM out.&lt;/P&gt;&lt;P&gt;WRITE / 'Button FUN 2 was pressed'.&lt;/P&gt;&lt;P&gt;WHEN 'FC3'.&lt;/P&gt;&lt;P&gt;PERFORM out.&lt;/P&gt;&lt;P&gt;WRITE / 'Button FUN 3 was pressed'.&lt;/P&gt;&lt;P&gt;WHEN 'FC4'.&lt;/P&gt;&lt;P&gt;PERFORM out.&lt;/P&gt;&lt;P&gt;WRITE / 'Button FUN 4 was pressed'.&lt;/P&gt;&lt;P&gt;WHEN 'FC5'.&lt;/P&gt;&lt;P&gt;PERFORM out.&lt;/P&gt;&lt;P&gt;WRITE / 'Button FUN 5 was pressed'.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;sy-lsind = sy-lsind - 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM out.&lt;/P&gt;&lt;P&gt;WRITE: 'Secondary List',&lt;/P&gt;&lt;P&gt;/ 'SY-LSIND:', sy-lsind,&lt;/P&gt;&lt;P&gt;/ 'SY-PFKEY:', sy-pfkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this may be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sri.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls:award points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 03:59:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942838#M388961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T03:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: At line-selection &amp; At user-command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942839#M388962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ram , &lt;/P&gt;&lt;P&gt;  Yes you can use both of them in a program.&lt;/P&gt;&lt;P&gt;At Line Selection is triggred when the user clicks on a line in the generated output , where as at user command when is triggred when the user performs some operation like clicking a button e.t.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 04:21:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942839#M388962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T04:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: At line-selection &amp; At user-command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942840#M388963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, we can use at line-selection and at user-command in a single report.&lt;/P&gt;&lt;P&gt;assign the function code PICK to CHOOSE( i.e., by default double click is assigned).&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  begin of fs_spfli,&lt;/P&gt;&lt;P&gt;    carrid type spfli-carrid,&lt;/P&gt;&lt;P&gt;    connid type spfli-connid,&lt;/P&gt;&lt;P&gt;  end of fs_spfli,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  t_spfli like standard table&lt;/P&gt;&lt;P&gt;                     of fs_spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;  from spfli&lt;/P&gt;&lt;P&gt;  into corresponding fields&lt;/P&gt;&lt;P&gt;    of table t_spfli.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_spfli into fs_spfli.&lt;/P&gt;&lt;P&gt;  write:&lt;/P&gt;&lt;P&gt;    / fs_spfli-carrid,&lt;/P&gt;&lt;P&gt;      fs_spfli-connid.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set pf-status 'TEST'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at line-selection.&lt;/P&gt;&lt;P&gt;   write 'at line-selection'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at user-command.&lt;/P&gt;&lt;P&gt;  case sy-ucomm.&lt;/P&gt;&lt;P&gt;    when 'CONNID'.&lt;/P&gt;&lt;P&gt;      write 'connid'.&lt;/P&gt;&lt;P&gt;      &amp;lt;some set of operations&amp;gt;&lt;/P&gt;&lt;P&gt;    when 'CARRID'.&lt;/P&gt;&lt;P&gt;      write 'carrid'.&lt;/P&gt;&lt;P&gt;     &amp;lt;some set of operations&amp;gt;&lt;/P&gt;&lt;P&gt;  endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here's the example for ur ques...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 04:34:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942840#M388963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T04:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: At line-selection &amp; At user-command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942841#M388964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT demo_list_interactive_3 .

START-OF-SELECTION.

  WRITE  'Basic List'.

AT LINE-SELECTION.

  WRITE  'Secondary List'.

TOP-OF-PAGE DURING LINE-SELECTION.

  CASE sy-lsind.
    WHEN 1.
      WRITE 'First Secondary List'.
    WHEN 2.
      WRITE 'Second Secondary List'.
    WHEN OTHERS.
      WRITE: 'Secondary List, Level:', sy-lsind.
  ENDCASE.

  ULINE.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refer &lt;/P&gt;&lt;P&gt;DEMO_LIST_AT_USER_COMMAND for user command u can get sample code in SE38, &lt;/P&gt;&lt;P&gt;DEMO_LIST_* then press F4 u will lots of code samples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helsp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if u find helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 04:37:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942841#M388964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T04:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: At line-selection &amp; At user-command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942842#M388965</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;please can you provide a sample code?  both events in a single program.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 11:48:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-line-selection-at-user-command/m-p/1942842#M388965</guid>
      <dc:creator>varmacpv</dc:creator>
      <dc:date>2024-01-05T11:48:17Z</dc:date>
    </item>
  </channel>
</rss>

