<?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: SQL querry in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072163#M1178330</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ankesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quite simple: MSEG has no restriction on BUDAT --&amp;gt; You get data based on the WHERE clause say 20 MBLNRs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MKPF has BUDAT restriction --&amp;gt; You get 5 MBLNRs from the 20 in IT_MSEG which fall in the date reange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you have Loop at IT_MKPF and delete from IT_MSEG. IF you use JOINS you donot have to worry about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jan 2009 07:12:29 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2009-01-22T07:12:29Z</dc:date>
    <item>
      <title>SQL querry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072157#M1178324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: please use a more informative subject in future&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want retrive data from mseg and mkpf table, base on material , customer and posting date.&lt;/P&gt;&lt;P&gt;above three fields are report input.&lt;/P&gt;&lt;P&gt;means &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;customer - abc&lt;/P&gt;&lt;P&gt;material - xyz&lt;/P&gt;&lt;P&gt;date - 10/12/2008 to 10/01/2009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;material and customer fields in mseg table .&lt;/P&gt;&lt;P&gt;posting date fields in mkpf table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; code &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;SELECT * FROM MSEG INTO CORRESPONDING FIELDS OF TABLE IT_MSEG&lt;/P&gt;&lt;P&gt;WHERE MATNR IN MAT AND KUNNR IN CUST .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM MKPF INTO CORRESPONDING FIELDS OF TABLE IT_MKPF&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN IT_MSEG&lt;/P&gt;&lt;P&gt;WHERE MBLNR = IT_MSEG-MBLNR AND BUDAT IN DATE .&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it not give between posting date record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on Jan 22, 2009 9:59 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 06:52:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072157#M1178324</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T06:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: SQL querry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072158#M1178325</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;try like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM MSEG INTO CORRESPONDING FIELDS OF TABLE IT_MSEG&lt;/P&gt;&lt;P&gt;WHERE MATNR IN MAT AND KUNNR IN CUST .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM MKPF INTO CORRESPONDING FIELDS OF TABLE IT_MKPF&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN IT_MSEG&lt;/P&gt;&lt;P&gt;WHERE MBLNR = IT_MSEG-MBLNR&lt;/P&gt;&lt;P&gt; AND BUDAT IN DATE&lt;/P&gt;&lt;P&gt;AND MJAHR = IT_MSEG-MJAHR . "Added&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 06:57:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072158#M1178325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T06:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: SQL querry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072159#M1178326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HELLO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MSEG is a cluster table and the complexity of data in mseg table is very high,so before fetching the data from mseg please make sure that you are providing full primary key details in the where clause so that only the required results are fetched.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;geeta gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 07:00:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072159#M1178326</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T07:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: SQL querry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072160#M1178327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you try this way, MSEG will have data for MBLNR not in the date range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will suggest use INNER JOINS on MKPF &amp;amp; MSEG. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: I suggest this to get consistent data &amp;amp; nothing to do with performance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 07:03:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072160#M1178327</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-01-22T07:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: SQL querry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072161#M1178328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sam,&lt;/P&gt;&lt;P&gt;I would advise you to build a range for MJAHR also from date and use it in both MSEG and MKPF.&lt;/P&gt;&lt;P&gt;Also what other erroneous BUDAT are you getting in the output..can u provide some examples...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and yes MSEG is a transparent table...&lt;/P&gt;&lt;P&gt;so i will suggest you to fetch data using a join..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT (field_list) FROM MKPF as a JOIN mseg as b ON a&lt;SUB&gt;mblnr = b&lt;/SUB&gt;mblnr and a&lt;SUB&gt;mjahr = b&lt;/SUB&gt;mjahr&lt;/P&gt;&lt;P&gt;WHERE ...all conditions...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ankesh Saharan on Jan 22, 2009 12:38 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 07:04:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072161#M1178328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T07:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: SQL querry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072162#M1178329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suhas,&lt;/P&gt;&lt;P&gt;Why in that case the restriction in WHERE clause for BUDAT IN DATE  not work??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 07:06:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072162#M1178329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T07:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: SQL querry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072163#M1178330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ankesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quite simple: MSEG has no restriction on BUDAT --&amp;gt; You get data based on the WHERE clause say 20 MBLNRs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MKPF has BUDAT restriction --&amp;gt; You get 5 MBLNRs from the 20 in IT_MSEG which fall in the date reange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you have Loop at IT_MKPF and delete from IT_MSEG. IF you use JOINS you donot have to worry about this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 07:12:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072163#M1178330</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-01-22T07:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: SQL querry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072164#M1178331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankesh and all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;problem Sloved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 07:46:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072164#M1178331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T07:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: SQL querry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072165#M1178332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Please use a more informative subject in future&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 08:59:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-querry/m-p/5072165#M1178332</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-01-22T08:59:53Z</dc:date>
    </item>
  </channel>
</rss>

