<?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: Help on a selection screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197050#M1202620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Davis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you try the code I provided this will surely work if you press F4. this will not trigger at selection-screen event.. this will only trigger  at selection-screen on value-request for p_ret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;at selection-screen on value-request for p_ret.
 
SELECT SINGLE kwert INTO p_ret FROM zretention WHERE ebeln = p_ebeln AND ebelp = '00000' AND TYPE = 'C'.
  IF NOT sy-subrc = 0 OR p_ret IS INITIAL.
    CONCATENATE 'Purchase Order' p_ebeln 'does not have any retention available for release!' INTO d_string.
    MESSAGE d_string TYPE 'S' display like 'E'.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if its not working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Feb 2009 23:08:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-10T23:08:56Z</dc:date>
    <item>
      <title>Help on a selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197044#M1202614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need some help on a selection screen.  I have the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECTION-SCREEN: BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
PARAMETERS:       p_bldat TYPE bkpf-bldat OBLIGATORY DEFAULT sy-datum,
                  p_budat TYPE bkpf-budat OBLIGATORY DEFAULT sy-datum,
                  p_xref1 TYPE proj-pspid OBLIGATORY,
                  p_bktxt TYPE bkpf-bktxt,
                  p_bukrs TYPE bkpf-bukrs OBLIGATORY DEFAULT '1100',
                  p_waers TYPE bkpf-waers OBLIGATORY DEFAULT 'USD'.
SELECTION-SCREEN: END OF BLOCK a1.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
PARAMETERS:       p_lifnr TYPE ekko-lifnr OBLIGATORY,
                  p_ebeln TYPE ekko-ebeln OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK c1 WITH FRAME TITLE text-003.
PARAMETERS:       p_amt TYPE wrbtr,
                  p_ret  TYPE wrbtr.
SELECTION-SCREEN: END OF BLOCK c1.
SELECTION-SCREEN: BEGIN OF BLOCK d1 WITH FRAME TITLE text-004.
PARAMETERS:       p_cmode  TYPE callmode DEFAULT 'N' OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK d1.

AT SELECTION-SCREEN ON p_ebeln.
  SELECT SINGLE kwert INTO p_ret FROM zretention WHERE ebeln = p_ebeln AND ebelp = '00000' AND TYPE = 'C'.
  IF NOT sy-subrc = 0 OR p_ret IS INITIAL.
    CONCATENATE 'Purchase Order' p_ebeln 'does not have any retention available for release!' INTO d_string.
    MESSAGE d_string TYPE 'E'.
  ENDIF.

AT SELECTION-SCREEN.
  check p_ret is not INITIAL.
  IF p_amt &amp;gt; p_ret.
    MESSAGE 'Amt. To Be Released is more than the remaining retention. Please check your input.' TYPE 'E'.
  ELSEIF p_amt IS INITIAL.
    MESSAGE 'Amt. To Be Released is required. Please check your input.' TYPE 'E'.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want is for the parameter &lt;STRONG&gt;p_ret&lt;/STRONG&gt; to be populated when the user inputs a PO (&lt;STRONG&gt;p_ebeln&lt;/STRONG&gt;).  This seems to work except I want this to be brought in without running through the other checks (AT SELECTION-SCREEN).  In order to bring in &lt;STRONG&gt;p_ret&lt;/STRONG&gt; I am having to hit &lt;STRONG&gt;ENTER&lt;/STRONG&gt; which will trigger the event &lt;STRONG&gt;AT SELECTION-SCREEN&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I bring in &lt;STRONG&gt;p_ret&lt;/STRONG&gt; without triggering the event &lt;STRONG&gt;AT SELECTION-SCREEN&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 22:15:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197044#M1202614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T22:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help on a selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197045#M1202615</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 can use the Function module DYNP_VALUES_READ to get the value P_RET...please put a where used list of this function module or search in SCN...you will find a sample code of how to get the values..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 22:32:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197045#M1202615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T22:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help on a selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197046#M1202616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I could be wrong but won't I need an event to trigger this (like on value request)?  If so, this will not help as I need it to be a smooth transition without user interaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 22:50:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197046#M1202616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T22:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help on a selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197047#M1202617</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 can use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;at selection-screen on value-request for p_ret.

SELECT SINGLE kwert INTO p_ret FROM zretention WHERE ebeln = p_ebeln AND ebelp = '00000' AND TYPE = 'C'.
  IF NOT sy-subrc = 0 OR p_ret IS INITIAL.
    CONCATENATE 'Purchase Order' p_ebeln 'does not have any retention available for release!' INTO d_string.
    MESSAGE d_string TYPE 'S' display like 'E'.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this provides you to press F4 and does not trigger any other event apart from on value-request event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 23:00:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197047#M1202617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T23:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help on a selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197048#M1202618</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;Yes..you still have to press enter..to trigger the code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON p_ebeln...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if this is not you are looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 23:00:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197048#M1202618</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T23:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help on a selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197049#M1202619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That won't work then as the &lt;STRONG&gt;enter&lt;/STRONG&gt; will trigger the event block &lt;STRONG&gt;AT SELECTION-SCREEN&lt;/STRONG&gt; thus I will have the same issue I currently have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have gone around my issue by defaulting a value into p_amt but this isn't the end-solution I would like to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 23:05:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197049#M1202619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T23:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help on a selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197050#M1202620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Davis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you try the code I provided this will surely work if you press F4. this will not trigger at selection-screen event.. this will only trigger  at selection-screen on value-request for p_ret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;at selection-screen on value-request for p_ret.
 
SELECT SINGLE kwert INTO p_ret FROM zretention WHERE ebeln = p_ebeln AND ebelp = '00000' AND TYPE = 'C'.
  IF NOT sy-subrc = 0 OR p_ret IS INITIAL.
    CONCATENATE 'Purchase Order' p_ebeln 'does not have any retention available for release!' INTO d_string.
    MESSAGE d_string TYPE 'S' display like 'E'.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if its not working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 23:08:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197050#M1202620</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T23:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help on a selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197051#M1202621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion but I don't want to force the user to interact with the selection screen, to get this value, other than entering a PO and hitting enter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 23:10:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197051#M1202621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T23:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help on a selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197052#M1202622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this case.&lt;/P&gt;&lt;P&gt;If you don't want at selection-screen to be triggered on hitting enter, you can give an if condition in at selection-screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables : sscrfields.


AT SELECTION-SCREEN ON p_ebeln.
  SELECT SINGLE kwert INTO p_ret FROM zretention WHERE ebeln = p_ebeln AND ebelp = '00000' AND TYPE = 'C'.
  IF NOT sy-subrc = 0 OR p_ret IS INITIAL.
    CONCATENATE 'Purchase Order' p_ebeln 'does not have any retention available for release!' INTO d_string.
   clear sscrfield-ucomm.
    MESSAGE d_string TYPE 'E'.
  ENDIF.
 
AT SELECTION-SCREEN.
if sscrfields-ucomm = 'ONLI'.
  check p_ret is not INITIAL.
  IF p_amt &amp;gt; p_ret.
    MESSAGE 'Amt. To Be Released is more than the remaining retention. Please check your input.' TYPE 'E'.
  ELSEIF p_amt IS INITIAL.
    MESSAGE 'Amt. To Be Released is required. Please check your input.' TYPE 'E'.
  ENDIF.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code in at selection-screen is executed only when user presses F8. on pressing 'Enter' it will not be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 23:14:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197052#M1202622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T23:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help on a selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197053#M1202623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have never seen that trick!  Thanks a lot Siddharth!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 23:17:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197053#M1202623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T23:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help on a selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197054#M1202624</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;If you don't want to trigger the at selection-screen..validations...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you can move the validations code to the start-of-selection...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or check if the user has pressed F8 (execute) to trigger the validations..Like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-ucomm = 'ONLI'...Do all your validations here...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 23:18:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197054#M1202624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T23:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help on a selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197055#M1202625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are most welcome &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2009 23:18:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-on-a-selection-screen/m-p/5197055#M1202625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-10T23:18:55Z</dc:date>
    </item>
  </channel>
</rss>

