<?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 Stmt in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614146#M275186</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Sep 2006 21:37:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-22T21:37:19Z</dc:date>
    <item>
      <title>Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614133#M275173</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;The data I am getting for Rate field from flat file for my sales order BDC is not correct. So I have to get the Rate based on material number on condition type PR00. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is condition type PR00 and how to write select stmt on this. The Rate field I want to get from material num RV45A-MABNR is KOMV-KBETR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 16:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614133#M275173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T16:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614134#M275174</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;  If you want to get the sales order conditions..use the following method..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  VBAK-KNUMV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Use the KNUMV in the table KONV with the condition type = 'PR00' and then get the rate in the field KBETR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  If you want to get the condition rate from the condition tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ask your function consultant to get the table name..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 17:00:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614134#M275174</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T17:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614135#M275175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would assume that this code would give you want you need.   Check the ikomv internal table after the function call.  You will see the conditions there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


report zrich_0002 .

data: l_vbak type vbak.
data: l_komk type komk.
data: l_komp type komp.
data: ikomv type table of komv.
data: ikomvd type table of komvd.

parameters: p_vbeln type vbak-vbeln.

select single * from vbak
             into l_vbak
                       where vbeln = p_vbeln.
check sy-subrc = 0.

l_komk-belnr = l_vbak-vbeln.
l_komk-kappl = 'V'.
l_komk-knumv = l_vbak-knumv.

call function 'RV_PRICE_PRINT_REFRESH'
     tables
          tkomv = ikomv.

call function 'RV_PRICE_PRINT_ITEM'
     exporting
          comm_head_i = l_komk
          comm_item_i = l_komp
          language    = sy-langu
     tables
          tkomv       = ikomv
          tkomvd      = ikomvd.
check sy-subrc = 0.

&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 17:00:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614135#M275175</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-09-22T17:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614136#M275176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naren&amp;amp; Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thankyou. But I need to get price based on Material Number RV45A-MABNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 17:11:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614136#M275176</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T17:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614137#M275177</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;  The material number will be available in the sales order line item table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  VBAP-MATNR..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 17:12:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614137#M275177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T17:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614138#M275178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take this program for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


report zrich_0002 .

data: l_vbak type vbak.
data: l_vbap type vbap.
data: l_komk type komk.
data: l_komp type komp.
data: ikomv type table of komv.
data: xkomv type komv.
data: ikomvd type table of komvd.

parameters: p_vbeln type vbak-vbeln.
parameters: p_matnr type vbap-matnr.

select single * from vbak
             into l_vbak
                       where vbeln = p_vbeln.

select single * from vbap
             into l_vbap
                       where vbeln = p_vbeln
                         and matnr = p_matnr.

check sy-subrc = 0.

l_komk-belnr = l_vbak-vbeln.
l_komk-kappl = 'V'.
l_komk-knumv = l_vbak-knumv.

call function 'RV_PRICE_PRINT_REFRESH'
     tables
          tkomv = ikomv.

call function 'RV_PRICE_PRINT_ITEM'
     exporting
          comm_head_i = l_komk
          comm_item_i = l_komp
          language    = sy-langu
     tables
          tkomv       = ikomv
          tkomvd      = ikomvd.

* I believe that the POSNR is related to the KPOSN
* in the IKOMV table
loop at ikomv into xkomv where kposn = l_vbap-posnr.
  write:/ xkomv.
endloop.

&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 17:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614138#M275178</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-09-22T17:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614139#M275179</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;Is the BDC for sales order change?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get PR00 condition rate values from KONv table using VBAK-KNUMV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;ramakrishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 18:04:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614139#M275179</guid>
      <dc:creator>venkata_ramisetti</dc:creator>
      <dc:date>2006-09-22T18:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614140#M275180</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 came up with this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: Begin of it_output occurs 0,     &lt;/P&gt;&lt;P&gt;      kbetr like komv-kbetr,      &lt;/P&gt;&lt;P&gt;End of it_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select komv~kbetr from komv&lt;/P&gt;&lt;P&gt;into it_output&lt;/P&gt;&lt;P&gt;from komv&lt;/P&gt;&lt;P&gt;inner join vbak on vbak&lt;SUB&gt;knumv = komv&lt;/SUB&gt;knumv&lt;/P&gt;&lt;P&gt;inner join vbap on vbak&lt;SUB&gt;vbeln = vbap&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;where komv~kschl = 'PR00'&lt;/P&gt;&lt;P&gt;and vbap~matnr = lv_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you think this will work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 18:24:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614140#M275180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T18:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614141#M275181</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;change lik this.&lt;/P&gt;&lt;P&gt;Data: Begin of it_output occurs 0, &lt;/P&gt;&lt;P&gt;kbetr like komv-kbetr, &lt;/P&gt;&lt;P&gt;End of it_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select komv~kbetr&lt;/P&gt;&lt;P&gt;into table it_output&lt;/P&gt;&lt;P&gt;from komv&lt;/P&gt;&lt;P&gt;inner join vbak &lt;/P&gt;&lt;P&gt;on vbak&lt;SUB&gt;knumv = komv&lt;/SUB&gt;knumv&lt;/P&gt;&lt;P&gt;inner join vbap &lt;/P&gt;&lt;P&gt;on vbak&lt;SUB&gt;vbeln = vbap&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where komv~kschl = 'PR00'&lt;/P&gt;&lt;P&gt;and vbap~matnr = lv_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 18:30:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614141#M275181</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-09-22T18:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614142#M275182</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 gave the query and it is giving me syntax error saying '"KOMV" is not defined in the ABAP Dictionary as a table, projection view or database view.' because KOMV is a structure not a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should I do now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 20:36:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614142#M275182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T20:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614143#M275183</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;  The table KONV instead of KOMV..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 20:43:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614143#M275183</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T20:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614144#M275184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I am getting this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot use comparisons with column references in pool and cluster tables: "KONV~KNUMV".		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select konv~kbetr&lt;/P&gt;&lt;P&gt;    into table it_output&lt;/P&gt;&lt;P&gt;    from konv&lt;/P&gt;&lt;P&gt;    inner join vbak&lt;/P&gt;&lt;P&gt;    on vbak&lt;SUB&gt;knumv = konv&lt;/SUB&gt;knumv&lt;/P&gt;&lt;P&gt;    inner join vbap&lt;/P&gt;&lt;P&gt;    on vbak&lt;SUB&gt;vbeln = vbap&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;    where konv~kschl = 'PR00'&lt;/P&gt;&lt;P&gt;    and vbap~matnr = gs_sdata-mabnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Veni.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 20:50:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614144#M275184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T20:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614145#M275185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes..KONV is a cluster table..You cannot do join on cluster tables..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to split SQLs into two..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one with VBAK and VBAP..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then do a FOR ALL ENTRIES IN with the internal table got from the table VBAK &amp;amp; VBAP to get the values from KONV..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 20:54:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614145#M275185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T20:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Select Stmt</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614146#M275186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 21:37:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-stmt/m-p/1614146#M275186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T21:37:19Z</dc:date>
    </item>
  </channel>
</rss>

