<?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 statement to get value in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-to-get-value/m-p/4346527#M1035163</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;&lt;/P&gt;&lt;P&gt;Select dmbtr from bseg into ( wa_itab-dmbtr1 ) where belnr = p_belnr and ( hkont = '700000'  or hkont = '400000' ).&lt;/P&gt;&lt;P&gt;&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;Lekha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Aug 2008 13:42:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-25T13:42:09Z</dc:date>
    <item>
      <title>select statement to get value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-to-get-value/m-p/4346526#M1035162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i need to get value field from table bseg for the same document number. &lt;/P&gt;&lt;P&gt;for the same document number, there are several line item. i just want to get :&lt;/P&gt;&lt;P&gt;where hkont = '400000'  get the value and put in wa_itab-dmbtr1.&lt;/P&gt;&lt;P&gt;where hkont = '700000' get the value. and put in wa_itab-dmbtr2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;may i know how to use the select statement to get both value?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 13:39:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-to-get-value/m-p/4346526#M1035162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-25T13:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: select statement to get value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-to-get-value/m-p/4346527#M1035163</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;&lt;/P&gt;&lt;P&gt;Select dmbtr from bseg into ( wa_itab-dmbtr1 ) where belnr = p_belnr and ( hkont = '700000'  or hkont = '400000' ).&lt;/P&gt;&lt;P&gt;&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;Lekha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 13:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-to-get-value/m-p/4346527#M1035163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-25T13:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: select statement to get value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-to-get-value/m-p/4346528#M1035164</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;where hkont = '400000' get the value and put in wa_itab-dmbtr1.&lt;/P&gt;&lt;P&gt;where hkont = '700000' get the value. and put in wa_itab-dmbtr2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
         Select 
             field1
             field2
             from &amp;lt;tablename&amp;gt;
             into ( w_temp)
             where HKONT eq '400000' OR HKONT EQ '700000'.
    if HKONT EQ '400000' .
          wa_itab-dmbtr1 = w_temp.   
   elseif HKONT EQ '700000' 
      
    wa_itab-dmbt2 = w_temp.
  endif.
  endselect.
   " You need to use OR and one temporary variable &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 13:42:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-to-get-value/m-p/4346528#M1035164</guid>
      <dc:creator>bpawanchand</dc:creator>
      <dc:date>2008-08-25T13:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: select statement to get value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-to-get-value/m-p/4346529#M1035165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM bseg&lt;/P&gt;&lt;P&gt;       INTO TABLE it_tab&lt;/P&gt;&lt;P&gt;       WHERE  hkont  IN (''400000' ,'700000' ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then pass it to the work area..........&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;Anbu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 13:46:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-to-get-value/m-p/4346529#M1035165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-25T13:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: select statement to get value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-to-get-value/m-p/4346530#M1035166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using select........endselect, try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT hkont
       dmbtr
  FROM bseg
  INTO (w_hkont,
        w_dmbtr)
 WHERE hkont IN ('400000','700000').

  IF w_hkont EQ '400000'.

    wa_itab-dmbtr1 = w_dmbtr.

  ELSEIF w_hkont EQ '700000'.

    wa_itab-dmbtr2 = '700000'.

  ENDIF.

ENDSELECT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 13:51:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement-to-get-value/m-p/4346530#M1035166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-25T13:51:50Z</dc:date>
    </item>
  </channel>
</rss>

