<?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: Help with basic ABAP code (merge internal tables, sort of...) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496749#M230599</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Varun,&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;This is sort of what I am looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a question:&lt;/P&gt;&lt;P&gt;Will this code also add records from I_B and I_C not existing yet in I_MASTER to I_MASTER?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jul 2006 15:29:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-26T15:29:15Z</dc:date>
    <item>
      <title>Help with basic ABAP code (merge internal tables, sort of...)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496746#M230596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Can someone please help write some basic code for a Basis guy with limited ABAP knowledge?&lt;/P&gt;&lt;P&gt;Should be some easy points for an experienced ABAPer! &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have identicaly structured internal tables I_A and I_B and I_C which have already been filled by function models I called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How will I code the following?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to read all the data of I_A into a new internal table I_MASTER (structured the same as I_A,I_B and I_C).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I want to read I_B and: &lt;/P&gt;&lt;P&gt;1)Update I_MASTER with NEW records &lt;/P&gt;&lt;P&gt;2)Update existing records if the value of field MYFIELD in I_B is smaller than the value of MYFIELD in I_MASTER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I want to read I_C and: &lt;/P&gt;&lt;P&gt;1)Update I_MASTER with NEW records &lt;/P&gt;&lt;P&gt;2)Update existing records if the value of field MYFIELD in I_C is smaller than the value of MYFIELD in I_MASTER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if I can provide anymore information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for you help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adriaan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Adriaan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Adriaan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 15:07:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496746#M230596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T15:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help with basic ABAP code (merge internal tables, sort of...)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496747#M230597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look to t-code ABAPDOCU.  It contains many good examples to assist you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 15:09:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496747#M230597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T15:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help with basic ABAP code (merge internal tables, sort of...)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496748#M230598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adriaan ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to read all the data of I_A into a new internal table I_MASTER (structured the same as I_A,I_B and I_C).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;i_master[] = i_a[] .&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_b .&lt;/P&gt;&lt;P&gt;read table i_master with key myfiled &amp;lt; i_b-myfield .&lt;/P&gt;&lt;P&gt;if sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;append i_master from i_b .&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;loop at i_c .&lt;/P&gt;&lt;P&gt;read table i_master with key myfiled &amp;lt; i_c-myfield .&lt;/P&gt;&lt;P&gt;if sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;append i_master from i_c .&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;Let me know if this helped .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: varun sonu&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 15:16:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496748#M230598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T15:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with basic ABAP code (merge internal tables, sort of...)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496749#M230599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Varun,&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;This is sort of what I am looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a question:&lt;/P&gt;&lt;P&gt;Will this code also add records from I_B and I_C not existing yet in I_MASTER to I_MASTER?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 15:29:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496749#M230599</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T15:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help with basic ABAP code (merge internal tables, sort of...)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496750#M230600</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;I guess  it will not add those records .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Varun .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 15:35:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496750#M230600</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T15:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with basic ABAP code (merge internal tables, sort of...)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496751#M230601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adriaan. You could try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I_MASTER [] = I_A [].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at I_B.&lt;/P&gt;&lt;P&gt;  found = 'N'.&lt;/P&gt;&lt;P&gt;  loop at I_MASTER where KEY = I_B-KEY.&lt;/P&gt;&lt;P&gt;    if I_B-MYFIELD &amp;lt; I_MASTER-MYFIELD.&lt;/P&gt;&lt;P&gt;      I_MASTER-MYFIELD = I_B-MYFIELD.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    found = 'Y'.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;  if found = 'N'.&lt;/P&gt;&lt;P&gt;    append I_B to I_MASTER.&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;loop at I_C.&lt;/P&gt;&lt;P&gt;  found = 'N'.&lt;/P&gt;&lt;P&gt;  loop at I_MASTER where KEY = I_C-KEY.&lt;/P&gt;&lt;P&gt;    if I_C-MYFIELD &amp;lt; I_MASTER-MYFIELD.&lt;/P&gt;&lt;P&gt;      I_MASTER-MYFIELD = I_C-MYFIELD.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    found = 'Y'.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;  if found = 'N'.&lt;/P&gt;&lt;P&gt;    append I_C to I_MASTER.&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;I hope this helps.&lt;/P&gt;&lt;P&gt; - April King&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2006 19:23:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-basic-abap-code-merge-internal-tables-sort-of/m-p/1496751#M230601</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-26T19:23:49Z</dc:date>
    </item>
  </channel>
</rss>

