Application Development and Automation 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: 
Read only

how to enhance processing

Former Member
0 Likes
890

I need to select info from table mseg , bkpf. ( anyway I am more familiar with HR module )

The link (told by my functional guy) is via

bkpf-awkey = mseg-mblnr + mseg-mjhar

and company code.

Then with the doc no from bkpf to retrieve bseg.

The process is very slow.

I would appreciate any tips for enhanceing the process, is this the only link?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
844

You just have to add <b>BKPF-AWTYP</b> to the select you have. The value you want <b>may</b> be BKPF-AWTYP = 'MKPF'. This will allow you to use the index that's there.

Rob

I need to select info from table mseg , bkpf. ( anyway I am more familiar with HR module )

The link (told by my functional guy) is via

bkpf-awkey = mseg-mblnr + mseg-mjhar

and company code.

Then with the doc no from bkpf to retrieve bseg.

The process is very slow.

I would appreciate any tips for enhanceing the process, is this the only link?

6 REPLIES 6
Read only

Former Member
0 Likes
844

in which module u are working right now ? So we can give different option based on the module.

Regards

Prabhu

Read only

Former Member
0 Likes
844

The process will be very slow due to very large amount of data in that tables.

Anyway if posiible - use primary keys or indexes in your

Where condition of your select statements.

YOu can also check your requirement for data retrival form bseg and if possible use table with another indexin (BSID, BSIK, BSAD etc..... )

BR< Jacek

Message was edited by: Jacek Slowikowski

Read only

0 Likes
844

Rather how to check for the right index?

any example?

Message was edited by: SG Duxton

Read only

0 Likes
844

in se11 transaction when viewing the table you can also view indexes for it.

Tu use them simly you have to use that filds in you where statemnt with '=' operator,

Example TABLE 1. has index fot fields (a1,a5, a8)

so in your select you should have...

select (field list) from TABLE wher

a1 = somenthing and

a5 = something and

a8 = somenthing and..

rest of needed conditions.

BR< JAcek

Read only

0 Likes
844

As you have defined the link between the MSEG and BKPF table ...the information is part of primary key of the table so it should not make much difference with using any other index.

MSEG (Key)

MBLNR+MJAHR

BKPF (Key)

BUKRSBELNRGJAHR

AWKEY = BELNR & BUKRS & GJAHR.

I would suggest to fetch the data from MSEG into internal table for the filtered range and use the FOR ALL ENTRIES to get data from BKPF and BSEG tables.

example ---

select MBLNR MJAHR into table itab from mseg

where {filters)

select awkey belnr bukrs gjahr into table itab1 from bkpf

for all entries in itab

where belnr = itab-mblnr

and gjahr = itab-mjahr.

later you cane select from bseg.

Read only

Former Member
0 Likes
845

You just have to add <b>BKPF-AWTYP</b> to the select you have. The value you want <b>may</b> be BKPF-AWTYP = 'MKPF'. This will allow you to use the index that's there.

Rob