cancel
Showing results for 
Search instead for 
Did you mean: 

lae_crm_billplan

Former Member
0 Kudos

hi,

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

Regards,

Santosh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

This appears to be a CRM problem, so we won't be able to help much unless you can give us some more information. For starters, what do the indexes look like for this table (fields and order)?

Rob

Sougata
Active Contributor
0 Kudos

If its very hungry then you should first feed it dude! May be you can ask the Basis to go shopping for more memory & stuff

But before you do that, let's first try and fine tune your program a bit.

FYI, first of all, in all these new developments (modules & systems alike), its not a good idea to use SELECT statmenets to read these transactional data tables - but in your case, I think you'll probably struggle to find one which suits your requirement. But do look using "where-used" function for FMs as well as Classes. I know for FI-CA developments for instance, SAP has developed lot of new Classes for handling FI-CA data. If you can find a standard FM or class which selects data frrom this BILLPLAN table then your problem is half solved.

If you can't then perhaps I would first build a table index for these fields on table LAE_CRM_BILLPLAN:

bukrs,  objid,  subid,  kscha,  cashflowtype

then I would add this before your first selection:


if it_header_items is not initial

Try this, I think it will imporve performance on the new index.

Cheers,

Sougata.