<?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: problem with at line-selection in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-at-line-selection/m-p/3611702#M870107</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;AT LINE-SELECTION.&lt;/STRONG&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 during the display of a screen list - provided the scren cursor is on a list line and you select a function using the function code PICK. Through the definition of this event block, the standard list status is automatically enhanced in such a way that the function code F2 and, with it, the double-click mouse function is linked up to the function code PICK. &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;If the function key F2 is linked with a function code different than PICK, each double click will trigger its even, usually AT USER-COMMAND, and not AT LINE-SELECTION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This program works with the standard list status&lt;/STRONG&gt;. A line selection with the left mouse key causes the event AT LINE-SELECTION and creates details lists. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT demo_at_line_selection. 

START-OF-SELECTION. 
  WRITE 'Click me!' COLOR = 5 HOTSPOT. 

AT LINE-SELECTION. 
  WRITE: / 'You clicked list', sy-listi, 
         / 'You are on list',  sy-lsind. 
  IF sy-lsind &amp;lt; 20. 
    SKIP. 
    WRITE: 'More ...' COLOR = 5 HOTSPOT. 
  ENDIF. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The above sample program works with the standard list status Since your program has the PF-status set, i think AT LINE-SELECTION will not work. So do use AT USER-COMMAND to capture the "PICK" event.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Mar 2008 09:11:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-20T09:11:19Z</dc:date>
    <item>
      <title>problem with at line-selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-at-line-selection/m-p/3611700#M870105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi mates&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have written a interactive report program, when i click the hotspot in the basic list the event at line-selection is not getting triggered insead my at user-command is geting executed. is there a sequence that i need to follow?. &lt;U&gt;below is my code. thanks in advance.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: vbak.&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1 with frame title t1.&lt;/P&gt;&lt;P&gt;  select-options: salesdoc for vbak-vbeln.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of vbak_ty,&lt;/P&gt;&lt;P&gt;       vbeln type vbak-vbeln,&lt;/P&gt;&lt;P&gt;       erdat type vbak-erdat,&lt;/P&gt;&lt;P&gt;       ernam type vbak-ernam,&lt;/P&gt;&lt;P&gt;       end of vbak_ty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of vbap_type,&lt;/P&gt;&lt;P&gt;       vbeln type vbap-vbeln,&lt;/P&gt;&lt;P&gt;       posnr type vbap-posnr,&lt;/P&gt;&lt;P&gt;       matnr type vbap-matnr,&lt;/P&gt;&lt;P&gt;       charg type vbap-charg,&lt;/P&gt;&lt;P&gt;       end of vbap_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of vbap_ty,&lt;/P&gt;&lt;P&gt;       posnr type vbap-posnr,&lt;/P&gt;&lt;P&gt;       matwa type vbap-matwa,&lt;/P&gt;&lt;P&gt;       arktx type vbap-arktx,&lt;/P&gt;&lt;P&gt;       end of vbap_ty.&lt;/P&gt;&lt;P&gt;data: vbap_wa type vbap_type,&lt;/P&gt;&lt;P&gt;      vbap_it type table of vbap_type,&lt;/P&gt;&lt;P&gt;      vbak_wa type vbak_ty,&lt;/P&gt;&lt;P&gt;      vbak_it type table of vbak_ty,&lt;/P&gt;&lt;P&gt;      vbap_wa1 type vbap_ty,&lt;/P&gt;&lt;P&gt;      vbap_it1 type table of vbap_type,&lt;/P&gt;&lt;P&gt;      fname(20),fvalue(10).&lt;/P&gt;&lt;P&gt; initialization.&lt;/P&gt;&lt;P&gt;       t1 = 'enter sales doc header'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; start-of-selection.&lt;/P&gt;&lt;P&gt;  set pf-status 'VA01'.&lt;/P&gt;&lt;P&gt;  SELECT vbeln&lt;/P&gt;&lt;P&gt;         erdat&lt;/P&gt;&lt;P&gt;         ernam&lt;/P&gt;&lt;P&gt;         from vbak into table vbak_it&lt;/P&gt;&lt;P&gt;         where vbeln in salesdoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   loop at vbak_it into vbak_wa.&lt;/P&gt;&lt;P&gt;     write: /25 vbak_wa-vbeln hotspot,&lt;/P&gt;&lt;P&gt;             50 vbak_wa-erdat,&lt;/P&gt;&lt;P&gt;             75 vbak_wa-ernam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     hide vbak_wa-vbeln.&lt;/P&gt;&lt;P&gt;     clear vbak_wa-vbeln.&lt;/P&gt;&lt;P&gt;     endloop.&lt;/P&gt;&lt;P&gt;     ELSE.&lt;/P&gt;&lt;P&gt;       message e000(01) with 'no records found '.&lt;/P&gt;&lt;P&gt;       endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    at line-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      case sy-lsind.&lt;/P&gt;&lt;P&gt;        when '1'.&lt;/P&gt;&lt;P&gt;          perform headerdata.&lt;/P&gt;&lt;P&gt;        when '2'.&lt;/P&gt;&lt;P&gt;          perform itemdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       endcase.&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 'ITEMDATA'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      get cursor  field fname value fvalue.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      if fvalue = 'vbap_wa-vbeln'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         perform itemdata.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       else.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         message e000(03) with 'click only on hotspots'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       endif.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      when 'SALEOR'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       get cursor field fname value fvalue.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       if fvalue = 'vbak_wa-vbeln'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        set parameter id 'AUN' field fvalue.&lt;/P&gt;&lt;P&gt;        call transaction 'VA01' and skip first screen.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       else.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         message e000(04) with 'click only on hotspots'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       endif.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    form headerdata.&lt;/P&gt;&lt;P&gt;    set pf-status 'HEADER'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select vbeln&lt;/P&gt;&lt;P&gt;           posnr&lt;/P&gt;&lt;P&gt;           matnr&lt;/P&gt;&lt;P&gt;           charg&lt;/P&gt;&lt;P&gt;           from vbap into table vbap_it&lt;/P&gt;&lt;P&gt;           where vbeln = vbak_wa-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   loop at vbap_it into vbap_wa.&lt;/P&gt;&lt;P&gt;     write: /25 vbap_wa-vbeln hotspot,&lt;/P&gt;&lt;P&gt;             50 vbap_wa-posnr,&lt;/P&gt;&lt;P&gt;             75 vbap_wa-matnr,&lt;/P&gt;&lt;P&gt;             90 vbap_wa-charg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     hide vbap_wa-vbeln.&lt;/P&gt;&lt;P&gt;     clear vbap_wa-vbeln.&lt;/P&gt;&lt;P&gt;     endloop.&lt;/P&gt;&lt;P&gt;     else.&lt;/P&gt;&lt;P&gt;       message e000(02) with ' no data found'.&lt;/P&gt;&lt;P&gt;       endif.&lt;/P&gt;&lt;P&gt;       endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    form itemdata.&lt;/P&gt;&lt;P&gt;         select vbeln&lt;/P&gt;&lt;P&gt;           posnr&lt;/P&gt;&lt;P&gt;           matwa&lt;/P&gt;&lt;P&gt;           arktx&lt;/P&gt;&lt;P&gt;           from vbap into table vbap_it1&lt;/P&gt;&lt;P&gt;           where vbeln = vbap_wa-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   loop at vbap_it1 into vbap_wa1.&lt;/P&gt;&lt;P&gt;     write: /25 vbap_wa1-posnr,&lt;/P&gt;&lt;P&gt;             75 vbap_wa1-matwa,&lt;/P&gt;&lt;P&gt;             90 vbap_wa1-arktx.&lt;/P&gt;&lt;P&gt;      endloop.&lt;/P&gt;&lt;P&gt;       else.&lt;/P&gt;&lt;P&gt;       message e000(02) with ' no data found'.&lt;/P&gt;&lt;P&gt;       endif.&lt;/P&gt;&lt;P&gt;       endform.&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;MANO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 08:31:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-at-line-selection/m-p/3611700#M870105</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T08:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: problem with at line-selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-at-line-selection/m-p/3611701#M870106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd suggest you remove the "at line-selection" and put the dependant code into the case statement inside the user-command, based on the function code you have assigned to selection (PICK?)... I'd also suggest you put the whole lot in a form too, but that's just the way I like to organise things perhaps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*" Events
at user-command.
  perform user_command.

form user_command.
*" Handle any user interactions
  case sy-ucomm.
    when 'PICK'.
      case sy-lsind.
        when '1'.
          perform headerdata.
        when '2'.
          perform itemdata.
      endcase.
*"etc etc
  endcase.
endform.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 08:49:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-at-line-selection/m-p/3611701#M870106</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T08:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: problem with at line-selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-at-line-selection/m-p/3611702#M870107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;AT LINE-SELECTION.&lt;/STRONG&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 during the display of a screen list - provided the scren cursor is on a list line and you select a function using the function code PICK. Through the definition of this event block, the standard list status is automatically enhanced in such a way that the function code F2 and, with it, the double-click mouse function is linked up to the function code PICK. &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;If the function key F2 is linked with a function code different than PICK, each double click will trigger its even, usually AT USER-COMMAND, and not AT LINE-SELECTION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This program works with the standard list status&lt;/STRONG&gt;. A line selection with the left mouse key causes the event AT LINE-SELECTION and creates details lists. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT demo_at_line_selection. 

START-OF-SELECTION. 
  WRITE 'Click me!' COLOR = 5 HOTSPOT. 

AT LINE-SELECTION. 
  WRITE: / 'You clicked list', sy-listi, 
         / 'You are on list',  sy-lsind. 
  IF sy-lsind &amp;lt; 20. 
    SKIP. 
    WRITE: 'More ...' COLOR = 5 HOTSPOT. 
  ENDIF. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The above sample program works with the standard list status Since your program has the PF-status set, i think AT LINE-SELECTION will not work. So do use AT USER-COMMAND to capture the "PICK" event.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 09:11:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-at-line-selection/m-p/3611702#M870107</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T09:11:19Z</dc:date>
    </item>
  </channel>
</rss>

