<?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: Function module for VBFA table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365555#M1234685</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SHP_VBFA_SELECT_02
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Mar 2009 12:04:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-23T12:04:09Z</dc:date>
    <item>
      <title>Function module for VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365546#M1234676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;Please Help me on this Issue..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to retrieve data from vbfa table..while making query to retrieve data from vbfa tabl,its making performance issue on production server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT vbelv&lt;/P&gt;&lt;P&gt;           vbeln&lt;/P&gt;&lt;P&gt;                INTO TABLE i_ref_data&lt;/P&gt;&lt;P&gt;    FROM vbfa FOR ALL ENTRIES IN i_billing_main&lt;/P&gt;&lt;P&gt;    WHERE&lt;/P&gt;&lt;P&gt;         vbelv   EQ i_billing_main-vbeln AND&lt;/P&gt;&lt;P&gt;         vbtyp_n EQ c_vbtyp_n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i have tried to retrieve data using functiom module "RV_ORDER_FLOW_INFORMATION" .in this function i was not able to pass multiple document no to this function module so put this function module inside the loop but this option also making performance issue..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_billing_main_temp INTO wa_billing_main.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR : wa_comwa,wa_vbfa.&lt;/P&gt;&lt;P&gt;    REFRESH i_vbfa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_comwa-vbeln = wa_billing_main-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This function module used for retrieving document flow data from VBFA&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'RV_ORDER_FLOW_INFORMATION'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        comwa    = wa_comwa&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        vbfa_tab = i_vbfa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SORT i_vbfa BY vbelv vbeln vbtyp_n.&lt;/P&gt;&lt;P&gt;    DELETE ADJACENT DUPLICATES FROM i_vbfa COMPARING vbelv vbeln vbtyp_n.&lt;/P&gt;&lt;P&gt;    SORT i_vbfa BY vbtyp_n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ TABLE i_vbfa&lt;/P&gt;&lt;P&gt;             INTO wa_vbfa&lt;/P&gt;&lt;P&gt;             WITH KEY vbtyp_n  =  c_vbtyp_n&lt;/P&gt;&lt;P&gt;    BINARY SEARCH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      wa_ref_data-vbeln = wa_vbfa-vbeln.&lt;/P&gt;&lt;P&gt;      wa_ref_data-vbelv = wa_billing_main-vbeln.&lt;/P&gt;&lt;P&gt;      APPEND wa_ref_data TO i_ref_data.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so kindly give me the solution for improving performance of this issue.&lt;/P&gt;&lt;P&gt;Is it having any function module to pass multiple inputs to the function module.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;P.Senthil Kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: senthil kumar on Mar 23, 2009 12:23 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 11:23:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365546#M1234676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T11:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365547#M1234677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT vbelv
vbeln
INTO TABLE i_ref_data
FROM vbfa FOR ALL ENTRIES IN i_billing_main
WHERE
vbelv EQ i_billing_main-vbeln AND
posnv EQ i_billing_main-posnn AND
vbtyp_n EQ c_vbtyp_n.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in where condition you should have to match the line item number..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 11:28:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365547#M1234677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T11:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365548#M1234678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please add  check condition to check  internal table is blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not i_billing_main[] is initial.&lt;/P&gt;&lt;P&gt;SELECT vbelv&lt;/P&gt;&lt;P&gt;vbeln&lt;/P&gt;&lt;P&gt;INTO TABLE i_ref_data&lt;/P&gt;&lt;P&gt;FROM vbfa FOR ALL ENTRIES IN i_billing_main&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;vbelv EQ i_billing_main-vbeln AND&lt;/P&gt;&lt;P&gt;vbtyp_n EQ c_vbtyp_n.&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;This is the best possible way to retrive data from VBFA table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other method you adopted will take more time since you are calling the FM in loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check ST05 trace for your above query to see if primary index is being used. Else contact Basis to help you out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 11:28:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365548#M1234678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T11:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365549#M1234679</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;check this fm RV_ORDER_FLOW_INFORMATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Aakash Banga&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 11:31:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365549#M1234679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T11:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365550#M1234680</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 this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SD_VBFA_READ_WITH_VBELV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 11:36:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365550#M1234680</guid>
      <dc:creator>tarangini_katta</dc:creator>
      <dc:date>2009-03-23T11:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365551#M1234681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arunima Rudra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to put posnv filed in where conditon also in my program but my team lead informed to use only function module.Is it have any function module to pass multiple vbeln data.??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks  &amp;amp; Regards&lt;/P&gt;&lt;P&gt;P.Senthil Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 11:39:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365551#M1234681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T11:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365552#M1234682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this function module...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SPP01_SALESORDER_GETLIST
SD_VBFA_SELECT
WB2_VBFA_READ_WITH_VBELV
WB2_VBFA_READ_WITH_VBELN
READ_VBFA
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Arunima Rudra on Mar 23, 2009 5:13 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Arunima Rudra on Mar 23, 2009 5:19 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 11:43:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365552#M1234682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T11:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365553#M1234683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arunima Rudra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"SPP01_SALESORDER_GETLIST" its not available in ECC5.0..is it BAPI_SALESORDER_GETLIST"..??? &lt;/P&gt;&lt;P&gt;In this function module we can't pass document number..&lt;/P&gt;&lt;P&gt;my intension is  to pass invoice numbers to VBFA table and based on that i have to get sub sequent invoice numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;P.Senthil Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 11:52:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365553#M1234683</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T11:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365554#M1234684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arunima Rudra ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was tried these function modules also in my program but these are having only one input value (VBELN).So i was forced me to use these function modules inside the loop so its afftecting performance of the program.So please help me on this issue..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SD_VBFA_SELECT&lt;/P&gt;&lt;P&gt;WB2_VBFA_READ_WITH_VBELV&lt;/P&gt;&lt;P&gt;WB2_VBFA_READ_WITH_VBELN&lt;/P&gt;&lt;P&gt;READ_VBFA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;P.Senthil Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 12:00:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365554#M1234684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T12:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365555#M1234685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SHP_VBFA_SELECT_02
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 12:04:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365555#M1234685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T12:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Function module for VBFA table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365556#M1234686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arunima Rudra ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen " SHP_VBFA_SELECT_02 ".its working fine.thanks Arunima..&lt;/P&gt;&lt;P&gt;I saw the coding for this function module its also like a Query i gave early in this forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT vbelv&lt;/P&gt;&lt;P&gt;vbeln&lt;/P&gt;&lt;P&gt;INTO TABLE i_ref_data&lt;/P&gt;&lt;P&gt;FROM vbfa FOR ALL ENTRIES IN i_billing_main&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;vbelv EQ i_billing_main-vbeln AND&lt;/P&gt;&lt;P&gt;vbtyp_n EQ c_vbtyp_n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will u give some other function module.???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;P.Senthil Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 12:26:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-for-vbfa-table/m-p/5365556#M1234686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-23T12:26:06Z</dc:date>
    </item>
  </channel>
</rss>

