SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to read prices from tarif facts in ABAP

marcin_cholewczuk
Active Contributor
0 Kudos

Hi all,

I've this requirment. I've a report which is filtering some data and is calling formular passing date and installation number. Based on these two factors inside of formular I should read all prices from installation, tarifs and tariftyp facts and based on them show some information in formular. Problem is with tarifs. How should I read all relevant facts from tarifs (for selected installation and date)? In previous version of formular, FM for simulate billing was used, but for some reason client don't want to use this solution anymore. Any ideas?

Best Regards

Marcin Cholewczuk

1 ACCEPTED SOLUTION

marcin_cholewczuk
Active Contributor
0 Kudos

Ok, I've found it. ISU_INST_BIVIEW_SELECT as an input one has to give from- and to- date and installation number. As a result in changing parameter in table ianl_rate I'm receiving all relevant rates. With this it's easy to read data from Table EKDI.

Best Regards

Marcin Cholewczuk

View solution in original post

3 REPLIES 3

Former Member
0 Kudos

You need to do the following:

1) get the rate category from the installation (field TARIFTYP from table EANLH where AB <= date >= BIS)

2) Get the rate determination from rate determination table (transaction EA87). Here you need to identify all rate types and rates based on your date.

3) Now you need to see for your installation which rates determined at point 2 apply. You need to read tables EASTS to get the rate types (field TARIFART) at the register level, table ETTIFN to get any rate type installation fact (field TARIFART) also based on your date (AB<= date >=BIS).

Also you need to get any rate type from the rate categories rate facts (table EKDI). Also you need to get the rate category facts (field KONDIGR) for each TARIFART

4) After you get all these rate types, base on what you have you need to filter the results you got at point 2. Now you have all the rates that apply along with rate category facts (KONDIGR).

5) Now you just need to read table ETTAF where TARIF = the tariffs you determined above and KONDIGR = KONDIGR determined above. you will get all your rate facts this way.

0 Kudos

Hi,

Thanks for info, but I know how these data are storred in DB. Problem is that this is to complex and if instead of single date I will get as an input a rage it's becoming way to complex. I was hoping that there is an FM, which I could use.

BR

Marcin

marcin_cholewczuk
Active Contributor
0 Kudos

Ok, I've found it. ISU_INST_BIVIEW_SELECT as an input one has to give from- and to- date and installation number. As a result in changing parameter in table ianl_rate I'm receiving all relevant rates. With this it's easy to read data from Table EKDI.

Best Regards

Marcin Cholewczuk