‎2007 Jul 30 4:10 PM
hi I am developing a aging report for which I am getting fields from the tables EKPO and EKKO based on
s_gjahr FOR bsid-gjahr OBLIGATORY. "Document Fiscal year
p_date TYPE vbak-aedat OBLIGATORY, "A/P Open items
p_bukrs TYPE t001-bukrs OBLIGATORY. "Company
s_ekorg FOR mepo1222-ekorg OBLIGATORY, "Purchasing Organization
s_ekgrp FOR mepo1222-ekgrp, "Purchasing group
s_zterm FOR bseg-zterm, "Terms
s_ebeln FOR bseg-ebeln, "Purchase order
s_hkont FOR bseg-hkont, "Reconciliation Account.
s_blart FOR invfo-blart OBLIGATORY, "Document type
s_date FOR bseg-zfbdt NO-DISPLAY.
SELECT * FROM ekko INTO TABLE tbl_ekko WHERE bukrs = p_bukrs
AND zterm IN s_zterm
AND ekorg IN s_ekorg
AND ekgrp IN s_ekgrp.
IF tbl_ekko[] IS NOT INITIAL.
SELECT * FROM ekpo INTO TABLE tbl_ekpo FOR ALL ENTRIES IN tbl_ekko
WHERE ebeln = tbl_ekko-ebeln
AND bukrs = p_bukrs
AND repos = 'X'
AND werks IN s_werks. "additonal.
ENDIF.
Now my problem is I need to combine the data I have selected from EKKO with a table which has EBELN, I found BSIK but that doesnt have the EBELN field filled.
Can you tell me some table other than BSEG ( performace issue ) which I can use to select my entries with Inner join... only BSIK has BLART not BSEG..
I will definitely award points for all the helpful answers
‎2007 Jul 30 4:13 PM
Hi
U need to read the EKBE table here you should fine the FI invoices linked to PO
Max
‎2008 Aug 08 10:55 AM
RSEG was the missing table which I needed to connect EKBE with BSIK