13 Replies Latest reply: Apr 29, 2010 12:54 PM by Hermann Gahm RSS

MSEG, BSEG, MKPF

shuba rao
Currently Being Moderated

How would u go about improving the performance of a Program, which selects data from MSEG & MKPF or BSEG ?

  • Re: MSEG, BSEG, MKPF
    Hariharan Natarajan
    Currently Being Moderated

    Hi,

     

    You just contact you function consultant there are some other relevant table which is equable to BSEG table in SAP.

    these are some of the table BSIK,BSID ect.

     

    Reg,

    Hariharan Natarajan.

  • Re: MSEG, BSEG, MKPF
    Santosh Kumar
    Currently Being Moderated

    hi,

    u can create index for improving ur performance.

     

    Regards

    Santosh.

  • Re: MSEG, BSEG, MKPF
    PALLE NAGANJANA REDDY
    Currently Being Moderated

    Hi Subha,

     

    Go through this info.

     

    Disadvantages:

    Basically index are provided to improver performance. i.e with index select on db tables retrieves data much faster.

     

    If you are writting select statement on the table where in where clause you have non-primary keys then it takes longer to retriev data from DB table.

     

    If you have select in dbtable on non-primary key you can create Secondary index with keys as per your where clause which result in faster DB table access.

     

    But remember not to create too many secondary indexes on same table which could result in slow / degrage performance..

     

     

    you can check out the link below for more inforamation on indexes

    http://www.idig.za.net/mysqlindexes/2006/11/09/

    Secondary Indexes

     

     

    Advantages :

     

    Secondary indexes are used to enhancement performance when retrieving data. For example, say you have a table AFKO where the key to the table is AUFNR. You can select data from this table using AUFNR, the performance will be great because you are using the key. Say you need to hit this table with GLTRP(finish date), it is not part of the key, so the performance would be poor. If you created a secondard index using this field GLTRP, the performance would be improved. Make sense?

    https://forums.sdn.sap.com/click.jspa?searchID=1052972&messageID=1633228

    http://help.sap.com/saphelp_470/helpdata/en/cf/21eb20446011d189700000e8322d00/frameset.htm

     

    sap.ittoolbox.com/documents/popular-q-and-a/specifying-the-index-to-be-used-2462

    sap.ittoolbox.com/documents/popular-q-and-a/specifying-the-index-to-be-used-2462

    http://www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm

     

    **********rewords some points.

     

    Rgds,

    P.Naganjana Reddy

  • Re: MSEG, BSEG, MKPF
    Vijayasekar Kuppusamy
    Currently Being Moderated

    Hi ,

           Before creating indexe's  have a look at these notes released by sap for the performance improvement of custom developments....

     

    187906 Performance: Customer developments in PP and PM

    185530 Performance: Customer developments in SD

    191492    Performance: Customer developments in MM/WM

     

    Hope this will help to solve your performance issues....

     

    Regards,

    Vijay

  • Re: MSEG, BSEG, MKPF
    Machindra Jogdand
    Currently Being Moderated

    Hi,

     

    Try this:

     

    In general,

    0. Reduce load on DB best possible,

    1. Improve db performance  by a) using proper select stmt (joins,) b) give more and more condition on key fields.

    2. Improve ABAP performance by : Donot select data in a loop using select single,  Select data outside loop, read data throutgh read stmst with Binary search

     

    GOTO SE30, performance analyser, click tips and trics u will get all most important tips ... run ur program and anylysse it . with tips and tricks try to improve weaker sections of codes.

     

    Hope this will help u.

     

    Jogdand M B

  • Re: MSEG, BSEG, MKPF
    Raymond Giuseppi
    Currently Being Moderated

    <b>BSEG/BKPF accounting segment</b>

     

    BSEG is a cluster table, namely RFBLG. you won't be able to create index on such a table.

     

    And access with fields out of the keys of RFBLG BUKRS/BELNR/GJAHR/BUZEI risks to read the whole data table mapping the fields from cluster data.

     

    (Look at <a href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21f083446011d189700000e8322d00/content.htm">help.sap.com/Pooled and Cluster</a>  for more info on cluster table)

     

    Hopefully there are "database indexes" on BSEG, which are actual database table : BSIS, BSAS, BSID, BSAS, and so on.

     

    BSEG Access

    BSAD Accounting: Secondary index for customers (cleared items)

    BSAK Accounting: Secondary index for vendors (cleared items)

    BSAS Accounting: Secondary index for G/L accounts (cleared items)

    BSID Accounting: Secondary index for customers

    BSIK Accounting: Secondary index for vendors

    BSIM Secondary Index, Documents for Material

    BSIS Accounting: Secondary index for G/L accounts

     

    When you read from these table, if you need other fields you can use the full key of the cluster BSEG to access database. In case of very frquent access , you can append structure of the Secondary Index easyly, cause the index are filled with "MOVE-CORRESPONDING". (Look at OSS <a href="https://service.sap.com/sap/support/notes/62435">Note 62435 - F-03: Selection by purchasing documents</a>)

     

    <b>MSEG/MKPF matrial segment</b>

     

    - You can create customer Index on this table

     

    <b>General</b>

     

    - optimize programming with SELECT FOR ALL ENTRIES, and so

    - Archive old data

     

    Regards

  • Re: MSEG, BSEG, MKPF
    Praveen Kumar
    Currently Being Moderated

    Hi Shuba ,

      For MSEG and MKPF try using view <b>WB2_V_MKPF_MSEG</b> ,

     

      and instead of using BSEG use:

         <b> BSIS</b> -- for Open Items

    and <b>BSAS</b> -- for Closed Items .

     

      Both the above tables are transparent tables and will definitely improves your performance .

     

     

    Regards ,

      Praveen .

  • Re: MSEG, BSEG, MKPF
    Munassar Ali
    Currently Being Moderated

    Hi,

     

    I have gone through the SAP note 821772, It is basically for MS SQL server , where it mentions few jobs to update the statistics through (SQL server Enterprise Manager)

     

    I am presently using oracle 10g , I have searched all the relevant notes , but coudn't find any for Oracle DB support.

    Can any one of you provide me the Oracle DB supported for MSEG-MKPF joins (If i am missing)

    Or , Provide me an alternative solution to it(meaning any other substitute for this )

     

    Thanks a lot for your Valuble responses.

     

    M A

    • Re: MSEG, BSEG, MKPF
      Hermann Gahm
      Currently Being Moderated

      Hi,

       

      > I am presently using oracle 10g , I have searched all the relevant notes , but coudn't find any for Oracle DB support.

      > Can any one of you provide me the Oracle DB supported for MSEG-MKPF joins (If i am missing)

      > Or , Provide me an alternative solution to it(meaning any other substitute for this )

       

      hm.... searching SAP notes with "ORACLE MSEG MKPF" has some hits. E.g. this one 1293807 and some more... .

       

      But first of all you should start with tracing to understand the performance problem.

      Once you understood the problem you can think about how to optimize it...

       

      Kind regards,

       

      Hermann

Actions