<?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: Combining Logical Databases? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840644#M357260</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In logical database &lt;/P&gt;&lt;P&gt;- GET =&amp;gt; read the data&lt;/P&gt;&lt;P&gt;- process lower level GET&lt;/P&gt;&lt;P&gt;- GET LATE =&amp;gt; call after treatment of all lower level GET before reading next record of this level&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process it like AT NEW / AT END&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hoping to be understandable...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jan 2007 11:12:00 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2007-01-12T11:12:00Z</dc:date>
    <item>
      <title>Combining Logical Databases?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840636#M357252</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 am using the logical database ADA in a program that I am writing. I need to combine ANLAV, ANLCV, and ANEPV into one super structure that I've created with our necessary fields. The super structure is made up of 4 other structures -- a header structure and 3 custom structure versions of ANLAV, ANLCV, and ANEPV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've set up 3 different internal tables and work areas. I currently have the following code to get the data from those tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
tables: anlav, anlcv, anepv.
initialization.
  get anlav.
  move-corresponding anlav to wa_anlav.
  append wa_anlav to it_anlav.

  get anlcv.
  move-corresponding anlcv to wa_anlcv.
  append wa_anlcv to it_anlcv.

  get anepv.
  move-corresponding anepv to wa_anepv.
  append wa_anepv to it_anepv.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be the best way to join those three tables? I was considering the following (pseudocode):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at it_anlav into wa_ada.
  read it_anlcv into wa_ada1.
  read it_anepv into wa_ada2.
  move-corresponding wa_ada1 to wa_ada.
  move-corresponding wa_ada2 to wa_ada.
  collect wa_ada to it_ada.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My worry is that I will miss some data in the process. I don't know if it's plausible, but for example, if ANLAV returns 10 records, ANLCV returns only 5, but ANEPV returns 15, then I imagine I would lose the extra five records in ANEPV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any helpful suggestions will be awarded points. Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 15:01:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840636#M357252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T15:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Logical Databases?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840637#M357253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any help on this would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I am not very familiar with Logical Databases so if you have any other suggestions on the best way to do this, please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 16:07:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840637#M357253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T16:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Logical Databases?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840638#M357254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LDB makes the join of the possible tables (Parent-Child realationship) with the common key by nested selects.So finally you will get the common data. There is no loss data here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 16:14:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840638#M357254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T16:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Logical Databases?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840639#M357255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Eswar. But how would you suggest that I combine those 3 tables (ANLAV, ANLCV, and ANEPV) into one super table? Would the pseudocode I wrote work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 16:17:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840639#M357255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T16:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Logical Databases?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840640#M357256</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;OK..Try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: V_it_anlav  TYPE XFELD.&lt;/P&gt;&lt;P&gt;DATA: V_it_anlcv  TYPE XFELD.&lt;/P&gt;&lt;P&gt;DATA: V_it_anepv TYPE XFELD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: WA_IT_ANLAV,&lt;/P&gt;&lt;P&gt;             WA_IT_ANLCV,&lt;/P&gt;&lt;P&gt;             WA_IT_ANEPV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IT_ANLAV INTO WA_IT_ANLAV&lt;/P&gt;&lt;P&gt;                     INDEX SY-INDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  V_IT_ANLAV = 'X'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IT_ANLCV INTO WA_IT_ANLCV&lt;/P&gt;&lt;P&gt;                     INDEX SY-INDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  V_IT_ANLCV = 'X'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE IT_ANEPV INTO WA_IT_ANEPV&lt;/P&gt;&lt;P&gt;                     INDEX SY-INDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  V_IT_ANEPV = 'X'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Exit out of the loop if none of the three internal tables has records.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF V_IT_ANLAV = 'X' AND&lt;/P&gt;&lt;P&gt;    V_IT_ANLCV = 'X' AND&lt;/P&gt;&lt;P&gt;    V_IT_ANEPV = 'X'.&lt;/P&gt;&lt;P&gt;  EXIT.&lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the records to the output internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MOVE-CORRESPONDING WA_IT_ANLAV TO WA_ADA.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING WA_IT_ANLCV TO WA_ADA.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING WA_IT_ANEPV TO WA_ADA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND WA_ADA TO IT_ADA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this works..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 16:21:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840640#M357256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T16:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Logical Databases?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840641#M357257</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;Please check my reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 16:22:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840641#M357257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T16:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Logical Databases?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840642#M357258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET anlav.&lt;/P&gt;&lt;P&gt;  CLEAR flag_anla.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET anlcv.&lt;/P&gt;&lt;P&gt;  CLEAR flag_anlc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET anepv.&lt;/P&gt;&lt;P&gt;  CLEAR outtab.&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING anepv TO outtab.&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING anlcv TO outtab.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;clear cumulative fields (amounts, qty) of anlcv&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  MOVE 'X' to flag_anlc&lt;/P&gt;&lt;P&gt;  move-corresponding anlav TO outtab.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;clear cumulative fields (amounts, qty) of anlav&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  MOVE 'X' TO flag_anla.&lt;/P&gt;&lt;P&gt;  COLLECT outtab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET anlcv LATE.&lt;/P&gt;&lt;P&gt;  CLEAR outtab.&lt;/P&gt;&lt;P&gt;  IF flag_anlc IS INITIAL.&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING anlcv TO outtab.&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING anlav TO outtab.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  clear cumulative fields (amounts, qty) of anlav&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    MOVE 'X' TO flag_anla.&lt;/P&gt;&lt;P&gt;    COLLECT outtab.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET anlcv LATE.&lt;/P&gt;&lt;P&gt;  CLEAR outtab.&lt;/P&gt;&lt;P&gt;  IF flag_anla IS INITIAL.&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING anlav TO outtab.&lt;/P&gt;&lt;P&gt;    COLLECT outtab.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 16:25:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840642#M357258</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-01-11T16:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Logical Databases?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840643#M357259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Naren. I rarely use "DO" so I didn't consider it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raymond, can you please explain in more detail how "LATE" works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again, everyone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 16:39:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840643#M357259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T16:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Logical Databases?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840644#M357260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In logical database &lt;/P&gt;&lt;P&gt;- GET =&amp;gt; read the data&lt;/P&gt;&lt;P&gt;- process lower level GET&lt;/P&gt;&lt;P&gt;- GET LATE =&amp;gt; call after treatment of all lower level GET before reading next record of this level&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;process it like AT NEW / AT END&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hoping to be understandable...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 11:12:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/combining-logical-databases/m-p/1840644#M357260</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-01-12T11:12:00Z</dc:date>
    </item>
  </channel>
</rss>

