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: 

connect a few MM&FI tables

Former Member
0 Kudos
666

hi,

I need to link the tables EKKO, EKKN, EKPO, MSEG, BSEG (need dmbtr, gjahr) and BKPF (only need hwaer)!

After searching a while i found the following connections:

EKKO - EKPO (using ebeln)

EKPO - EKKN (using ebeln & ebelp)

EKPO - MSEG over Table EKBE with (EKPO-EKBE ebeln&ebelp AND EKBE(lfbnr, lfgja,lfpos)-MSEG(mblnr, mjahr, zeile)

EKPO - BSEG (using ebeln&ebelp)

BSEG - BKPF (using bukrs,belnr,gjahr)

Are these connections alright?

To join the tables with the mentioned connections is very slow - so is there another way to link them? Especially the clustered table bseg will be a problem!

Hope to see a solution!

Regards

Jacko

1 ACCEPTED SOLUTION

Former Member
173

hi,

Goto SQ01(Tcode) here press QUICK VIEWER-> Enter Quick View name as TEST -> Press Create.

Here Enter TITILE as TEST and select DATA SOURCE as Table Join and keep layout mode as it is -> Press Enter.

Here you can enter any MM and FI tables to know which fields are common to make inner joins.

Hope this works for you.

Thanks........

8 REPLIES 8

amit_khare
Active Contributor
0 Kudos
173

Welcome to SDN.

you may check [this|http://www.abap.es/Descargas/TAB%20-%20Relacion%20de%20las%20tablas%20por%20modulos.PDF]

Search forum, there are many threads related to same query.

0 Kudos
173

thanks for your answer!

i got the pdf and also searched in the forum!

I only found the connections mentioned in the post before!

Linking ekkn,ekpo,ekko and mseg isn't the problem that works very fast and i can do it in one statement!

my problem is how to link to bseg and bkpf! I'm sorry if there is another post which i haven't found yet!

after connecting the ekkn,ekpo,ekko and mseg i loop through the result and start selecting from bseg but that's very slow - so is there another solution?

regards,

jacko

0 Kudos
173

Hi Jack,

Usually we avoid direct selects from BSEG table and go for other tables

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     
BSIS Accounting: Secondary Index for G/L Accounts

Check this link

http://www.sapmaterial.com/bseg_alternative.html

Regards

0 Kudos
173

thanks for your answer!

i found the needed fields in tables bsak and bsid but ebeln and ebelp aren't set so i can't use them!

in the bseg they are available!

if i run the report using bseg a timeout occurs.

regards,

jacko

0 Kudos
173

Hi,

Can you let us know how your select on BSEG looks ? Do you have all the key fields

Have a look at the function module READ_BSEG.

Regards

tarangini_katta
Active Contributor
0 Kudos
173

Hi,

Do you want to get the whole fields from bseg and BKPF.or only do you need speicifc fields.

If that is the case check this FM once.May be it wil help for you.

ME_READ_DOCUMENT_FINANCE

Thanks.

Former Member
0 Kudos
173

Hi Jacko,

MIRO doc and related FI doc, heres the way:

MIRO doc table - RBKP

concatenate 'BELNR' and 'GJAHR' from table RBKP into lv_var

and select entries from table BKPF where AWKEY = lv_var.

you need not go for table 'BSEG'

Hope it helps.

Edited by: Azeem Ahmed Matte on Feb 27, 2009 11:32 AM

Edited by: Azeem Ahmed Matte on Feb 27, 2009 11:33 AM

Former Member
174

hi,

Goto SQ01(Tcode) here press QUICK VIEWER-> Enter Quick View name as TEST -> Press Create.

Here Enter TITILE as TEST and select DATA SOURCE as Table Join and keep layout mode as it is -> Press Enter.

Here you can enter any MM and FI tables to know which fields are common to make inner joins.

Hope this works for you.

Thanks........