<?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: Selection from VBFA table takes a long time in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174082#M1908454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Virginia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not recommended to do query on VBFA on the subsequent doc. For that normal Item tables are sufficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure your process flow here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am guessing : Original Invoice -&amp;gt;Return Order-&amp;gt;Return-&amp;gt;Return Delivery-&amp;gt;Credit Note: Returns?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get AUBEL AUPOS from VBRP for Credit Note(VBRP-VBELN). VBRP-AUBEL will be your Return Order,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Query VBAP by passing VBELN = VBRP-AUBEL and POSNR = VBRP-AUPOS and get VGBEL .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBAP-VGBEL will be your Original Billing Doc provided the Return Order was created with reference to the Original Billing Doc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this way you will ensure you hit the Primary Index key all the time which will definitely be faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try FM SD_DOCUMENT_FLOW_GET. I never used it but by seeing the code it is trying from VBFA. So may not be good in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jul 2015 13:26:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-07-16T13:26:54Z</dc:date>
    <item>
      <title>Selection from VBFA table takes a long time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174079#M1908451</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;I want to select the original invoice number from the Cred.Note:Returns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this I am querying table VBFA, but it is taking a long time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H6&gt;&lt;SPAN style="color: #000080; font-size: 8pt; font-family: arial, helvetica, sans-serif;"&gt;SELECT VBELV&lt;/SPAN&gt;&lt;/H6&gt;&lt;H6&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM VBFA&lt;/SPAN&gt;&lt;/H6&gt;&lt;H6&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO TBL_VBRK-VBELV&lt;/SPAN&gt;&lt;/H6&gt;&lt;H6&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #000080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE VBTYP_N = 'M'&lt;/SPAN&gt;&lt;/H6&gt;&lt;H6&gt;&lt;SPAN style="color: #000080; font-size: 8pt; font-family: arial, helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AND VBELN&amp;nbsp;&amp;nbsp; = TBL_VBRK-VBELN.&lt;/SPAN&gt;&lt;/H6&gt;&lt;H6&gt;&lt;SPAN style="color: #000080; font-size: 8pt;"&gt;ENDSELECT.&lt;/SPAN&gt;&lt;/H6&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an alternate table I can use or some FM ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 10:58:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174079#M1908451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-16T10:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Selection from VBFA table takes a long time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174080#M1908452</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;You may want to narrow your select with POSNN or check which indexes you have for VBFA and adjust your select accordingly to improve performance, but this technique is still somewhat doubtful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don’t you simply take it from VBRP-VGBEL/VGPOS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 13:15:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174080#M1908452</guid>
      <dc:creator>AntonFarenyk</dc:creator>
      <dc:date>2015-07-16T13:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Selection from VBFA table takes a long time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174081#M1908453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Selection using succeeding document is slow in VBFA. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Options:&lt;/P&gt;&lt;P&gt;1. Create an index for the fields VBTYP_N, VBELN, POSNN&lt;/P&gt;&lt;P&gt;2. Select the preceeding document from VBRP-VGBEL/ AUBEL, instead of using VBFA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Juwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 13:26:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174081#M1908453</guid>
      <dc:creator>Juwin</dc:creator>
      <dc:date>2015-07-16T13:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Selection from VBFA table takes a long time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174082#M1908454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Virginia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not recommended to do query on VBFA on the subsequent doc. For that normal Item tables are sufficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure your process flow here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am guessing : Original Invoice -&amp;gt;Return Order-&amp;gt;Return-&amp;gt;Return Delivery-&amp;gt;Credit Note: Returns?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get AUBEL AUPOS from VBRP for Credit Note(VBRP-VBELN). VBRP-AUBEL will be your Return Order,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Query VBAP by passing VBELN = VBRP-AUBEL and POSNR = VBRP-AUPOS and get VGBEL .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBAP-VGBEL will be your Original Billing Doc provided the Return Order was created with reference to the Original Billing Doc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this way you will ensure you hit the Primary Index key all the time which will definitely be faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try FM SD_DOCUMENT_FLOW_GET. I never used it but by seeing the code it is trying from VBFA. So may not be good in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 13:26:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174082#M1908454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-16T13:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Selection from VBFA table takes a long time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174083#M1908455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cannot use VBRP-VGBEL/VGPOS since I want the &lt;SPAN style="color: #333333; font-size: 12px;"&gt;original invoice number from the Cred.Note:Returns and not the delivery&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 14:05:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174083#M1908455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-16T14:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Selection from VBFA table takes a long time</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174084#M1908456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply Rudra.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function Module&amp;nbsp; ‘WB2_VBFA_READ_WITH_VBELN’&amp;nbsp; solved my problem &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1291/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 14:06:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-from-vbfa-table-takes-a-long-time/m-p/11174084#M1908456</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-07-16T14:06:39Z</dc:date>
    </item>
  </channel>
</rss>

