2006 Sep 08 10:13 AM
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?
2006 Sep 08 2:35 PM
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
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
2006 Sep 08 10:17 AM
in which module u are working right now ? So we can give different option based on the module.
Regards
Prabhu
2006 Sep 08 10:18 AM
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
2006 Sep 08 10:23 AM
Rather how to check for the right index?
any example?
Message was edited by: SG Duxton
2006 Sep 08 10:29 AM
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
2006 Sep 08 10:33 AM
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.
2006 Sep 08 2:35 PM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |