<?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 selection-screen problem. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen-problem/m-p/5830603#M1316496</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gurus plz solve this:&lt;/P&gt;&lt;P&gt;    what is the difference between 'at selection-screen'   and 'at selection-screen on p_vbeln'&lt;/P&gt;&lt;P&gt;    "p_vbeln is a parameter."&lt;/P&gt;&lt;P&gt;    if i use select-options then will i have to use 'at selection-screen on s_vbeln-low or s_vbeln-high' ? during the input validation check of select-options which select statement will i use?   'select up to 1 row'   or 'select single'  or 'select up to n rows' . plz explain with coding. answers will be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jun 2009 01:10:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-25T01:10:12Z</dc:date>
    <item>
      <title>at selection-screen problem.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen-problem/m-p/5830603#M1316496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gurus plz solve this:&lt;/P&gt;&lt;P&gt;    what is the difference between 'at selection-screen'   and 'at selection-screen on p_vbeln'&lt;/P&gt;&lt;P&gt;    "p_vbeln is a parameter."&lt;/P&gt;&lt;P&gt;    if i use select-options then will i have to use 'at selection-screen on s_vbeln-low or s_vbeln-high' ? during the input validation check of select-options which select statement will i use?   'select up to 1 row'   or 'select single'  or 'select up to n rows' . plz explain with coding. answers will be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 01:10:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen-problem/m-p/5830603#M1316496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T01:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: at selection-screen problem.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen-problem/m-p/5830604#M1316497</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;You need to write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;at selection-screen on s_vbeln.
" write select statement to validate s_vbeln value.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have the full primary key then you can use SELECT SINGLE else use SELECT UPTO &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to this link..http://help.sap.com/saphelp_nw04/helpdata/EN/9f/db9a2e35c111d1829f0000e829fbfe/frameset.htm for difference between 'at selection-screen' and 'at selection-screen on p_vbeln'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 01:24:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen-problem/m-p/5830604#M1316497</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T01:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: at selection-screen problem.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen-problem/m-p/5830605#M1316498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roy,&lt;/P&gt;&lt;P&gt;  We can use at-selection screen for validating some screen fields see below example,&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;*Inactive Fields depending on the radio button&lt;/P&gt;&lt;P&gt;  LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;    IF p_r1 = 'X'.&lt;/P&gt;&lt;P&gt;      IF screen-group1 = 'B'.&lt;/P&gt;&lt;P&gt;        screen-active = 0.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ELSEIF p_r2 = 'X'.&lt;/P&gt;&lt;P&gt;      IF screen-group1 = 'A'.&lt;/P&gt;&lt;P&gt;        screen-active = 0.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in the second case at selection-screen on &amp;lt;field&amp;gt; - is used to validate the field.&lt;/P&gt;&lt;P&gt;if it is select-options then you can give&lt;/P&gt;&lt;P&gt;at selection-screen on s_matnr(for example).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 04:17:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen-problem/m-p/5830605#M1316498</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T04:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: at selection-screen problem.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen-problem/m-p/5830606#M1316499</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;At selection screen is used for selection screen validation. If you need to validate a specific parameter then you use the addition on p_vbeln etc. If you need to check that the user has entered a valid document number in a range say s_vbeln, then you may write&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
at selection-screen on s_vebeln.
select single vbeln from vbak into v_vbeln where vbeln in s_vbeln.
if sy-subrc &amp;lt;&amp;gt; 0.
message 'Invalid Sales Document number entered' type 'E'.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select single is a better approach if in the where clause the entire key for the database table is mentioned. Say in the above example table vbak has key field as vbeln. &lt;/P&gt;&lt;P&gt;If the key fields are not involved in the where clause the better approach would be upto 1 rows as single will not use the defined index on the database table for faster access if key is not involved in the where clause.&lt;/P&gt;&lt;P&gt;When you use at selection screen and throw an error message the input is disabled. In case of using at selection-screen on parameter/select option the input field on which it is applied, in ready for input after the error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will display an error message when all the entered doc numbers are invalid. If anyone is correcr rhis error will not trigger.&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;Regards,&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 11:37:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-selection-screen-problem/m-p/5830606#M1316499</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-25T11:37:06Z</dc:date>
    </item>
  </channel>
</rss>

