<?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: Logic required in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1863760#M364348</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest you create two tables called parent and child.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Structure for parent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parent , Child.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Structure for child &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Child, value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for the example you have given the parent table will have the values&lt;/P&gt;&lt;P&gt;123 xyz&lt;/P&gt;&lt;P&gt;123 456&lt;/P&gt;&lt;P&gt;xyz 456&lt;/P&gt;&lt;P&gt;456 abc&lt;/P&gt;&lt;P&gt;(Basically listign out all parents directly or indirectly)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the child table will have the entries&lt;/P&gt;&lt;P&gt;123 xyz&lt;/P&gt;&lt;P&gt;xyz 456&lt;/P&gt;&lt;P&gt;456 abc&lt;/P&gt;&lt;P&gt;(Basically listing all childs here)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now for the record 123, if you need the related records then you go to the parant table and collect all teh parants which is 123 itself, xyz and 456. For these parants you get the childs which is xyz and 456 as you desired. This is the best and efficient way to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Guru&lt;/P&gt;&lt;P&gt;Reward points for helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jan 2007 22:19:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-09T22:19:22Z</dc:date>
    <item>
      <title>Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1863759#M364347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following scenerio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an internal table with data.I have to check each entry in it  in the&lt;/P&gt;&lt;P&gt;database table say zsuku with fields either (field1 or field2) and I have to append all related records to it.&lt;/P&gt;&lt;P&gt;Fo ex : &lt;/P&gt;&lt;P&gt;In zsuku it may contain like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZSUKU ---&amp;gt;table.&lt;/P&gt;&lt;P&gt;field1   fild2  ---&amp;gt; fields&lt;/P&gt;&lt;P&gt;123       xyz&lt;/P&gt;&lt;P&gt;xyz       456&lt;/P&gt;&lt;P&gt;456       abc&lt;/P&gt;&lt;P&gt;....so on&lt;/P&gt;&lt;P&gt;so for ex in itab if it contains 123 i have to get all related records like xyz,456,abc.&lt;/P&gt;&lt;P&gt;same case if itab contains abc i should get all related records 123,456,xyz like that.&lt;/P&gt;&lt;P&gt;I hope it is clear.&lt;/P&gt;&lt;P&gt;Any help will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sukumar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Sukumar G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2007 22:07:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1863759#M364347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-09T22:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1863760#M364348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest you create two tables called parent and child.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Structure for parent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parent , Child.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Structure for child &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Child, value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for the example you have given the parent table will have the values&lt;/P&gt;&lt;P&gt;123 xyz&lt;/P&gt;&lt;P&gt;123 456&lt;/P&gt;&lt;P&gt;xyz 456&lt;/P&gt;&lt;P&gt;456 abc&lt;/P&gt;&lt;P&gt;(Basically listign out all parents directly or indirectly)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the child table will have the entries&lt;/P&gt;&lt;P&gt;123 xyz&lt;/P&gt;&lt;P&gt;xyz 456&lt;/P&gt;&lt;P&gt;456 abc&lt;/P&gt;&lt;P&gt;(Basically listing all childs here)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now for the record 123, if you need the related records then you go to the parant table and collect all teh parants which is 123 itself, xyz and 456. For these parants you get the childs which is xyz and 456 as you desired. This is the best and efficient way to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Guru&lt;/P&gt;&lt;P&gt;Reward points for helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2007 22:19:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1863760#M364348</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-09T22:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1863761#M364349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If record matches, where do you want to append rows? In another internal table? If so, refer below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: IT_DATA TYPE ZSUKU OCCURS 0. "New itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHECK NOT ITAB[] IS INITIAL.. "Your itab which contains data&lt;/P&gt;&lt;P&gt;SELECT FIELD1 FIELD2&lt;/P&gt;&lt;P&gt;       FROM ZSUKU&lt;/P&gt;&lt;P&gt;       INTO TABLE IT_DATA&lt;/P&gt;&lt;P&gt;       FOR ALL ENTRIES IN ITAB&lt;/P&gt;&lt;P&gt;       WHERE FIELD1 EQ ITAB-FIELD1&lt;/P&gt;&lt;P&gt;       OR FIELD2    EQ ITAB-FIELD2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jan 2007 22:21:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/logic-required/m-p/1863761#M364349</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-09T22:21:57Z</dc:date>
    </item>
  </channel>
</rss>

