<?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: extracting date from on internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-date-from-on-internal-table/m-p/4728297#M1109860</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siddhi,&lt;/P&gt;&lt;P&gt;Here is the sample code for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Loop at T2.
  Read table T1 with key key1 = T2-key1.
  if sy-subrc = 0.
     Read table T3 with key fromdate = T2-fromdate
                                       todate    = T2-todate.

     if sy-subrc = 0.
       "Append data into the final table.
     endif.
  endif.
Endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This way you can achieve your solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chdianand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Nov 2008 08:29:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-11T08:29:06Z</dc:date>
    <item>
      <title>extracting date from on internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-date-from-on-internal-table/m-p/4728295#M1109858</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 3 tables: T1, T2 and T3&lt;/P&gt;&lt;P&gt;all are having same key field say K1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am selecting all the records from table T2 whose key fields matches with T1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now, i have to extract date from table T3 which falls within the range of FROM DATE and TO DATE. &lt;/P&gt;&lt;P&gt;its range of FROM DATE and TO DATE is specified in table T2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 08:21:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-date-from-on-internal-table/m-p/4728295#M1109858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T08:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: extracting date from on internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-date-from-on-internal-table/m-p/4728296#M1109859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siddhi,&lt;/P&gt;&lt;P&gt;What exactly do u want? Do u want the code for the above logic?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For dates you can do one thing. Write the following condition to get the date between FROM DATE and TO DATE.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;where date &amp;gt;= from_date and 
         date &amp;lt;= to_date.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saba&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 08:26:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-date-from-on-internal-table/m-p/4728296#M1109859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T08:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: extracting date from on internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-date-from-on-internal-table/m-p/4728297#M1109860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siddhi,&lt;/P&gt;&lt;P&gt;Here is the sample code for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Loop at T2.
  Read table T1 with key key1 = T2-key1.
  if sy-subrc = 0.
     Read table T3 with key fromdate = T2-fromdate
                                       todate    = T2-todate.

     if sy-subrc = 0.
       "Append data into the final table.
     endif.
  endif.
Endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This way you can achieve your solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chdianand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 08:29:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-date-from-on-internal-table/m-p/4728297#M1109860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T08:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: extracting date from on internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-date-from-on-internal-table/m-p/4728298#M1109861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In such case &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop on the internal table where data is minimum so that to avoid extra looping in your case I think it will be T3 table, then put a read on T2 and on sy-subrc of T2 read T1 as explained above.&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;Regards&lt;/P&gt;&lt;P&gt;Bikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 08:36:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-date-from-on-internal-table/m-p/4728298#M1109861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T08:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: extracting date from on internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-date-from-on-internal-table/m-p/4728299#M1109862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;data: r_date type range of sy-datum,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;wa_date like line of r_date.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;   ...........................................&lt;/P&gt;&lt;P&gt;   ...........................................&lt;/P&gt;&lt;P&gt;loop at t1.&lt;/P&gt;&lt;P&gt;   loop at t2 where ...... "all key fields matched with t1.          &lt;/P&gt;&lt;P&gt;        wa_date-sign   = 'I'.   "I = include, E = exclude&lt;/P&gt;&lt;P&gt;        wa_date-option = 'BT'.  "EQ, BT, NE ....&lt;/P&gt;&lt;P&gt;        wa_date-low    = t2-fromdate.&lt;/P&gt;&lt;P&gt;        wa_date-high   = t2-todate&lt;/P&gt;&lt;P&gt;        append wa_date to r_date.      &lt;/P&gt;&lt;P&gt;   &lt;STRONG&gt;loop at t3 where date in r_date. " date is the field in t3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;         ....................&lt;/P&gt;&lt;P&gt;         ...................&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2008 08:45:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/extracting-date-from-on-internal-table/m-p/4728299#M1109862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-11T08:45:21Z</dc:date>
    </item>
  </channel>
</rss>

