<?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 how to validate screen fields from different tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-screen-fields-from-different-tables/m-p/1589559#M265490</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai,&lt;/P&gt;&lt;P&gt;   how to validate screen fields from different tables,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the requirement is, if i enter value in first screen, if entry exits in any one of three tables its displays error message in status bar other wise is goes to next screen.plz forward this soultion as early as possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 Sep 2006 07:20:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-30T07:20:42Z</dc:date>
    <item>
      <title>how to validate screen fields from different tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-screen-fields-from-different-tables/m-p/1589559#M265490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai,&lt;/P&gt;&lt;P&gt;   how to validate screen fields from different tables,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the requirement is, if i enter value in first screen, if entry exits in any one of three tables its displays error message in status bar other wise is goes to next screen.plz forward this soultion as early as possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Sep 2006 07:20:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-screen-fields-from-different-tables/m-p/1589559#M265490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-30T07:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to validate screen fields from different tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-screen-fields-from-different-tables/m-p/1589560#M265491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi satya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I would personally do like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. data : flag1 type c,&lt;/P&gt;&lt;P&gt;          flag2 type c,&lt;/P&gt;&lt;P&gt;          flag3 type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from table1 where condtion.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  flag1 = 'X'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from table2 where condtion.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  flag2 = 'X'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from table3 where condtion.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  flag3 = 'X'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  If flag1 = 'X' or flag2 = 'X' or flag3 = 'X'.&lt;/P&gt;&lt;P&gt;  message 'Entry already exists' Type 'E'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  set screen 2000.&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Sep 2006 07:23:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-screen-fields-from-different-tables/m-p/1589560#M265491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-30T07:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to validate screen fields from different tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-screen-fields-from-different-tables/m-p/1589561#M265492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;do like this&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;data : flag1 type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At-selection-screen on &amp;lt;fieldname&amp;gt;.&lt;/P&gt;&lt;P&gt;select * from table1 where condtion.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;flag1 = 'X'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from table2 where condtion.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;flag1 = 'X'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from table3 where condtion.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;flag1 = 'X'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If flag1 = 'X' &lt;/P&gt;&lt;P&gt;message 'Entry already exists' Type 'E'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If helpful Pls reward me points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Manas Ranjan Panda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Sep 2006 12:44:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-screen-fields-from-different-tables/m-p/1589561#M265492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-30T12:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to validate screen fields from different tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-screen-fields-from-different-tables/m-p/1589562#M265493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT SINGLE field1 from tab1 into f1.
IF sy-subrc &amp;lt;&amp;gt; 0.
  SELECT SINGLE field1 from tab2 into f1.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      SELECT SINGLE field1 from tab3 into f1.
    ENDIF.
  ENDIF.
ENDIF.

IF sy-subrc = 0.
  MESSAGE E(001) WITH 'Field exists'.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This method avoids unnecessary SELECTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Sep 2006 18:17:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-validate-screen-fields-from-different-tables/m-p/1589562#M265493</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-30T18:17:15Z</dc:date>
    </item>
  </channel>
</rss>

