2009 Feb 26 7:25 AM
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
2009 Mar 02 8:32 AM
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........
2009 Feb 26 7:30 AM
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.
2009 Feb 26 7:41 AM
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
2009 Feb 26 8:13 AM
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
2009 Feb 26 8:43 AM
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
2009 Feb 26 9:37 AM
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
2009 Feb 26 4:54 PM
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.
2009 Feb 27 10:32 AM
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
2009 Mar 02 8:32 AM
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........