<?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: How to Retriev data from database view through select statement? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954542#M1489147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See these&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARIX_BKPF                      FI_DOCUMNT: Header-Oriented Document Index&lt;/P&gt;&lt;P&gt;BKPF                           Accounting Document Header&lt;/P&gt;&lt;P&gt;BKPF_ADD                       Accounting Document Header&lt;/P&gt;&lt;P&gt;EBKPF                          Fin.Accntng Doc.Header (of Docs from Exter&lt;/P&gt;&lt;P&gt;LRBKPF                         Documents as Result of Logical Document Re&lt;/P&gt;&lt;P&gt;TXW_S_BKPF                     Retrieve BKPF from archive&lt;/P&gt;&lt;P&gt;VBKPF                          Document Header for Document Parking&lt;/P&gt;&lt;P&gt;VIAKBKPF                       Document Header from Service Charge Settle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBSEGA                         Document Segment for Document Parking - As&lt;/P&gt;&lt;P&gt;VBSEGD                         Document Segment for Customer Document Par&lt;/P&gt;&lt;P&gt;VBSEGK                         Document Segment for Vendor Document Parki&lt;/P&gt;&lt;P&gt;VBSEGS                         Document Segment for Document Parking - G/&lt;/P&gt;&lt;P&gt;VIAKBSEG                       Document Line Item from SCS for Interface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Uma Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jun 2010 08:28:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-23T08:28:22Z</dc:date>
    <item>
      <title>How to Retriev data from database view through select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954536#M1489141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need code to Retrieve data from database view through select statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zfi_v1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : bkpf,bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty_vbsegs,&lt;/P&gt;&lt;P&gt;        belnr TYPE belnr_d,&lt;/P&gt;&lt;P&gt;        gjahr TYPE gjahr,&lt;/P&gt;&lt;P&gt;        bukrs TYPE bukrs,&lt;/P&gt;&lt;P&gt;        buzei TYPE buzei,&lt;/P&gt;&lt;P&gt;        bschl TYPE bschl,&lt;/P&gt;&lt;P&gt;        mwskz TYPE mwskz,&lt;/P&gt;&lt;P&gt;        wrbtr TYPE wrbtr,&lt;/P&gt;&lt;P&gt;        sgtxt TYPE sgtxt,&lt;/P&gt;&lt;P&gt;        saknr TYPE saknr,&lt;/P&gt;&lt;P&gt;        blart TYPE blart,&lt;/P&gt;&lt;P&gt;        budat TYPE budat,&lt;/P&gt;&lt;P&gt;        xblnr TYPE xblnr1,&lt;/P&gt;&lt;P&gt;        END OF ty_vbsegs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : it_vbsegs TYPE TABLE OF ty_vbsegs,&lt;/P&gt;&lt;P&gt;       wa_vbsegs TYPE ty_vbsegs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;PARAMETERS : p_bukrs TYPE bseg-bukrs.&lt;/P&gt;&lt;P&gt;PARAMETERS : p_hkont TYPE bseg-hkont.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : s_budat FOR bkpf-budat OBLIGATORY.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN : END OF BLOCK b1  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  BREAK-POINT.&lt;/P&gt;&lt;P&gt;  SELECT belnr&lt;/P&gt;&lt;P&gt;         gjahr&lt;/P&gt;&lt;P&gt;         bukrs&lt;/P&gt;&lt;P&gt;         buzei&lt;/P&gt;&lt;P&gt;         bschl&lt;/P&gt;&lt;P&gt;         mwskz&lt;/P&gt;&lt;P&gt;         wrbtr&lt;/P&gt;&lt;P&gt;         sgtxt&lt;/P&gt;&lt;P&gt;         saknr&lt;/P&gt;&lt;P&gt;         blart&lt;/P&gt;&lt;P&gt;         budat&lt;/P&gt;&lt;P&gt;         xblnr&lt;/P&gt;&lt;P&gt;         FROM v_vbsegs&lt;/P&gt;&lt;P&gt;         INTO TABLE it_vbsegs&lt;/P&gt;&lt;P&gt;         WHERE bukrs = p_bukrs&lt;/P&gt;&lt;P&gt;           AND saknr = p_hkont&lt;/P&gt;&lt;P&gt;           AND budat IN s_budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_vbsegs INTO wa_vbsegs.&lt;/P&gt;&lt;P&gt;    WRITE:/ wa_vbsegs-belnr,&lt;/P&gt;&lt;P&gt;            wa_vbsegs-gjahr,&lt;/P&gt;&lt;P&gt;            wa_vbsegs-bukrs,&lt;/P&gt;&lt;P&gt;            wa_vbsegs-buzei,&lt;/P&gt;&lt;P&gt;            wa_vbsegs-bschl,&lt;/P&gt;&lt;P&gt;            wa_vbsegs-mwskz,&lt;/P&gt;&lt;P&gt;            wa_vbsegs-wrbtr,&lt;/P&gt;&lt;P&gt;            wa_vbsegs-sgtxt,&lt;/P&gt;&lt;P&gt;            wa_vbsegs-saknr,&lt;/P&gt;&lt;P&gt;            wa_vbsegs-blart,&lt;/P&gt;&lt;P&gt;            wa_vbsegs-budat,&lt;/P&gt;&lt;P&gt;            wa_vbsegs-xblnr.&lt;/P&gt;&lt;P&gt;    CLEAR : wa_vbsegs.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At run time we are not getting data into the internal table( created on database view)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 07:31:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954536#M1489141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T07:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retriev data from database view through select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954537#M1489142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check if the data exists in the view for the WHERE condition you have mentioned.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 07:38:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954537#M1489142</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-06-21T07:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retriev data from database view through select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954538#M1489143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;You can treat the dat base view as table only. So the way we retrieve datya from tables using select query , same way you can retrieve data from data bsea view. Just see whether ther data ixists with tye conditions you have mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Uma Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jun 2010 08:16:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954538#M1489143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-21T08:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retriev data from database view through select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954539#M1489144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u plz suggest some standard  database views for bseg and bkpf?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jun 2010 07:45:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954539#M1489144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-23T07:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retriev data from database view through select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954540#M1489145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check via SE11, v_vbsegs is not a database view on BKPF and BSEG (but only refers to Document Parking). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BSEG is a cluster table (it does not exist on the database as a separate table, but is a part of table RFBLG), so it is not possible to create a database view. As BSEG is a cluster table, SELECT can only be optimized when specifying some of the actual database key (RFBLG : MANDT, BUKRS, BELNR, GJAHR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try to use one of the "secondary indexes" maintained by SAP&lt;/P&gt;&lt;P&gt;- BSAD Accounting: Secondary Index for Customers (Cleared Items)   &lt;/P&gt;&lt;P&gt;- BSAK Accounting: Secondary Index for Vendors (Cleared Items)     &lt;/P&gt;&lt;P&gt;- BSAS Accounting: Secondary Index for G/L Accounts (Cleared Items)&lt;/P&gt;&lt;P&gt;- BSID Accounting: Secondary Index for Customers                   &lt;/P&gt;&lt;P&gt;- BSIK Accounting: Secondary Index for Vendors                     &lt;/P&gt;&lt;P&gt;- BSIM Secondary Index, Documents for Material                     &lt;/P&gt;&lt;P&gt;- BSIP Index for Vendor Validation of Double Documents             &lt;/P&gt;&lt;P&gt;- BSIS Accounting: Secondary Index for G/L Accounts           &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jun 2010 07:54:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954540#M1489145</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2010-06-23T07:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retriev data from database view through select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954541#M1489146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While retrieving data from Bseg its taking time to gte data from bseg can u suggest another table instead of BSEG?&lt;/P&gt;&lt;P&gt;While using this select statement for bseg we are getting performance issue can u suggest anyway to improve performance?&lt;/P&gt;&lt;P&gt; SELECT bukrs  "Company Code&lt;/P&gt;&lt;P&gt;         belnr  "Accounting Document Number&lt;/P&gt;&lt;P&gt;         gjahr  "Fiscal Year&lt;/P&gt;&lt;P&gt;         buzei  "Number of Line Item Within Accounting Document&lt;/P&gt;&lt;P&gt;         bschl  "Posting Key&lt;/P&gt;&lt;P&gt;         mwskz  "Sales Tax Code&lt;/P&gt;&lt;P&gt;         wrbtr  "Amount in document currency&lt;/P&gt;&lt;P&gt;         sgtxt  "Item Text&lt;/P&gt;&lt;P&gt;         hkont  "General Ledger Account&lt;/P&gt;&lt;P&gt;         lifnr  "Account Number of Vendor or Creditor&lt;/P&gt;&lt;P&gt;         FROM bseg  "Document Segment for Document Parking - G/L Account Database&lt;/P&gt;&lt;P&gt;         INTO  TABLE it_bseg_1&lt;/P&gt;&lt;P&gt;         WHERE bukrs = p_bukrs&lt;/P&gt;&lt;P&gt;         AND hkont = p_hkont.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jun 2010 08:15:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954541#M1489146</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-23T08:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retriev data from database view through select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954542#M1489147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See these&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARIX_BKPF                      FI_DOCUMNT: Header-Oriented Document Index&lt;/P&gt;&lt;P&gt;BKPF                           Accounting Document Header&lt;/P&gt;&lt;P&gt;BKPF_ADD                       Accounting Document Header&lt;/P&gt;&lt;P&gt;EBKPF                          Fin.Accntng Doc.Header (of Docs from Exter&lt;/P&gt;&lt;P&gt;LRBKPF                         Documents as Result of Logical Document Re&lt;/P&gt;&lt;P&gt;TXW_S_BKPF                     Retrieve BKPF from archive&lt;/P&gt;&lt;P&gt;VBKPF                          Document Header for Document Parking&lt;/P&gt;&lt;P&gt;VIAKBKPF                       Document Header from Service Charge Settle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBSEGA                         Document Segment for Document Parking - As&lt;/P&gt;&lt;P&gt;VBSEGD                         Document Segment for Customer Document Par&lt;/P&gt;&lt;P&gt;VBSEGK                         Document Segment for Vendor Document Parki&lt;/P&gt;&lt;P&gt;VBSEGS                         Document Segment for Document Parking - G/&lt;/P&gt;&lt;P&gt;VIAKBSEG                       Document Line Item from SCS for Interface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Uma Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jun 2010 08:28:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954542#M1489147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-23T08:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retriev data from database view through select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954543#M1489148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to firsy select data from tables BSIS and BSAS as your criteria is General ledger account (only BSIS if account is not clearable)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If some fields are missing, you can then SELECT from BSEG with the full key (BUKRS, BELNR GJAHR and BUZEI) in a SELECT FOR ALL ENTRIES &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jun 2010 13:57:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954543#M1489148</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2010-06-23T13:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retriev data from database view through select statement?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954544#M1489149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Please search before asking - post locked

Rob&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jun 2010 17:50:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-retriev-data-from-database-view-through-select-statement/m-p/6954544#M1489149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-23T17:50:09Z</dc:date>
    </item>
  </channel>
</rss>

