<?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: Table Fill logic in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139789#M1191281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks when I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY table2 FROM itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the error message u201CYou cannot use an internal table as a work areau201D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Jan 2009 16:54:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-30T16:54:35Z</dc:date>
    <item>
      <title>Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139770#M1191262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone help me with some logic.  The details are as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to fill the table with records for 10 years from 01012008.  Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 1 &lt;/P&gt;&lt;P&gt;Main_id u2013 Key field&lt;/P&gt;&lt;P&gt;Type u2013 Key field&lt;/P&gt;&lt;P&gt;No of units&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Record Example&lt;/P&gt;&lt;P&gt;Main id: ABC&lt;/P&gt;&lt;P&gt;Type: Bottle&lt;/P&gt;&lt;P&gt;No of units: 20&lt;/P&gt;&lt;P&gt;Table 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Main_id u2013 Key field&lt;/P&gt;&lt;P&gt;Type u2013 Key field&lt;/P&gt;&lt;P&gt;Date u2013 Key field&lt;/P&gt;&lt;P&gt;No of units &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Record Example (for the record from table 1above there would be 3650 records)&lt;/P&gt;&lt;P&gt;Main id: ABC&lt;/P&gt;&lt;P&gt;Type: Bottle&lt;/P&gt;&lt;P&gt;Date: 01012008&lt;/P&gt;&lt;P&gt;No of units: 20&lt;/P&gt;&lt;P&gt;Main id: ABC&lt;/P&gt;&lt;P&gt;Type: Bottle&lt;/P&gt;&lt;P&gt;Date: 01012008&lt;/P&gt;&lt;P&gt;No of units: 20&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 08:44:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139770#M1191262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T08:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139771#M1191263</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;From your question I understand that your requirement is to copy from table 1 to table 2 ,assigning the date field in table 2 from starting date 01012008 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:  itab2 type table of table2 with header line,&lt;/P&gt;&lt;P&gt;         st_dt like sy-datum value '01012008'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from dbtable1 into corresponding fields of itab2.  " copies all data from table 1&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 4.&lt;/P&gt;&lt;P&gt;         Message E000(YJK).&lt;/P&gt;&lt;P&gt; else. &lt;/P&gt;&lt;P&gt;    loop at itab2.&lt;/P&gt;&lt;P&gt;           itab2-date = st_dt.&lt;/P&gt;&lt;P&gt;           modify itab2.                                     " adds the date to the records&lt;/P&gt;&lt;P&gt;           st_dt = st_dt +1.                               "increments date.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also corresponding fields is not a good practice. So you can use 2 itabs and improve the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jayanthi.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 09:05:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139771#M1191263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T09:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139772#M1191264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this my table2 is not a copy of all the fields just a small subset of fields (Main_id, Type, No of units) and I will add date.  What amendments would I need to make to the original example?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 09:24:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139772#M1191264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T09:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139773#M1191265</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;PRE&gt;&lt;CODE&gt;data: itab2 type table of table2 with header line,
        st_dt like sy-datum value '01012008'.

select * from dbtable1 into table itab2. " copies all data from table 1. No need for endselect

if sy-subrc eq 4.
        Message E000(YJK).
else. 
        loop at itab2.
             itab2-date = st_dt.
             modify itab2. " adds the date to the records
             st_dt = st_dt +1. "increments date.
         endloop.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code copies all data from table1 into itab2.&lt;/P&gt;&lt;P&gt;Inside the loop for each entry you are filling in the date part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; Do tell if it works &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jayanthi.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 09:30:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139773#M1191265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T09:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139774#M1191266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create an internal table itab1 with fields     Main_id, Type, No of units.&lt;/P&gt;&lt;P&gt;create an internal table itab2  with Main_id, Type, No of units, date.(these are the 4 fields that r in ur table2)&lt;/P&gt;&lt;P&gt;now select Main_id, Type, No of units from table1 into itab1.&lt;/P&gt;&lt;P&gt;loop on itab1.&lt;/P&gt;&lt;P&gt;move main_id      in itab1 to itab2.&lt;/P&gt;&lt;P&gt;move type           in itab1 to itab2.&lt;/P&gt;&lt;P&gt;move no of units   in itab1 to itab2.&lt;/P&gt;&lt;P&gt;and now add the date to itab2.&lt;/P&gt;&lt;P&gt;APPEND ITAB2.&lt;/P&gt;&lt;P&gt;so this will get populated along with tha date for each entry.&lt;/P&gt;&lt;P&gt;now, modify the table2 with itab2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 09:36:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139774#M1191266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T09:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139775#M1191267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this.  I am not a seasoned ABAPer but just handed the short straw.  Could you provide logic for the pseudo logic that you have given u2013 not sure statement to create the itab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 10:03:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139775#M1191267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T10:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139776#M1191268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if there are 10 entries in table1.acc to ur req, i assume that these 10 will be in TABLE2 along wth date.&lt;/P&gt;&lt;P&gt;be clear on the date u need to pass. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab1 type standard table of TABLE1,&lt;/P&gt;&lt;P&gt;        itab2 type stabdard table of TABLE2.&lt;/P&gt;&lt;P&gt;data: v_dat type dats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from table 1 into table itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into wa_itab1.&lt;/P&gt;&lt;P&gt;wa_itab2-main_id = wa_itab1-main_id.&lt;/P&gt;&lt;P&gt;wa_itab2-type = wa_itab1-type.&lt;/P&gt;&lt;P&gt;wa_itab2-no.of units = wa_itab1-no.ofunits.&lt;/P&gt;&lt;P&gt;wa_itab2-date = v_dat.           "pass the initialized date&lt;/P&gt;&lt;P&gt;APPEND wa_itab2 to itab2.&lt;/P&gt;&lt;P&gt;v_dat =  v_dat + 1.    " increment the date&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify TABLE2 from itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kalyan Chakravarthi on Jan 30, 2009 11:15 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 10:15:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139776#M1191268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T10:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139777#M1191269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much.  I have created the report with the code as below and have a couple of questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.	How can I amend the code so that my v_dat has a start value of 01.01.2008 u2013 the field in the table is data type DATS length 8&lt;/P&gt;&lt;P&gt;2.	I face the following error - The field "WA_ITAB1" is unknown, but there is a field with the similar name "ITAB1". "ITAB1".  How do I resolve this&lt;/P&gt;&lt;P&gt;3.	I cannot see the loop ending do I also need to provide an end date as part of my routine this is fixed my start date is 01.01.2008 and end date is 31.12.2020 can you advise&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  REPORT1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab1 type standard table of TABLE1,&lt;/P&gt;&lt;P&gt;itab2 type standard table of TABLE2.&lt;/P&gt;&lt;P&gt;data: v_dat type dats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from TABLE1 into table itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into wa_itab1.&lt;/P&gt;&lt;P&gt;  wa_itab2-main_id = wa_itab1-main_id.&lt;/P&gt;&lt;P&gt;  wa_itab2-type = wa_itab1-type.&lt;/P&gt;&lt;P&gt;  wa_itab2-no.of units = wa_itab1-no.ofunits.&lt;/P&gt;&lt;P&gt;  wa_itab2-date = v_dat. "pass the initialized date&lt;/P&gt;&lt;P&gt;  APPEND wa_itab2 to itab2.&lt;/P&gt;&lt;P&gt;  v_dat = v_dat + 1. " increment the date&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify TABLE2 from itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Niten Shah on Jan 30, 2009 1:30 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 12:18:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139777#M1191269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T12:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139778#M1191270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry to be a pain can someone assist me with this thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 14:52:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139778#M1191270</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T14:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139779#M1191271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't fully understand what your goal is.. but the following code will correct a lot of your questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: wa_itab1   LIKE table1.
DATA: wa_itab2   LIKE table2.
DATA: itab1 TYPE STANDARD TABLE OF wa_itab1,
      itab2 TYPE STANDARD TABLE OF wa_itab2.
DATA: v_dat TYPE d VALUE '20080101'.

SELECT * FROM table1 INTO TABLE itab1.

LOOP AT itab1 INTO wa_itab1.
  wa_itab2-main_id = wa_itab1-main_id.
  wa_itab2-type = wa_itab1-type.
  wa_itab2-no.of units = wa_itab1-no.ofunits.
  wa_itab2-date = v_dat. "pass the initialized date
  APPEND wa_itab2 TO itab2.
  v_dat = v_dat + 1. " increment the date
  IF vdat GT '20201231'.
    EXIT.
  ENDIF.
ENDLOOP.

MODIFY table2 FROM itab2.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The LOOP will stop automatically at the end of itab1, OR when you've written a record for every date from 1/1/2008 to 12/31/2020.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 15:06:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139779#M1191271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T15:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139780#M1191272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this I now get the message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type "WA_ITAB1" is unknown&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is below and I have commented downwards from the point that I get the error message&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="5" type="ul"&gt;&lt;P&gt;Not sure if it makes a difference my table name is as follows /BIC/Table1*********&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: wa_itab1   LIKE table1.&lt;/P&gt;&lt;P&gt;DATA: wa_itab2   LIKE table2.&lt;/P&gt;&lt;P&gt;DATA: itab1 TYPE STANDARD TABLE OF wa_itab1,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     itab2 TYPE STANDARD TABLE OF wa_itab2.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*DATA: v_dat TYPE d VALUE '20080101'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*SELECT * FROM table1 INTO TABLE itab1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*LOOP AT itab1 INTO wa_itab1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; wa_itab2-main_id = wa_itab1-main_id.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; wa_itab2-type = wa_itab1-type.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; wa_itab2-no.of units = wa_itab1-no.ofunits.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; wa_itab2-date = v_dat. "pass the initialized date&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; APPEND wa_itab2 TO itab2.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; v_dat = v_dat + 1. " increment the date&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; IF v_dat GT '20201231'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   EXIT.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*ENDLOOP.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;*MODIFY table2 FROM itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Niten Shah on Jan 30, 2009 4:25 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 15:23:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139780#M1191272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T15:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139781#M1191273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chances are because you don't have a DB Table called TABLE1 or TABLE2 defined in SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're going to need to define them, or define a structure for WA_ITAB1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 15:34:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139781#M1191273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T15:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139782#M1191274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll also need a line above all this code that contains:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: Table1, Table2.  "to whatever tables you end up working with.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 15:35:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139782#M1191274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T15:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139783#M1191275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The tables have been defined but not sure if the naming convention makes a difference.  The tables are generated (BI tables) and have a naming convention /BIC/TABLE1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 15:37:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139783#M1191275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T15:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139784#M1191276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like you're on a UNIX system and I'm not familiar with that at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what BI is either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order for you to address DB Tables within a Report type program, the table must be defined and&lt;/P&gt;&lt;P&gt;accessable through transaction SE11.  I knew you hadn't done this as generally, custom tables begin&lt;/P&gt;&lt;P&gt;with either a Z or Y.   Y generally don't go to production.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if the TABLE1 and TABLE2 are Flat files, you can import them into your program and process&lt;/P&gt;&lt;P&gt;them with most of the code defined.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 15:42:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139784#M1191276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T15:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139785#M1191277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. Both tables are accessible from SE11.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 15:54:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139785#M1191277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T15:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139786#M1191278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then as a guess..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: BIC/Table1, BIC/Table2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: 'BIC/Table1', 'BIC/Table2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and when you select from them.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM BIC/TABLE1 or FROM 'BIC/TABLE1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Paul Chapman on Jan 30, 2009 11:06 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 16:05:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139786#M1191278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T16:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139787#M1191279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for this.  I have managed to get rid of the errors, the table names were fine and I referred both wa_itab and itab to the table&lt;/P&gt;&lt;P&gt;the code is below.  The problem now is that what I am expecting once I run this program is to copy the data from table1 into table2&lt;/P&gt;&lt;P&gt;When I run the report nothing happens can you advise.  Do I need to Append or anything?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  REPORT1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: wa_itab1  LIKE table1.&lt;/P&gt;&lt;P&gt;DATA: wa_itab2  LIKE table2.&lt;/P&gt;&lt;P&gt;DATA: itab1 TYPE STANDARD TABLE OF table1,&lt;/P&gt;&lt;P&gt;      itab2 TYPE STANDARD TABLE OF table2.&lt;/P&gt;&lt;P&gt;DATA: v_dat TYPE d VALUE '20080101'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM table1 INTO TABLE itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab1 INTO wa_itab1.&lt;/P&gt;&lt;P&gt;  wa_itab2-FIELD1 = wa_itab1-FIELD1.&lt;/P&gt;&lt;P&gt;  wa_itab2-FIELD2 = wa_itab1-FIELD2.&lt;/P&gt;&lt;P&gt;  wa_itab2-FIELD3 = wa_itab1-FIELD3.&lt;/P&gt;&lt;P&gt;  wa_itab2-FIELD4 = v_dat. "pass the initialized date&lt;/P&gt;&lt;P&gt;  APPEND wa_itab2 TO itab2.&lt;/P&gt;&lt;P&gt;  v_dat = v_dat + 1. " increment the date&lt;/P&gt;&lt;P&gt;  IF v_dat GT '20201231'.&lt;/P&gt;&lt;P&gt;    EXIT.&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;MODIFY table FROM wa_itab2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 16:42:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139787#M1191279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T16:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139788#M1191280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Might help if you use debug and see if you are getting anything from your select into ITAB1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY table FROM wa_itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;likely should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY table2 FROM TABLE itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Paul Chapman on Jan 30, 2009 11:49 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 16:48:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139788#M1191280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T16:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Table Fill logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139789#M1191281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks when I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY table2 FROM itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the error message u201CYou cannot use an internal table as a work areau201D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 16:54:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-fill-logic/m-p/5139789#M1191281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T16:54:35Z</dc:date>
    </item>
  </channel>
</rss>

