<?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: capturing selection screen values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714834#M1454384</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Ravi, 
&amp;lt;li&amp;gt;Try this way. 
&lt;PRE&gt;&lt;CODE&gt;REPORT ztest.
TABLES mara.
DATA l_matnr TYPE mara-matnr.
SELECT-OPTIONS: matnr FOR mara-matnr.

AT SELECTION-SCREEN.
  LOOP AT matnr .
    IF l_matnr IS INITIAL.
      l_matnr = matnr-low.
    ELSE.
      IF matnr-low = l_matnr.
        MESSAGE 'Duplicate' TYPE 'E'.
      ENDIF.
    ENDIF.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Mar 2010 10:29:08 GMT</pubDate>
    <dc:creator>venkat_o</dc:creator>
    <dc:date>2010-03-04T10:29:08Z</dc:date>
    <item>
      <title>capturing selection screen values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714832#M1454382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I got a scenario where i have a selection screen &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 .&lt;/P&gt;&lt;P&gt;  SELECT-OPTIONS: material  FOR mara-material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now at START-OF-SELECTION. i need to check the values entered by user in this selection screen like if same material name is entered 2 times and give me msg like that.How can i capture the vales from selection screen.&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;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 10:16:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714832#M1454382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-04T10:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: capturing selection screen values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714833#M1454383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to write the relevant code in the 'AT SELECTION-SCREEN ON material' event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from material. "will remove duplicate entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should find plenty of resources on this forum for handling AT SELECTION-SCREEN events. Please search for them; wish you all the best!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Shailesh.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Always provide feedback for helpful answers&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 10:24:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714833#M1454383</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-04T10:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: capturing selection screen values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714834#M1454384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi Ravi, 
&amp;lt;li&amp;gt;Try this way. 
&lt;PRE&gt;&lt;CODE&gt;REPORT ztest.
TABLES mara.
DATA l_matnr TYPE mara-matnr.
SELECT-OPTIONS: matnr FOR mara-matnr.

AT SELECTION-SCREEN.
  LOOP AT matnr .
    IF l_matnr IS INITIAL.
      l_matnr = matnr-low.
    ELSE.
      IF matnr-low = l_matnr.
        MESSAGE 'Duplicate' TYPE 'E'.
      ENDIF.
    ENDIF.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 10:29:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714834#M1454384</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2010-03-04T10:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: capturing selection screen values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714835#M1454385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  venkat,&lt;/P&gt;&lt;P&gt;A small correction.&lt;/P&gt;&lt;P&gt;The l_matnr will only be initial for the first time &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 11:05:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714835#M1454385</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-03-04T11:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: capturing selection screen values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714836#M1454386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi execute teh code for analysing this issue ..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
tables : mara.
SELECT-OPTIONS: s_mat FOR mara-matnr no-display.
data : lv_mat type char21 .
ranges  rtab for s_mat occurs 0 .


initialization.
  s_mat-low = '100-100'.
  APPEND S_MAT.

  s_mat-LOW = '100-101'.
  APPEND S_MAT.

  s_mat-LOW = '100-100'.
  APPEND S_MAT.

  s_mat-LOW = '100-101'.
  APPEND S_MAT.

  s_mat-LOW = '100-101'.
  APPEND S_MAT.

   s_mat-LOW = '100-101'.
  APPEND S_MAT.

START-OF-SELECTION.

   SORT S_MAT BY LOW.
  LOOP AT S_MAT.
    if lv_mat is initial or lv_mat ne s_mat-low.
      lv_mat = s_mat-low.
      rtab-low = s_mat-low. append rtab.
      WRITE:/ S_MAT-LOW.
    elseif s_mat-low eq rtab-low .
      WRITE:/ S_MAT-LOW, 'duplciate entry'.
    endif.
  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the write statement in ur case can be replaced by message statement . &lt;/P&gt;&lt;P&gt;The user can enter multiple entries in the selection screen in the low field . now better to sort this stuff before handing the sequence ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can check this by altering the select options table . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;br, &lt;/P&gt;&lt;P&gt;Vijay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 11:48:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714836#M1454386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-04T11:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: capturing selection screen values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714837#M1454387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be better to check the input at event AT SELECTION-SCREEN as opposed to START-OF-SELECTION as the message will be displayed whilst still in the selection screen. At START-OF-SELECTION this is not the case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 11:53:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/capturing-selection-screen-values/m-p/6714837#M1454387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-04T11:53:11Z</dc:date>
    </item>
  </channel>
</rss>

