<?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: Error which validating selection screen data in subroutine in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754578#M1303787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Place the include after selection screen declaration and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECTION-SCREEN BEGIN OF BLOCK b_selection WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_belnr FOR  rbkp-belnr,                                        "Invoice number
                s_gjahr FOR rbkp-gjahr NO-EXTENSION NO INTERVALS,               "Fiscal year
                s_stat  FOR  rbkp-rbstat OBLIGATORY NO-EXTENSION,               "Invoice status
                s_blart FOR rbkp-blart OBLIGATORY,                              "Document type
                s_lifnr FOR rbkp-lifnr.                                          "Vendor
SELECTION-SCREEN END OF BLOCK b_selection.

INCLUDE &amp;lt;ZINCLUDE&amp;gt;.                          " sub_validate_data

AT SELECTION-SCREEN.
  PERFORM sub_validate_data.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@aadil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jun 2009 12:44:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-08T12:44:29Z</dc:date>
    <item>
      <title>Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754568#M1303777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,this is my code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;selection-screen begin of block b_selection with frame title text-001.
SELECT-OPTIONS: s_belnr for  rbkp-belnr,                                         "Invoice number
                s_gjahr for rbkp-gjahr NO-EXTENSION NO INTERVALS,               "Fiscal year
                s_stat  for  rbkp-rbstat OBLIGATORY NO-EXTENSION DEFAULT c_status, "Invoice status
                s_blart for rbkp-blart OBLIGATORY DEFAULT c_doc_type,              "Document type
                s_lifnr for rbkp-lifnr.                                          "Vendor

selection-screen end of block b_selection.
at selection-screen.
select belnr gjahr from rbkp into table i_inv_data
                       where belnr  IN s_belnr
                       and   gjahr  IN s_gjahr
                       and   blart  IN s_blart
                       and   rbstat IN s_stat.
                       and   lifnr  IN s_lifnr.

  if i_inv_data[] is initial.
  message e000 with 'No record matching the search criteria'(001).
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; This is working fine...now when I try to modularise it, it is nt working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;selection-screen begin of block b_selection with frame title text-001.
SELECT-OPTIONS: s_belnr for  rbkp-belnr,                                         "Invoice number
                s_gjahr for rbkp-gjahr NO-EXTENSION NO INTERVALS,               "Fiscal year
                s_stat  for  rbkp-rbstat OBLIGATORY NO-EXTENSION DEFAULT c_status, "Invoice status
                s_blart for rbkp-blart OBLIGATORY DEFAULT c_doc_type,              "Document type
                s_lifnr for rbkp-lifnr.                                          "Vendor

selection-screen end of block b_selection.

at selection-screen.
perform sub_validate_data.

FORM SUB_VALIDATE_DATA.
select belnr gjahr from rbkp into table i_inv_data
                       where belnr  IN s_belnr
                       and   gjahr  IN s_gjahr
                       and   blart  IN s_blart
                       and   rbstat IN s_stat.
                       and   lifnr  IN s_lifnr.

  if i_inv_data[] is initial.
  message e000 with 'No record matching the search criteria'(001).
  endif.

*
ENDFORM.                    " SUB_VALIDATE_DATA&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the error which I m getting is ' IN s_belnr should be followd by an internal table'Please tell how can I modularize this code and put the checking part in subroutine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 11:48:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754568#M1303777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T11:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754569#M1303778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;at selection-screen.&lt;/P&gt;&lt;P&gt;perform sub_validate_data.&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;end of selection-screen.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FORM SUB_VALIDATE_DATA.&lt;/P&gt;&lt;P&gt;select belnr gjahr from rbkp into table i_inv_data&lt;/P&gt;&lt;P&gt;                       where belnr  IN s_belnr&lt;/P&gt;&lt;P&gt;                       and   gjahr  IN s_gjahr&lt;/P&gt;&lt;P&gt;                       and   blart  IN s_blart&lt;/P&gt;&lt;P&gt;                       and   rbstat IN s_stat&lt;STRONG&gt;.&lt;/STRONG&gt; (" this full stop should not be present here)&lt;/P&gt;&lt;P&gt;                       and   lifnr  IN s_lifnr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if i_inv_data[] is initial.&lt;/P&gt;&lt;P&gt;  message e000 with 'No record matching the search criteria'(001).&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;ENDFORM.                    " SUB_VALIDATE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 11:52:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754569#M1303778</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T11:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754570#M1303779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Except the period, the code seems ok'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables: rbkp.

data: begin of i_inv_data occurs 0,
        belnr like rbkp-belnr,
        gjahr like rbkp-gjahr,
      end of i_inv_data.

selection-screen begin of block b_selection with frame title text-001.
SELECT-OPTIONS: s_belnr for  rbkp-belnr,
                s_gjahr for rbkp-gjahr NO-EXTENSION NO INTERVALS,
                s_stat  for  rbkp-rbstat OBLIGATORY NO-EXTENSION,
                s_blart for rbkp-blart OBLIGATORY,
                s_lifnr for rbkp-lifnr.

selection-screen end of block b_selection.

at selection-screen.
  perform sub_validate_data.

*&amp;amp;--------------------------------------------------------------------*
*&amp;amp;      Form  SUB_VALIDATE_DATA
*&amp;amp;--------------------------------------------------------------------*
*       text
*---------------------------------------------------------------------*
FORM SUB_VALIDATE_DATA.
  select belnr gjahr from rbkp into table i_inv_data
                         where belnr  IN s_belnr
                         and   gjahr  IN s_gjahr
                         and   blart  IN s_blart
                         and   rbstat IN s_stat          "Remove the dot here
                         and   lifnr  IN s_lifnr.

  if i_inv_data[] is initial.
*  message e000 with 'No record matching the search criteria'(001).
  endif.

ENDFORM.                    " SUB_VALIDATE_DATA&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 12:01:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754570#M1303779</guid>
      <dc:creator>former_member222860</dc:creator>
      <dc:date>2009-06-08T12:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754571#M1303780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I remove the period after s_stat your code is compiling without problems:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECTION-SCREEN BEGIN OF BLOCK b_selection WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_belnr FOR  rbkp-belnr,
                s_gjahr FOR rbkp-gjahr NO-EXTENSION NO INTERVALS,
                s_stat  FOR  rbkp-rbstat OBLIGATORY NO-EXTENSION DEFAULT 'X',
                s_blart FOR rbkp-blart OBLIGATORY DEFAULT 'X',
                s_lifnr FOR rbkp-lifnr.

SELECTION-SCREEN END OF BLOCK b_selection.

AT SELECTION-SCREEN.
  PERFORM sub_validate_data.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  SUB_VALIDATE_DATA
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM sub_validate_data.
  SELECT belnr gjahr FROM rbkp INTO TABLE i_inv_data
                     WHERE belnr  IN s_belnr
                     AND   gjahr  IN s_gjahr
                     AND   blart  IN s_blart
                     AND   rbstat IN s_stat
                     AND   lifnr  IN s_lifnr.

  IF i_inv_data[] IS INITIAL.
    MESSAGE e000(oo) WITH 'No record matching the search criteria'(001).
  ENDIF.

*
ENDFORM.                    " SUB_VALIDATE_DATA
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check, if you have an additional period somewhere else, or any other subtle differenec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 12:03:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754571#M1303780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T12:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754572#M1303781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;There is no syntax error in my code...it was just during typing in sdn the period got missed...can anyone make out something else...as even I dnt know whwere the error lies???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 12:03:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754572#M1303781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T12:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754573#M1303782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;-the error which I m getting is ' IN s_belnr should be followd by an internal table-&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;-There is no syntax error in my code-&lt;/P&gt;&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;are u getting errors or not.????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 12:10:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754573#M1303782</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-06-08T12:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754574#M1303783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I forgot to mention 1 thin..this form routine is in another include ztest_subroutine which is a include for forms&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 12:14:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754574#M1303783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T12:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754575#M1303784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem is of &lt;STRONG&gt;events&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot use select statement in the event at selection-screen..Its used for &lt;STRONG&gt;authority check.&lt;/STRONG&gt;You have to write ur query in &lt;STRONG&gt;Start-of-selection&lt;/STRONG&gt; event.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 12:18:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754575#M1303784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T12:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754576#M1303785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; I forgot to mention 1 thin..this form routine is in another include ztest_subroutine which is a include for forms&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello Priya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please share all the details of your code for a better analysis. I donot find any INCLUDE stmts in the code you have shared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz revert back with the details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Vijetasap: Please get your basics clear. From which source have you learnt that we cannot use SELECT stmts in AT SLECTION-SCREEN event?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Jun 8, 2009 2:30 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 12:30:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754576#M1303785</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-06-08T12:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754577#M1303786</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;  code is O.k.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I think in SELECT command you can check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     and   rbstat IN s_stat.&lt;/P&gt;&lt;P&gt;     and   lifnr  IN s_lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; in this only one statement is possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 12:32:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754577#M1303786</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T12:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754578#M1303787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Place the include after selection screen declaration and check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECTION-SCREEN BEGIN OF BLOCK b_selection WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_belnr FOR  rbkp-belnr,                                        "Invoice number
                s_gjahr FOR rbkp-gjahr NO-EXTENSION NO INTERVALS,               "Fiscal year
                s_stat  FOR  rbkp-rbstat OBLIGATORY NO-EXTENSION,               "Invoice status
                s_blart FOR rbkp-blart OBLIGATORY,                              "Document type
                s_lifnr FOR rbkp-lifnr.                                          "Vendor
SELECTION-SCREEN END OF BLOCK b_selection.

INCLUDE &amp;lt;ZINCLUDE&amp;gt;.                          " sub_validate_data

AT SELECTION-SCREEN.
  PERFORM sub_validate_data.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@aadil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 12:44:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754578#M1303787</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T12:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754579#M1303788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;vijetasap  wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;The problem is of events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot use select statement in the event at selection-screen..Its used for &lt;STRONG&gt;authority check.&lt;/STRONG&gt;You have to write ur query in Start-of-selection event.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not true.  I have numerous programs where I do SELECT in the AT SELECTION-SCREEN event without any such problem.  And I verified this just now, looking at the code for various programs that use similar logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In most cases, these SELECT statements are done in subroutines in INCLUDES that are called from the AT SELECTION-SCREEN event, just as the original poster is doing here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN is used for edits of ALL kinds, including validating against the database (using SELECT), not just  &lt;STRONG&gt;authority check&lt;/STRONG&gt; as suggested in the quote above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem must lie elsewhere.  I suspect that the problem is the placement of the INCLUDE, as Syed Abdul Adil noted in the previous post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The INCLUDE should be placed after the definition of the selection screen and the various screen events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brian Sammond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Brian Sammond on Jun 8, 2009 3:39 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct spelling, add poster's name who made INCLUDE suggestion originally&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 19:37:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754579#M1303788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T19:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error which validating selection screen data in subroutine</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754580#M1303789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Declare your selection screen in the top include of the program. This should solve your problem. A top include is visible to all the other includes of the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, pass the select options as using parameters to the subroutine. That is how you should modularize your code in order to make the code callable from different programs.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Advait Gode on Jun 8, 2009 10:08 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2009 20:08:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-which-validating-selection-screen-data-in-subroutine/m-p/5754580#M1303789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-08T20:08:33Z</dc:date>
    </item>
  </channel>
</rss>

