<?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 Selection from maintenance view in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-maintenance-view/m-p/3261932#M779397</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 have created and activated a maintenance view from tables EKPO and EKKO. I needed an outer join so I had to use maintenance view instead of datbase view. When I see the data in the view using SE11 it works fine. However, when I try to select some fields from it using code it gives me an error message.&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;REPORT Z_TEST_REP.&lt;/P&gt;&lt;P&gt;TABLES: Z_MAINTVIEW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM Z_MAINTVIEW.&lt;/P&gt;&lt;P&gt;WRITE: / Z_MAINTVIEW-MYFIELD1.&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;When activating, this gives me the error message: "Z_MAINTVIEW" is not defined in the ABAP Dictionary as a table, projection view or database view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this mean that it is not possible to select single fields from a maintenance view using the select statement? Is there any way I can do this? Any help is appreciated. Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Khan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Jan 2008 10:42:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-01T10:42:28Z</dc:date>
    <item>
      <title>Selection from maintenance view</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-maintenance-view/m-p/3261932#M779397</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 have created and activated a maintenance view from tables EKPO and EKKO. I needed an outer join so I had to use maintenance view instead of datbase view. When I see the data in the view using SE11 it works fine. However, when I try to select some fields from it using code it gives me an error message.&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;REPORT Z_TEST_REP.&lt;/P&gt;&lt;P&gt;TABLES: Z_MAINTVIEW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM Z_MAINTVIEW.&lt;/P&gt;&lt;P&gt;WRITE: / Z_MAINTVIEW-MYFIELD1.&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;When activating, this gives me the error message: "Z_MAINTVIEW" is not defined in the ABAP Dictionary as a table, projection view or database view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this mean that it is not possible to select single fields from a maintenance view using the select statement? Is there any way I can do this? Any help is appreciated. Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Khan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jan 2008 10:42:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-maintenance-view/m-p/3261932#M779397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-01T10:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Selection from maintenance view</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-maintenance-view/m-p/3261933#M779398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;views doesn' t contain any data so use a transperent table to get the data. &lt;/P&gt;&lt;P&gt;please don't write these codes it will only confuse you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jan 2008 11:11:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-maintenance-view/m-p/3261933#M779398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-01T11:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Selection from maintenance view</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-maintenance-view/m-p/3261934#M779399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Khan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a maintenance view is thought dor data maintenance (insert, update, delete). You will never do that with EKKO/EKPO data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why create a view, you can select from ekpo &lt;STRONG&gt;INNER&lt;/STRONG&gt; join ekpo because EKPO records can not exists without EKKO records. And EKKO without EKPO does not make any sense at all. Re-Think your idea about outer join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jan 2008 13:53:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-maintenance-view/m-p/3261934#M779399</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2008-01-01T13:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Selection from maintenance view</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-maintenance-view/m-p/3261935#M779400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Clemens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer. The thing is, I am trying to achieve a join based on EBELN. Now the way the data is stored in the tables is that for every value of EBELN in EKKO, multiple rows exist in EKPO with the same value for EBELN. I need all those entries, hence the need for an outer join. I was able to do what I wanted by putting the product of the outer join into an itab, but coding standards at my workplace require that views be implemented wherever possible. So I was experimenting with maintenance joins, having never used them before. Being new to SAP, I must admit that I also wanted to try it simply for the sake of increasing my knowledge on the subject. If you know of any resources on ABAP tricks and workarounds on standard constraints, I'd love to hear about them. Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Khan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jan 2008 15:26:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-maintenance-view/m-p/3261935#M779400</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-01T15:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Selection from maintenance view</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-maintenance-view/m-p/3261936#M779401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Khan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is in the nature of EKKO (header) and EKPO (items) that you have 1 to n records (ittems) in EKPO with the same EBELN (purchase order document number). They all have different EBELP (item number values).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just tried: You can create a database view with tables EKKO and EKPO with join condition EKKO-EBELN = EKPO-EBELN. In the view you also need EKKO-MANDT = EKPO-MANDT to make sure you stay in your client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the view fields, put all fields you want and/or need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can select from this view; works great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative: Use BAPI_PO_GETDETAIL to get all the header and item data you need. This is 100 % compliant with standard and (as I am convinced) with any programming guidelines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; - OK as I don't know the business scenario, it might be lesss than most appropriate...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jan 2008 16:34:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-maintenance-view/m-p/3261936#M779401</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2008-01-01T16:34:46Z</dc:date>
    </item>
  </channel>
</rss>

