<?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: validation while entering data in custom table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-while-entering-data-in-custom-table/m-p/3689524#M888408</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;my question is how to validate the newly entered enteries with the enteries in the table which are not saved but entered in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regrads,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Apr 2008 14:53:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-22T14:53:50Z</dc:date>
    <item>
      <title>validation while entering data in custom table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-while-entering-data-in-custom-table/m-p/3689522#M888406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ,&lt;/P&gt;&lt;P&gt; some validation need to be performed while entering data in the custom table, validation requires to check the same custom table enteries earlier saved in the custom table- this  can be met&lt;/P&gt;&lt;P&gt;but if the requirement is also to validate the new enteries &lt;/P&gt;&lt;P&gt;with not just the saved enteries but also the previous entered&lt;/P&gt;&lt;P&gt;enteries( which are not saved)  &lt;/P&gt;&lt;P&gt;please suggest&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 11:08:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-while-entering-data-in-custom-table/m-p/3689522#M888406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T11:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: validation while entering data in custom table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-while-entering-data-in-custom-table/m-p/3689523#M888407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi saurabh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you saving it through a custom program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so you will be fetching all data entered by the user in an internal table ...in the internal table you can search for duplicates based on the key of the table you need to save into&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do the following...When the user press 'SAVE" or other custom button write the code as below&lt;/P&gt;&lt;P&gt;imagine the data to be stored in int_tab1&lt;/P&gt;&lt;P&gt;declare int_tab2 as same type of int_tab2..and that the final table you are saving has 2 keyfields keyfield1 and keyfield2&lt;/P&gt;&lt;P&gt;also use a workarea of type int_table1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;sort the internal table by all the key fields so that delete adjacent duplicate ABAP statement will work correctly&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;sort int_tab1 by key1 descending key2 descending.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;clear the table to be copied into initially&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear int_tab2[].&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;create an exact copy on the initial internal table and pass all the values from internal table1 to internal table2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;int_tab2[ ] = int_tab1[ ].&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;loop in workarea&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;loop at int_tab1 into workarea.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;take the first line and check if duplicate records are there in the copy table we are using&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;if duplicate records are there sy-subrc = 0 otherwise sy-subrc = 4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;delete adjacent duplicates from int_tab2&lt;/P&gt;&lt;P&gt;comparing keyfield1 = workarea-keyfield1 and&lt;/P&gt;&lt;P&gt;         keyfield2 = workarea-keyfield2.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;Message 'The entry for Key field already exists' type 'E'.&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check and revert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Byju&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Apr 22, 2008 11:07 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 11:35:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-while-entering-data-in-custom-table/m-p/3689523#M888407</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T11:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: validation while entering data in custom table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validation-while-entering-data-in-custom-table/m-p/3689524#M888408</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;my question is how to validate the newly entered enteries with the enteries in the table which are not saved but entered in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regrads,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;saurabh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2008 14:53:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validation-while-entering-data-in-custom-table/m-p/3689524#M888408</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-22T14:53:50Z</dc:date>
    </item>
  </channel>
</rss>

