<?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: BESG in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106012#M439488</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Report performance is very slow i have tried all the methods but i still in problem&lt;/P&gt;&lt;P&gt;so i need the method by which i can get data that i wann&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT belnr hkont aufnr wrbtr &lt;/P&gt;&lt;P&gt;FROM bseg INTO TABLE it_bseg &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_veh&lt;/P&gt;&lt;P&gt;WHERE belnr = it_veh-belnr&lt;/P&gt;&lt;P&gt;AND   hkont IN ('0004018221','0004018211').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is any problem in query &lt;/P&gt;&lt;P&gt;i have sort table it_veh before this loop i checked not initial of table it_veh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is ther any method by which i can get same result Please tell me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Apr 2007 04:16:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-12T04:16:52Z</dc:date>
    <item>
      <title>BESG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106008#M439484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i wanna some BAPI or Function or Any other table by which i can get data equivalant to BSEG table &lt;/P&gt;&lt;P&gt;I WANT THESE FOLLOWING FIELDS, OTHER THAN BSEG &lt;/P&gt;&lt;P&gt; BELNR, HKONT,  AUFNR , WRBTR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2007 10:35:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106008#M439484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-11T10:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: BESG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106009#M439485</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;are you facing problems in fetching data from BSEG.&lt;/P&gt;&lt;P&gt;wat exactly is your requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk the blog which addresses the common BSEG data selection:&lt;/P&gt;&lt;P&gt;/people/rob.burbank/blog/2006/02/07/performance-of-nested-loops&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2007 10:37:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106009#M439485</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-11T10:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: BESG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106010#M439486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there is no such FM or BAPI....U need to use select statement and get the values...&lt;/P&gt;&lt;P&gt;for these fields try creating an secondary index BELNR, HKONT, AUFNR , WRBTR.. now use this index in ur select statement and the program fetches data faster....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2007 10:41:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106010#M439486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-11T10:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: BESG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106011#M439487</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;All these fields are available in two tables (these two are transparent tables and not the cluster tables)..&lt;/P&gt;&lt;P&gt;BSIS - for open G/L accounts&lt;/P&gt;&lt;P&gt;BSAS - for cleared G/L accounts..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sai ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2007 11:01:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106011#M439487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-11T11:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: BESG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106012#M439488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Report performance is very slow i have tried all the methods but i still in problem&lt;/P&gt;&lt;P&gt;so i need the method by which i can get data that i wann&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT belnr hkont aufnr wrbtr &lt;/P&gt;&lt;P&gt;FROM bseg INTO TABLE it_bseg &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_veh&lt;/P&gt;&lt;P&gt;WHERE belnr = it_veh-belnr&lt;/P&gt;&lt;P&gt;AND   hkont IN ('0004018221','0004018211').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is any problem in query &lt;/P&gt;&lt;P&gt;i have sort table it_veh before this loop i checked not initial of table it_veh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is ther any method by which i can get same result Please tell me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2007 04:16:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106012#M439488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-12T04:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: BESG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106013#M439489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for Bseg , u have to pass &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Document number&lt;/P&gt;&lt;P&gt;2.year &lt;/P&gt;&lt;P&gt;3.Company COde &lt;/P&gt;&lt;P&gt;4.Documment type&lt;/P&gt;&lt;P&gt;5.list of G/L codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it_veh[] is not initial.&lt;/P&gt;&lt;P&gt;SELECT belnr hkont aufnr wrbtr &lt;/P&gt;&lt;P&gt;FROM bseg INTO TABLE it_bseg &lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_veh&lt;/P&gt;&lt;P&gt;WHERE belnr = it_veh-belnr&lt;/P&gt;&lt;P&gt;AND hkont IN ('0004018221','0004018211').&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and pass all above fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2007 04:26:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106013#M439489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-12T04:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: BESG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106014#M439490</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;Since you are reading based on HKONT, i would suggest to read BSIS instead of BSEG. BSEG is index table of accounting based on G/L account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this code. Also, since BSIS need BUKRS for complete key, the code is reading BSIS for complete range of Company code. Just replace the value of MIN and MAX company code with whatever min / max company code in your system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
*--- MACRO - Fill Company Code
DEFINE fill_bukrs.
  r_bukrs-sign   = 'I'.
  r_bukrs-option = 'EQ'.
  r_bukrs-low    =  &amp;amp;1.
  r_bukrs-high   =  &amp;amp;2.
  append r_bukrs.
END-OF-DEFINITION.

TABLES: t001.

CONSTANTS: 
    c_bukrs_min LIKE t001-bukrs VALUE '1000', "Lowest Company code no.
    c_bukrs_max LIKE t001-bukrs VALUE '5000'. "Highest Company code no.


DATA: BEGIN OF lit_bsis OCCURS 0,
        bukrs LIKE bsis-bukrs,
        belnr LIKE bsis-belnr,
        gjahr LIKE bsis-gjahr,
        buzei LIKE bsis-buzei,
        aufnr LIKE bsis-hkont,
        wrbtr LIKE bsis-wrbtr,
      END OF lit_bsis.

RANGES: r_bukrs FOR t001-bukrs.

fill_bukrs c_bukrs_min c_bukrs_max.

IF NOT it_veh[] IS INITIAL.

  SELECT
        bukrs
        belnr
        gjahr
        buzei
        aufnr
        wrbtr FROM bsis
              INTO TABLE lit_bsis
              FOR ALL ENTRIES IN it_veh
              WHERE bukrs IN r_bukrs AND
                    hkont IN ('0004018221','0004018211') AND
                    belnr = it_veh-belnr.

ENDIF.
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you still have a issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2007 04:41:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/besg/m-p/2106014#M439490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-12T04:41:20Z</dc:date>
    </item>
  </channel>
</rss>

