Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

MSEG, BSEG, MKPF

Former Member
0 Kudos

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

13 REPLIES 13

Former Member
0 Kudos

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.

Former Member
0 Kudos

hi,

u can create index for improving ur performance.

Regards

Santosh.

0 Kudos

will u tel me how to create index ?????????

thanks.......

0 Kudos

Hi,

U cannot create index on cluster tables,like bseg

what you can do is to select the values based on all primary keys..

or use the other tables.

For MSEG u can create, click on the index in table MSEG, create rhe indexased on the keys on which u want to select data.

Now data will be selected based on that index.

Regards,

Sonika

0 Kudos

thanks Sonika..........

i think it wil help me.....

0 Kudos

make sure that , Index fields will match all ur WHERE CLAUSE fields, based on the fields in where clause , SAP will uses these secondary Indexes , otherwise it will use Index~0.

goto se11-> MSEG>Indexex->create---> pass reuqired Fields --->save and activate.

Regards

Prabhu

Former Member
0 Kudos

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/

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...

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

Rgds,

P.Naganjana Reddy

VijayasekarK
Active Participant
0 Kudos

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

Former Member
0 Kudos

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

raymond_giuseppi
Active Contributor
0 Kudos

<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

Former Member
0 Kudos

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 .

Former Member
0 Kudos

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

0 Kudos

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