<?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: selection screen problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983677#M401977</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may just use AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Feb 2007 19:25:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-19T19:25:06Z</dc:date>
    <item>
      <title>selection screen problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983669#M401969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallow every one I have a program that check if employee do course and employee don't.&lt;/P&gt;&lt;P&gt;For that u have to choose course num ,the problem is that when the user choose course that not &amp;lt;b&amp;gt;valid&amp;lt;/b&amp;gt; how can I bring error message for that tanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i try this soltion but its not working what i doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS c_course FOR z_course_table-objid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBLIGATORY NO INTERVALS NO-EXTENSION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course-low.&lt;/P&gt;&lt;P&gt;*======================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT c_course[] IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT objid FROM hrp1001&lt;/P&gt;&lt;P&gt;INTO z_course_table-objid&lt;/P&gt;&lt;P&gt;WHERE objid IN c_course.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE 'Pleas enter the value for course' TYPE 'E'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;REFRESH: c_course.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CLEAR: c_course.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM get_objid USING 'D'&lt;/P&gt;&lt;P&gt;CHANGING c_course-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course-high.&lt;/P&gt;&lt;P&gt;*======================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IF c_course-high IS INITIAL.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE 'Pleas enter the value for course' TYPE 'E'.&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;&lt;/P&gt;&lt;P&gt;REFRESH: c_course.&lt;/P&gt;&lt;P&gt;CLEAR: c_course.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM get_objid USING 'D'&lt;/P&gt;&lt;P&gt;CHANGING c_course-high&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 18:21:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983669#M401969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T18:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983670#M401970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gv_course like z_course_table-objid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check not c_course[] is initial.&lt;/P&gt;&lt;P&gt;SELECT single objid &lt;/P&gt;&lt;P&gt;            FROM  hrp1001&lt;/P&gt;&lt;P&gt;             INTO ( gv_course )&lt;/P&gt;&lt;P&gt;             WHERE objid IN c_course.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE 'Invalid course' TYPE 'E'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 18:29:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983670#M401970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T18:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983671#M401971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Antonio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can restrict the F4 values to courses alone by using the following logic.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course-low.
*======================================================

  data: lv_f4_loc_objec like objec.
  data: lv_f4_loc_csrfd like dynpread-fieldname.
  data: lv_f4_loc_repid like sy-repid.
  data: lv_f4_loc_dynnr like sy-dynnr.

*  GET CURSOR FIELD f4_loc_csrfd.
  lv_f4_loc_csrfd = c_course-low.
  lv_f4_loc_repid = sy-repid.
  lv_f4_loc_dynnr = sy-dynnr.

**Get the selected search help value
  call function 'RH_OBJID_REQUEST'
       exporting
            plvar                 = '01'
            otype                 = 'E'   "Courses
            seark_begda           = sy-datum
            seark_endda           = '99991231'
            dynpro_repid          = lv_f4_loc_repid
            dynpro_dynnr          = lv_f4_loc_dynnr
            dynpro_searkfield     = lv_f4_loc_csrfd
            set_mode              = ' '
       importing
            sel_object            = lv_f4_loc_objec
       exceptions
*           cancelled             = 1
            wrong_condition       = 2
            nothing_found         = 3
            illegal_mode          = 4
            internal_error        = 5
            others                = 6.
**Move the selected value to the input field
  if sy-subrc = 0.
     c_course-low = lv_f4_loc_objec-objid.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use the same logic for c_course-high also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Sajan Joseph.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 18:32:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983671#M401971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T18:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983672#M401972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Antonio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
INITIALIZATION.
  SELECT objid 
  FROM hrp1001
  INTO z_course_table-objid. 
 

AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course-low.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      RETFIELD    = 'OBJID'
      DYNPROFIELD = 'C_COURSE'
      DYNPPROG    = SY-CPROG
      DYNPNR      = SY-DYNNR
      VALUE_ORG   = 'S'
    TABLES
      VALUE_TAB   = z_course_table.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 18:44:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983672#M401972</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-02-19T18:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983673#M401973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ferry &lt;/P&gt;&lt;P&gt;i will try your soltion but how i can bring a erorr messege when the user put course number that dosent existing .&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 19:04:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983673#M401973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T19:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983674#M401974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Antonio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AT SELECTION-SCREEN.
  IF NOT c_course-low IS INITIAL.
    READ TABLE z_course_table WITH KEY objid = c_course-low.                                                       
    IF SY-SUBRC &amp;lt;&amp;gt; 0.
      MESSAGE 'Pleas enter the value for course' TYPE 'E'.
    ENDIF.
  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 19:12:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983674#M401974</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-02-19T19:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983675#M401975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to create a text element which consists of error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check not c_course[] is initial.&lt;/P&gt;&lt;P&gt;SELECT single objid&lt;/P&gt;&lt;P&gt;FROM hrp1001&lt;/P&gt;&lt;P&gt;INTO ( gv_course )&lt;/P&gt;&lt;P&gt;WHERE objid IN c_course.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE e001 WITH text-a05. &lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, text-a05 can contain an error message like "Invalid course code".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 19:12:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983675#M401975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T19:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983676#M401976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ferry &lt;/P&gt;&lt;P&gt;when i use your code in?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;or&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 19:20:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983676#M401976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T19:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983677#M401977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may just use AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 19:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983677#M401977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T19:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983678#M401978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Antonio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use for both AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course-low and AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AT SELECTION-SCREEN.
  IF NOT c_course-low IS INITIAL.
    READ TABLE z_course_table WITH KEY objid = c_course-low.                                                       
    IF SY-SUBRC &amp;lt;&amp;gt; 0.
      MESSAGE 'Pleas enter the value for course' TYPE 'E'.
    ENDIF.

  ENDIF.

  IF NOT c_course-high IS INITIAL.
    READ TABLE z_course_table WITH KEY objid = c_course-high.                                                       
    IF SY-SUBRC &amp;lt;&amp;gt; 0.
      MESSAGE 'Pleas enter the value for course' 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;Hope this answers your question. If not, please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 19:25:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983678#M401978</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-02-19T19:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: selection screen problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983679#M401979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ferry &lt;/P&gt;&lt;P&gt;u mean l can use it like that for both (high and low)?&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR c_course-low.&lt;/P&gt;&lt;P&gt;*======================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT c_course-low IS INITIAL.&lt;/P&gt;&lt;P&gt;    READ TABLE z_course_table WITH KEY objid = c_course-low.                                                       &lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE 'Pleas enter the value for course' TYPE 'E'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; REFRESH: c_course.&lt;/P&gt;&lt;P&gt; CLEAR: c_course.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM get_objid USING 'D'&lt;/P&gt;&lt;P&gt;CHANGING c_course-low.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 19:42:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-problem/m-p/1983679#M401979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-19T19:42:13Z</dc:date>
    </item>
  </channel>
</rss>

