I m using lae_crm_billplan table as below.
select bukrs objid subid tmstamp kscha kwert perioddate cashflowtype from lae_crm_billplan into table it_billplan for all entries in it_header_items where bukrs = p_bukrs and objid = it_header_items-objid and subid = c_subid and kscha in r_kscha and cashflowtype in r_cflowtyp. sort it_billplan by objid perioddate. delete adjacent duplicates from it_billplan comparing objid. loop at it_header_items assigning <fs_header_items>-. read table it_billplan into wa_billplan with key objid = <fs_header_items>-objid binary search. if sy-subrc = 0. <fs_header_items>-first_instl_dt = wa_billplan-perioddate. <fs_header_items>-first_instl_amt = wa_billplan-kwert. endif. endloop.
but above statements is becoming very performace hungry. is thery any way out to find out first installment date & first installment amount from other source or can you please tell me how to optimize above statemtns so that it will not be performance hungry...
i have total 65000 records in table it_header_items