<?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 select statement question... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364492#M180501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get records from table anlc that is not deactivated so I joined it with table anla because that is where the field deakt is located. I need to get records where its deakt is initial but how can I declare it to my select statement since the word INITIAL cannot be included in a select statement. So here's what I did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, is the word NULL the same as initial?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE a&lt;SUB&gt;bukrs a&lt;/SUB&gt;anln1 a&lt;SUB&gt;gjahr a&lt;/SUB&gt;afabe a~knafa&lt;/P&gt;&lt;P&gt;                          a&lt;SUB&gt;kansw a&lt;/SUB&gt;answl a&lt;SUB&gt;kaafa a&lt;/SUB&gt;nafal&lt;/P&gt;&lt;P&gt;                          a&lt;SUB&gt;aafav a&lt;/SUB&gt;aafag&lt;/P&gt;&lt;P&gt;                          nafap aafap nafav nafag&lt;/P&gt;&lt;P&gt;                          FROM anlc as a&lt;/P&gt;&lt;P&gt;                          inner join anla as b&lt;/P&gt;&lt;P&gt;                          on a&lt;SUB&gt;anln1 = b&lt;/SUB&gt;anln1&lt;/P&gt;&lt;P&gt;                      INTO (it_anlc-bukrs, it_anlc-anln1, it_anlc-gjahr,&lt;/P&gt;&lt;P&gt;                            it_anlc-afabe, it_anlc-knafa, it_anlc-kansw,&lt;/P&gt;&lt;P&gt;                           it_anlc-answl, it_anlc-kaafa, it_anlc-nafal,&lt;/P&gt;&lt;P&gt;                           it_anlc-aafav, it_anlc-aafag, it_anlc-nafap,&lt;/P&gt;&lt;P&gt;                           it_anlc-aafap, it_anlc-nafav, it_anlc-nafag)&lt;/P&gt;&lt;P&gt;                        WHERE a~anln1 EQ it_finaltab-asset&lt;/P&gt;&lt;P&gt;                          AND a~bukrs IN r_iwerk&lt;/P&gt;&lt;P&gt;                          AND a~gjahr EQ gv_year&lt;/P&gt;&lt;P&gt;                          AND a~afabe EQ '01'&lt;/P&gt;&lt;P&gt;                          and b~deakt is null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 May 2006 10:21:37 GMT</pubDate>
    <dc:creator>aris_hidalgo</dc:creator>
    <dc:date>2006-05-19T10:21:37Z</dc:date>
    <item>
      <title>select statement question...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364492#M180501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get records from table anlc that is not deactivated so I joined it with table anla because that is where the field deakt is located. I need to get records where its deakt is initial but how can I declare it to my select statement since the word INITIAL cannot be included in a select statement. So here's what I did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, is the word NULL the same as initial?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE a&lt;SUB&gt;bukrs a&lt;/SUB&gt;anln1 a&lt;SUB&gt;gjahr a&lt;/SUB&gt;afabe a~knafa&lt;/P&gt;&lt;P&gt;                          a&lt;SUB&gt;kansw a&lt;/SUB&gt;answl a&lt;SUB&gt;kaafa a&lt;/SUB&gt;nafal&lt;/P&gt;&lt;P&gt;                          a&lt;SUB&gt;aafav a&lt;/SUB&gt;aafag&lt;/P&gt;&lt;P&gt;                          nafap aafap nafav nafag&lt;/P&gt;&lt;P&gt;                          FROM anlc as a&lt;/P&gt;&lt;P&gt;                          inner join anla as b&lt;/P&gt;&lt;P&gt;                          on a&lt;SUB&gt;anln1 = b&lt;/SUB&gt;anln1&lt;/P&gt;&lt;P&gt;                      INTO (it_anlc-bukrs, it_anlc-anln1, it_anlc-gjahr,&lt;/P&gt;&lt;P&gt;                            it_anlc-afabe, it_anlc-knafa, it_anlc-kansw,&lt;/P&gt;&lt;P&gt;                           it_anlc-answl, it_anlc-kaafa, it_anlc-nafal,&lt;/P&gt;&lt;P&gt;                           it_anlc-aafav, it_anlc-aafag, it_anlc-nafap,&lt;/P&gt;&lt;P&gt;                           it_anlc-aafap, it_anlc-nafav, it_anlc-nafag)&lt;/P&gt;&lt;P&gt;                        WHERE a~anln1 EQ it_finaltab-asset&lt;/P&gt;&lt;P&gt;                          AND a~bukrs IN r_iwerk&lt;/P&gt;&lt;P&gt;                          AND a~gjahr EQ gv_year&lt;/P&gt;&lt;P&gt;                          AND a~afabe EQ '01'&lt;/P&gt;&lt;P&gt;                          and b~deakt is null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 10:21:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364492#M180501</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-05-19T10:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: select statement question...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364493#M180502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;b~deakt EQ space.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Reward points and close the thread.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 10:24:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364493#M180502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T10:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: select statement question...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364494#M180503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure on this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NULL --&amp;gt;space&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIAL --&amp;gt; can be 0 or space&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 10:25:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364494#M180503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T10:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: select statement question...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364495#M180504</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;I noticed that its initial value is 00/00/0000. will space work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 10:25:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364495#M180504</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-05-19T10:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: select statement question...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364496#M180505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Viray,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         Use &amp;lt;b&amp;gt;b~deakt &amp;lt;&amp;gt;  '00000000'&amp;lt;/b&amp;gt; as in your select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 10:25:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364496#M180505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T10:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: select statement question...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364497#M180506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would rather suggest you to :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE a&lt;SUB&gt;bukrs a&lt;/SUB&gt;anln1 a&lt;SUB&gt;gjahr a&lt;/SUB&gt;afabe a~knafa&lt;/P&gt;&lt;P&gt;a&lt;SUB&gt;kansw a&lt;/SUB&gt;answl a&lt;SUB&gt;kaafa a&lt;/SUB&gt;nafal&lt;/P&gt;&lt;P&gt;a&lt;SUB&gt;aafav a&lt;/SUB&gt;aafag&lt;/P&gt;&lt;P&gt;nafap aafap nafav nafag&lt;/P&gt;&lt;P&gt;FROM anlc as a&lt;/P&gt;&lt;P&gt;inner join anla as b&lt;/P&gt;&lt;P&gt;on a&lt;SUB&gt;anln1 = b&lt;/SUB&gt;anln1&lt;/P&gt;&lt;P&gt;INTO (it_anlc-bukrs, it_anlc-anln1, it_anlc-gjahr,&lt;/P&gt;&lt;P&gt;it_anlc-afabe, it_anlc-knafa, it_anlc-kansw,&lt;/P&gt;&lt;P&gt;it_anlc-answl, it_anlc-kaafa, it_anlc-nafal,&lt;/P&gt;&lt;P&gt;it_anlc-aafav, it_anlc-aafag, it_anlc-nafap,&lt;/P&gt;&lt;P&gt;it_anlc-aafap, it_anlc-nafav, it_anlc-nafag)&lt;/P&gt;&lt;P&gt;WHERE a~anln1 EQ it_finaltab-asset&lt;/P&gt;&lt;P&gt;AND a~bukrs IN r_iwerk&lt;/P&gt;&lt;P&gt;AND a~gjahr EQ gv_year&lt;/P&gt;&lt;P&gt;AND a~afabe EQ '01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete it_anlc where deakt is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IS NULL, IS NOT NULL is going to cost a lot in terms of database usage. Better to delete the entries from internal table after the select is done.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 10:27:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364497#M180506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T10:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: select statement question...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364498#M180507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Use b~deakt EQ lv_deakt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data type of lv_deakt should besame has b~deakt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whenever u declare the variable of any type.&lt;/P&gt;&lt;P&gt;ABAP automatically gives its initial value to the field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when &lt;/P&gt;&lt;P&gt;    lv_date type dats,&lt;/P&gt;&lt;P&gt;    lv_time type tims.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LV_date-----&amp;gt;'00000000'&lt;/P&gt;&lt;P&gt;lv_time-----&amp;gt;'000000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dont worry it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 10:54:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364498#M180507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T10:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: select statement question...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364499#M180508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi viraylab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can try this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select anln1 from anla into table it_anln1&lt;/P&gt;&lt;P&gt;where deakt = '00000000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bukrs anln1 gjahr afabe knafa kansw answl kaafa nafal aafav aafag nafap aafap nafav nafag from anlc into table it_anlc for all entries in it_anln1 where anln1 = it_anla-anln1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also for all entries is better performance wise than innerjoins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award points if helpful.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;keerthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 10:57:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-question/m-p/1364499#M180508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T10:57:14Z</dc:date>
    </item>
  </channel>
</rss>

