<?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 in VBFA Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177782#M462777</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT  it_mseg_vbfa_nf  BY vbeln posnn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF NOT  it_mseg_vbfa_nf[] IS INITIAL.&lt;/P&gt;&lt;P&gt;   select vbeln posnn vbelv posnv vbtyp_n&lt;/P&gt;&lt;P&gt;    INTO  table it_vbfa1&lt;/P&gt;&lt;P&gt;    from vbfa&lt;/P&gt;&lt;P&gt;    for all entries in it_mseg_vbfa_nf&lt;/P&gt;&lt;P&gt;    where vbeln = it_mseg_vbfa_nf-vbeln&lt;/P&gt;&lt;P&gt;    and posnn = it_mseg_vbfa_nf-posnn&lt;/P&gt;&lt;P&gt;    and vbtyp_n = 'R'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward if useful....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2007 02:54:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-24T02:54:39Z</dc:date>
    <item>
      <title>Select in VBFA Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177779#M462774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We need to improve performance in a program that uses VBFA table in three ways. How can we avoid this table or what we have to do in select statements to improve the program performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)   select vbeln posnn vbelv posnv vbtyp_n vbtyp_v&lt;/P&gt;&lt;P&gt;      into table it_vbfa1&lt;/P&gt;&lt;P&gt;      from vbfa&lt;/P&gt;&lt;P&gt;      where vbtyp_n = 'R'&lt;/P&gt;&lt;P&gt;      and   erdat in r_budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)        select vbeln posnn vbelv posnv vbtyp_n&lt;/P&gt;&lt;P&gt;          appending table it_vbfa1&lt;/P&gt;&lt;P&gt;          from vbfa&lt;/P&gt;&lt;P&gt;           for all entries in it_mseg_vbfa_nf&lt;/P&gt;&lt;P&gt;          where vbeln = it_mseg_vbfa_nf-vbeln&lt;/P&gt;&lt;P&gt;           and posnn = it_mseg_vbfa_nf-posnn&lt;/P&gt;&lt;P&gt;           and vbtyp_n = 'R'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)     select vbelv posnv vbeln posnn vbtyp_n&lt;/P&gt;&lt;P&gt;        into table it_vbfa2&lt;/P&gt;&lt;P&gt;        from vbfa&lt;/P&gt;&lt;P&gt;        for all entries in it_vbfa1&lt;/P&gt;&lt;P&gt;        where vbelv = it_vbfa1-vbelv&lt;/P&gt;&lt;P&gt;         and posnv = it_vbfa1-posnv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points will be rewarded!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michel Khouri &lt;/P&gt;&lt;P&gt;Mars, Inc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 00:44:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177779#M462774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T00:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Select in VBFA Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177780#M462775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;2) First check it_mseg_vbfa_nf[] is not initial before executing the 'Select'. This will speed up performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) What's the use of the third select?? I think copying will do the trick and save a lot of runtime -&amp;gt; it_vbfa2[] = it_vbfa1[]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 01:34:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177780#M462775</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2007-04-24T01:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Select in VBFA Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177781#M462776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what about create an index for first Open SQL? As vbfa is very big, full table scan will cost a lot of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;two and three look like no problem, but if itab is very big FOR ALL ENTRIES IN may be not a good solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;-Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 01:45:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177781#M462776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T01:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Select in VBFA Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177782#M462777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT  it_mseg_vbfa_nf  BY vbeln posnn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF NOT  it_mseg_vbfa_nf[] IS INITIAL.&lt;/P&gt;&lt;P&gt;   select vbeln posnn vbelv posnv vbtyp_n&lt;/P&gt;&lt;P&gt;    INTO  table it_vbfa1&lt;/P&gt;&lt;P&gt;    from vbfa&lt;/P&gt;&lt;P&gt;    for all entries in it_mseg_vbfa_nf&lt;/P&gt;&lt;P&gt;    where vbeln = it_mseg_vbfa_nf-vbeln&lt;/P&gt;&lt;P&gt;    and posnn = it_mseg_vbfa_nf-posnn&lt;/P&gt;&lt;P&gt;    and vbtyp_n = 'R'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to reward if useful....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 02:54:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177782#M462777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T02:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Select in VBFA Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177783#M462778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating an index for this big table will duplicate it on the database? Probably our Basis will not allow us to do this.  &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to use other tables instead of VBFA? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And how can we substitute "for all entries" option in order to optimize performance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michel Khouri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 11:53:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177783#M462778</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T11:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select in VBFA Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177784#M462779</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;Have you considered my suggestion above? Try that, I'm sure that'll improve the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, it is not possible to replace any other table with VBFA and "FOR ALL ENTRIES" syntax was developed by SAP specifically to handle performance problems resulting from database selects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 01:00:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177784#M462779</guid>
      <dc:creator>Sougata</dc:creator>
      <dc:date>2007-04-25T01:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select in VBFA Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177785#M462780</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 to use the following FM to read from VBFA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SD_VBFA_ARRAY_READ_VBELV&lt;/P&gt;&lt;P&gt;SD_VBFA_READ_WITH_VBELV&lt;/P&gt;&lt;P&gt;SD_VBFA_SELECT&lt;/P&gt;&lt;P&gt;SD_VBFA_SINGLE_READ&lt;/P&gt;&lt;P&gt;SD_VBFA_TRANSFER_TO_BUFFER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;S. Chandra Mouli.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 04:51:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177785#M462780</guid>
      <dc:creator>former_member784222</dc:creator>
      <dc:date>2007-04-25T04:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Select in VBFA Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177786#M462781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to take the delivery docs corresponding to the billing docs from table vbfa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i have given selection criteria as &lt;/P&gt;&lt;P&gt;vbfa-vbeln = BILL_DOC_NO&lt;/P&gt;&lt;P&gt;AND vbtyp_v = 'J'&lt;/P&gt;&lt;P&gt;and vbtyp_n = 'M'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code IS LIKE THIS :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_bill_list table contains the invoice nos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code 1)&lt;/P&gt;&lt;P&gt;  select distinct&lt;/P&gt;&lt;P&gt;      vbelv&lt;/P&gt;&lt;P&gt;      vbeln&lt;/P&gt;&lt;P&gt;        into table t_bill_del_data&lt;/P&gt;&lt;P&gt;        from vbfa&lt;/P&gt;&lt;P&gt;        for all entries in t_bill_list&lt;/P&gt;&lt;P&gt;        where vbeln eq t_bill_list-vbeln&lt;/P&gt;&lt;P&gt;        and   vbtyp_v = 'J'&lt;/P&gt;&lt;P&gt;        and vbtyp_n = 'M'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above query was taking time so i changed that to --&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code 2)&lt;/P&gt;&lt;P&gt;loop at t_bill_list into wa_bill_list.&lt;/P&gt;&lt;P&gt;    select single&lt;/P&gt;&lt;P&gt;          vbelv&lt;/P&gt;&lt;P&gt;          vbeln&lt;/P&gt;&lt;P&gt;            into wa_bill_del_data&lt;/P&gt;&lt;P&gt;            from vbfa&lt;/P&gt;&lt;P&gt;            where vbeln eq wa_bill_list-vbeln&lt;/P&gt;&lt;P&gt;            and   vbtyp_v = 'J'&lt;/P&gt;&lt;P&gt;            and vbtyp_n = 'M'.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      append wa_bill_del_data to t_bill_del_data.&lt;/P&gt;&lt;P&gt;      clear wa_bill_del_data.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but both the codes have poor performance.&lt;/P&gt;&lt;P&gt;Plus the index cannot be created on the table vbfa&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Madhuri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Sep 2007 09:22:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-in-vbfa-table/m-p/2177786#M462781</guid>
      <dc:creator>Madhurivs23</dc:creator>
      <dc:date>2007-09-16T09:22:02Z</dc:date>
    </item>
  </channel>
</rss>

