<?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 VBAK selection in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985534#M1161497</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need your advice on VBAK selection where my requirement of program just having field ERDAT (doc creation date) as selection. In my system even ERDAT is stated as one of the secondary index but it is marked as "No database index". Hence it resulting a long runtime by using ERDAT for VBAK selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please comment that how can i solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jan 2009 04:02:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-07T04:02:25Z</dc:date>
    <item>
      <title>VBAK selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985534#M1161497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need your advice on VBAK selection where my requirement of program just having field ERDAT (doc creation date) as selection. In my system even ERDAT is stated as one of the secondary index but it is marked as "No database index". Hence it resulting a long runtime by using ERDAT for VBAK selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please comment that how can i solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 04:02:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985534#M1161497</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-07T04:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: VBAK selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985535#M1161498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ABC,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selection by ONLY date is very expensive and cause performance issues for the report. Can you please tell me the business requirement for this report, maybe you can include other fields too!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regrads&lt;/P&gt;&lt;P&gt;Vijai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 05:57:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985535#M1161498</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-07T05:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: VBAK selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985536#M1161499</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;Can u please give the query you have used&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards &lt;/P&gt;&lt;P&gt;prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 06:44:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985536#M1161499</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-07T06:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: VBAK selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985537#M1161500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. The business requirement is like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The selected Sales order number will have to further trace the document flow to get the Purchase order and Invoice's info. Source is coming from SD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And Sales order creation date is the only input user need. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls comment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 07:08:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985537#M1161500</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-07T07:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: VBAK selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985538#M1161501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using only ERDAT will cause serious performance issue and a long run time as it will fetch huge number of records.&lt;/P&gt;&lt;P&gt;There should be some other selection criteria in addition to ERDAT for further filteration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 07:11:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985538#M1161501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-07T07:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: VBAK selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985539#M1161502</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;You can try for Document type with the created date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Maharshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 07:21:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985539#M1161502</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-07T07:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: VBAK selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985540#M1161503</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;Your requirement is still not completely clear to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a similar type of scenario (if i am getting it right)..i used the document type....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;check the code :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Form  SUB_GET_VBFA
*&amp;amp;---------------------------------------------------------------------*
*  Fetching Preceding Document and Subsequent Document.
*----------------------------------------------------------------------*
    FORM sub_get_vbfa .
*     Check for INITIAL
*    -------------------
      IF NOT git_lips_temp[] IS INITIAL.

        SELECT vbeln                                                     "Subsequent Sales and Distribution Document
               vbelv                                                     "Preceding Sales and Distribution Document
               vbtyp_n                                                   "Document Category of Subsequent Document
               vbtyp_v                                                   "Document category of Preceding SD document
               FROM vbfa
               INTO TABLE git_vbfa
               FOR ALL ENTRIES IN git_lips_temp
               WHERE vbeln = git_lips_temp-vbeln
               AND ( vbtyp_v = gc_order OR vbtyp_n = gc_delivery ).      "vbtyp_v = C and vbtyp_n = J

        IF sy-subrc EQ 0 .
          SORT git_vbfa BY vbeln.
        ENDIF .

*     To get all Invoices
*     --------------------
        SELECT vbeln                                                     "Subsequent Sales and Distribution Document
               vbelv                                                     "Preceding Sales and Distribution Document
               vbtyp_n                                                   "Document Category of Subsequent Document
               vbtyp_v                                                   "Document category of Preceding SD document
               FROM vbfa
               INTO TABLE git_vbfainv
               FOR ALL ENTRIES IN git_lips_temp
               WHERE vbelv = git_lips_temp-vbeln
               AND ( vbtyp_v = gc_delivery and vbtyp_n = gc_invoice ).   "vbtyp_v = C and vbtyp_n = M

        IF sy-subrc EQ 0 .
          SORT git_vbfainv BY vbelv.
        ENDIF .

      ENDIF.
    ENDFORM.                    " SUB_GET_VBFA

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Form  SUB_GET_VBPA
*&amp;amp;---------------------------------------------------------------------*
*  For getting the Customer Number 1 details which inturn would be used
*  for fetching the relevant Customer Name in the next step.
*----------------------------------------------------------------------*
    FORM sub_get_vbpa .
*    Local Declaration:
*    ------------------
      DATA: lit_vbfa TYPE STANDARD TABLE OF gty_vbfa.

*     Check for INITIAL
*    -------------------
      IF NOT git_vbfa[] IS INITIAL.

*       Passing the Value to Local Internal Table
*      -------------------------------------------
        lit_vbfa[] =  git_vbfa[].

        SORT lit_vbfa[] BY vbelv.

*       Removing the Duplicate Entries
*      --------------------------------
        DELETE ADJACENT DUPLICATES FROM lit_vbfa COMPARING vbelv.

        SELECT vbeln                                                     "Sales and Distribution Document Number
               kunnr                                                     "Customer Number
               FROM vbpa
               INTO TABLE git_vbpa
               FOR ALL ENTRIES IN lit_vbfa
               WHERE  vbeln = lit_vbfa-vbelv AND
                      parvw = gc_sold_to_party .                         "parvw = AG

        IF sy-subrc = 0.
          SORT git_vbpa BY vbeln.
        ENDIF.
*       Clearing the Local Internal Table
*      ----------------------------------
        Refresh: lit_vbfa[].

      ENDIF.
    ENDFORM.                    " SUB_GET_VBPA
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 3:21 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 07:30:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985540#M1161503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-07T07:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: VBAK selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985541#M1161504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. The business requirement is like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The selected Sales order number will have to further trace the document flow to get the Purchase order and Invoice's info. Source is coming from SD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And Sales order creation date is the only input user need. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls comment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 07:35:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985541#M1161504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-07T07:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: VBAK selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985542#M1161505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Anubhav Duttagupta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My selection is on table VBAK but not VBFA. Please comment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 07:38:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985542#M1161505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-07T07:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: VBAK selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985543#M1161506</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;You can make Your own Secondry index in vbak table include  erdat vbeln auart  it will make your database &lt;/P&gt;&lt;P&gt;access faster .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;digvijay rai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2009 08:06:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985543#M1161506</guid>
      <dc:creator>digvijay_rai</dc:creator>
      <dc:date>2009-01-07T08:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: VBAK selection</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985544#M1161507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply, however we are not allow to request for the secondary index creation as our curren VBAK having 6 secondary indexes. Where it has reached the max allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please comment again if there is anywhere that i can do better on the program coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 07:06:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/vbak-selection/m-p/4985544#M1161507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T07:06:19Z</dc:date>
    </item>
  </channel>
</rss>

