<?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: Select into internal table with default entry for every select in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598557#M1568065</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value 'GM' is not in DB table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Dec 2010 07:45:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-12-27T07:45:04Z</dc:date>
    <item>
      <title>Select into internal table with default entry for every select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598551#M1568059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAPers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want  to select data from a custom (Z)table into internal table with a defalut value 'GM' do be added at end of every row selected from custom table into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can do it at internal table level but I want to do it at database select level itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Ex: 

1 abc 34 monday january 2011 GM
2 bbc 34 monday january 2011 GM
3 cbc 34 monday january 2011 GM
4 dbc 34 monday january 2011 GM&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do we acheive above..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 07:07:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598551#M1568059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-27T07:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Select into internal table with default entry for every select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598552#M1568060</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;    Write select..endselect as  : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of it_pa0001 occurs 0,&lt;/P&gt;&lt;P&gt;            pernr like pa0001-pernr,&lt;/P&gt;&lt;P&gt;            field1(2),&lt;/P&gt;&lt;P&gt;          end of it_pa0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select pernr from pa0001 into it_pa0001-pernr&lt;/P&gt;&lt;P&gt;       where pernr &amp;lt;&amp;gt; ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_pa0001-field1 = 'GM'.&lt;/P&gt;&lt;P&gt;append it_pa0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srini.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 07:14:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598552#M1568060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-27T07:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Select into internal table with default entry for every select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598553#M1568061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Actually iam not clear what exactly is ur requirement ?&lt;/P&gt;&lt;P&gt;Do you want to update the GM value in the DB table or internal table ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are having the last field value GM'' in the DB table then write the field in the selection criteria.&lt;/P&gt;&lt;P&gt;i.e &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;where field = 'GM'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to update the internal table then select the data from the DB table then write &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;wa-field = 'GM'.
Modify it from wa transporting field.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhukar Shetty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 07:15:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598553#M1568061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-27T07:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select into internal table with default entry for every select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598554#M1568062</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;In your internal table, try to make the value as 'GM' by default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, after selected the values from database, modify the internal table with the field value in one shot using transporting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 07:17:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598554#M1568062</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2010-12-27T07:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Select into internal table with default entry for every select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598555#M1568063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jaya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the first option you told that didnt work as all records are populated but the defalut value is not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 07:35:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598555#M1568063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-27T07:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Select into internal table with default entry for every select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598556#M1568064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srini,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont want use select ..endselect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 07:43:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598556#M1568064</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-27T07:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Select into internal table with default entry for every select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598557#M1568065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value 'GM' is not in DB table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 07:45:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598557#M1568065</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-27T07:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select into internal table with default entry for every select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598558#M1568066</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;Check my second option. I tis working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of ty,&lt;/P&gt;&lt;P&gt;        matnr type matnr,&lt;/P&gt;&lt;P&gt;        field(2) ,&lt;/P&gt;&lt;P&gt;        end of ty.&lt;/P&gt;&lt;P&gt;data : itab type standard table of ty,&lt;/P&gt;&lt;P&gt;        wa type ty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr into corresponding fields of table itab from mara up to 10 rows.&lt;/P&gt;&lt;P&gt;wa-field = 'GM'.&lt;/P&gt;&lt;P&gt;modify itab from wa transporting field where field is initial .&lt;/P&gt;&lt;P&gt;loop at itab into wa .&lt;/P&gt;&lt;P&gt;write : / wa-matnr, wa-field.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 08:11:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598558#M1568066</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2010-12-27T08:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: Select into internal table with default entry for every select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598559#M1568067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jaya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution is working fine but how about the first option if that would work my issue will be completely resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Dep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 08:53:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-into-internal-table-with-default-entry-for-every-select/m-p/7598559#M1568067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-27T08:53:34Z</dc:date>
    </item>
  </channel>
</rss>

