<?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: internal table validation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231403#M1984522</link>
    <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;killspree07&lt;/SPAN&gt;, do you continue to have issues with your coding or were you able to solve your problem?&lt;/P&gt;&lt;P&gt;Please add comments to your question that further describe your problem or add an answer that describes how you solved your problem.&lt;BR /&gt;If your problem is solved, accept an answer if it helped you and please close the question.&lt;/P&gt;</description>
    <pubDate>Sun, 13 Sep 2020 04:08:00 GMT</pubDate>
    <dc:creator>michael_piesche</dc:creator>
    <dc:date>2020-09-13T04:08:00Z</dc:date>
    <item>
      <title>internal table validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231398#M1984517</link>
      <description>&lt;P&gt;I have an internal table with some data lets say emp no, emp salary,emp dob,etc. I have a database table with the same entries .I need to copy the internal table in the DB table while no duplicate entries should be populated. How to do this validation part? Please help.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 08:54:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231398#M1984517</guid>
      <dc:creator>killspree07</dc:creator>
      <dc:date>2020-07-17T08:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: internal table validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231399#M1984518</link>
      <description>&lt;P&gt;Hi Rahul, &lt;BR /&gt;Warm welcome and thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with &lt;A href="https://community.sap.com/resources/questions-and-answers" target="test_blank"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt; (if you haven't already), as it provides tips for preparing questions that draw responses from our members. For example, you can outline what steps you took to find answers (and why they weren't helpful), share screenshots of what you've seen/done, make sure you've applied the appropriate tags, and use a more descriptive subject line. The more details you provide, the more likely it is that members will be able to assist you.
&lt;BR /&gt;Should you wish, you can revise your question by selecting Actions, then Edit (although once someone answers your question, you'll lose the ability to edit the question -- but if that happens, you can leave more details in a comment).
&lt;BR /&gt;Finally, if you're hoping to connect with readers, please consider adding a picture to your profile. Here's how you do it: &lt;A href="https://www.youtube.com/watch?v=F5JdUbyjfMA&amp;amp;list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS" target="test_blank"&gt;https://www.youtube.com/watch?v=F5JdUbyjfMA&amp;amp;list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS&lt;/A&gt;. By personalizing your profile with a photo of you, you encourage readers to respond.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best regards, &lt;BR /&gt;Lena (SAP Community Global Moderator)&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 08:55:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231399#M1984518</guid>
      <dc:creator>lenastodal</dc:creator>
      <dc:date>2020-07-17T08:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: internal table validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231400#M1984519</link>
      <description>&lt;P&gt;This is not a place where people will do your job, it is a place for technical HELP.&lt;/P&gt;&lt;P&gt;So, please, give us the problem you have, describe what you have already done&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 08:56:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231400#M1984519</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-07-17T08:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: internal table validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231401#M1984520</link>
      <description>&lt;P&gt;This statement could help you. &lt;/P&gt;&lt;P&gt;Hint: If possible never write directly to SAP tables&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY &amp;lt;your_db_table&amp;gt; FROM TABLE &amp;lt;your_itab&amp;gt;.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Jul 2020 09:21:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231401#M1984520</guid>
      <dc:creator>ClausB</dc:creator>
      <dc:date>2020-07-17T09:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: internal table validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231402#M1984521</link>
      <description>&lt;P&gt;Where do you have duplicate entries? In your internal table or between internal and database table?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1) Duplicate entries in internal table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In order to make sure that you dont have duplicate entries in your internal table, use the following coding to eliminate duplicates. The table need to be sortable, e.g. a standard table would do.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT itab BY key1 key2 key3.
DELETE ADJACENT DUPLICATES FROM itab COMPARING key1 key2 key3.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;2) Duplicate entries between internal and database table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you have duplicate entries between internal and database table, you have two options: a) Only insert new records, disregard existing records, or b) insert new records and update existing records.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2a) Insert new records only, disregard existing records&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If the addition ACCEPTING DUPLICATE KEYS is specified, all rows are inserted for which this is possible. The remaining rows are discarded and sy-subrc is set to 4. The system field sy-dbcnt is set to the number of rows that are inserted. (I normally would not recommend using this addition, as it clearly shows, that you are not 100% in control of what is in and what goes in that table.)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INSERT dbtable FROM TABLE itab ACCEPTING DUPLICATE KEYS. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;2b) Insert new records and update existing records&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you want to insert new records and update existing records, use modify instead of insert.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY dbtable FROM TABLE itab.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jul 2020 04:14:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231402#M1984521</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-07-20T04:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: internal table validation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231403#M1984522</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;killspree07&lt;/SPAN&gt;, do you continue to have issues with your coding or were you able to solve your problem?&lt;/P&gt;&lt;P&gt;Please add comments to your question that further describe your problem or add an answer that describes how you solved your problem.&lt;BR /&gt;If your problem is solved, accept an answer if it helped you and please close the question.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Sep 2020 04:08:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-validation/m-p/12231403#M1984522</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-09-13T04:08:00Z</dc:date>
    </item>
  </channel>
</rss>

