<?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 Stmts for sales order. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-stmts-for-sales-order/m-p/858157#M47511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Syed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The details that you wish to obtain are not all stored in the same table. You will have to go to three different tables - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBAK - Sales Order Header&lt;/P&gt;&lt;P&gt;VBAP - Sales Order Item Details&lt;/P&gt;&lt;P&gt;VBEP - Schedule Line Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 May 2005 04:04:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-05-06T04:04:48Z</dc:date>
    <item>
      <title>SQL Stmts for sales order.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-stmts-for-sales-order/m-p/858156#M47510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, How do I select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sales order no,&lt;/P&gt;&lt;P&gt;stock loc,&lt;/P&gt;&lt;P&gt;promised date, &lt;/P&gt;&lt;P&gt;requested date,&lt;/P&gt;&lt;P&gt;date entered,&lt;/P&gt;&lt;P&gt;Customer number,&lt;/P&gt;&lt;P&gt;Line No,&lt;/P&gt;&lt;P&gt;Material,&lt;/P&gt;&lt;P&gt;order Qty,&lt;/P&gt;&lt;P&gt;Shipped Qty,&lt;/P&gt;&lt;P&gt;Bin location.&lt;/P&gt;&lt;P&gt;for the sales order report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have problem with the dates, in the schedule line level.&lt;/P&gt;&lt;P&gt;How can they be captured regardingly. Order quantity is also not been captured, into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ajju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2005 03:54:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-stmts-for-sales-order/m-p/858156#M47510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-06T03:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Stmts for sales order.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-stmts-for-sales-order/m-p/858157#M47511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Syed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The details that you wish to obtain are not all stored in the same table. You will have to go to three different tables - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBAK - Sales Order Header&lt;/P&gt;&lt;P&gt;VBAP - Sales Order Item Details&lt;/P&gt;&lt;P&gt;VBEP - Schedule Line Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2005 04:04:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-stmts-for-sales-order/m-p/858157#M47511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-06T04:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Stmts for sales order.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-stmts-for-sales-order/m-p/858158#M47512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to know, how to join all the fields together.&lt;/P&gt;&lt;P&gt; can it be done with nested select statements or individual select statements. and how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope U could provide some more light on it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ajju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2005 04:26:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-stmts-for-sales-order/m-p/858158#M47512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-06T04:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Stmts for sales order.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-stmts-for-sales-order/m-p/858159#M47513</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 suggest you to retrive records(required fields) from VBAK first.&lt;/P&gt;&lt;P&gt;Then use for all entries(I_VBAK) to retrive records(required fields) from VBAP .&lt;/P&gt;&lt;P&gt;Then use for all entries for the second itab i_VBAP to fetch records from VBEP.&lt;/P&gt;&lt;P&gt;Then combine the internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select fields from VBAK into table I_VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select fields from VBAP into table I_VBAP for all entries in I_VBAK where vbeln = I_VBAK-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select fields from VBEP into table I_VBEK for all &lt;/P&gt;&lt;P&gt;entries in I_VBAP where vbeln = I_VBAP-vbeln&lt;/P&gt;&lt;P&gt;                    and posnr = I_VBAP-posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at I_VBAK."Assumed that table with header line&lt;/P&gt;&lt;P&gt;   I_OUTPUT-field1 = I_VBAK-field1.&lt;/P&gt;&lt;P&gt;   ...&lt;/P&gt;&lt;P&gt;   Loop at I_VBAP where vbeln = I_VBAK-vbeln.&lt;/P&gt;&lt;P&gt;    I_OUTPUT-field2 = I_VBAK-field2.&lt;/P&gt;&lt;P&gt;    ...&lt;/P&gt;&lt;P&gt;    Loop at I_VBEP where vbeln = I_VBAP-vbeln&lt;/P&gt;&lt;P&gt;                     and posnr = I_VBAP-posnr.&lt;/P&gt;&lt;P&gt;     I_OUTPUT-field3 = I_VBAK-field3.&lt;/P&gt;&lt;P&gt;     append I_OUTPUT.&lt;/P&gt;&lt;P&gt;    Endloop.&lt;/P&gt;&lt;P&gt;   Endloop.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.If not , get back to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;J.Jayanthi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2005 05:49:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-stmts-for-sales-order/m-p/858159#M47513</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-05-06T05:49:46Z</dc:date>
    </item>
  </channel>
</rss>

