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

Aging report

Former Member
0 Likes
445

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

2 REPLIES 2
Read only

Former Member
0 Likes
407

Hi

U need to read the EKBE table here you should fine the FI invoices linked to PO

Max

Read only

Former Member
0 Likes
407

RSEG was the missing table which I needed to connect EKBE with BSIK