12-11-2014 4:04 AM
Hello,
How do I get the below info:
1) For a given Contract Account or Installation as input, How do I calculate the current billing based on the valid to date of the billing record?
Do I need to pull it from ERCH table?
2) Based on above can anyone tell me what is meant by select all records from Installation fact where valid from date <= First day of current bill period.
I know that we can get Installation facts from table ETTIFN.
Please suggest.
Thanks Ricky
12-11-2014 5:31 AM
Hi Ricky,
1. Not sure what you meant by current billing. If you want to get the Billing doc you can get it from ERCH table and get the bill doc from contract as contract account may have multiple contracts so if you have installation, get the active contract and from contract get the bill doc for the date period.
If you want the net amount on bill doc, you can get it in DBERCHZ3 table where NETTOBTR is the field.
2. If you want to get the the Installation facts from ETTIFN, i think you need OPERAND value.
I hope this info will be useful. Please provide if you have more info.
Thanks,
Punna.
12-11-2014 5:31 AM
Hi Ricky,
1. Not sure what you meant by current billing. If you want to get the Billing doc you can get it from ERCH table and get the bill doc from contract as contract account may have multiple contracts so if you have installation, get the active contract and from contract get the bill doc for the date period.
If you want the net amount on bill doc, you can get it in DBERCHZ3 table where NETTOBTR is the field.
2. If you want to get the the Installation facts from ETTIFN, i think you need OPERAND value.
I hope this info will be useful. Please provide if you have more info.
Thanks,
Punna.
12-17-2014 4:04 PM
Hi Gotham,
By 'current billing', i mean current billing period. How can i get it?
Pls suggest.
12-11-2014 5:37 AM
Hi Ricky,
if Contract account is the input you need to start from ERCH , if installation is the input you need to start from EVER.
if Contract account is the input.
1)first query will be on ERCH.Get belnr vkont....based on the contract account
2)Query on EVER to get the Installation based on Contract account.
3)Pass the insatallation from step 2 to ETTIFN to get the belnr ,installation facts , wert1 etc
if Installation is the Input.
1)Query on EVER to get the Installation, contract account based on installation.
2)Query will be on ERCH.Get belnr, vkont....based on the contract account found in step 1.
3)Pass the insatallation from step 1 to ETTIFN to get the belnr ,installation facts , wert1 etc
You can also have a query on ERCHC if you want to filter out the simulated/ Not released billing docs
Once you have the data in the internal tables you can read the data from these tables and perform the calculations.
Regards,
Chandan
12-17-2014 4:03 PM
Hi ,
Thanks for the above suggestion which helped me to an extent.
I have installation# with me.Can you please tell me how to pull the billing documents for the current billing period?
12-18-2014 4:43 AM
Hi Ricky ,
To get the latest bill docs proceed as below.
Fetch Vkonto from EVER into table1 where anlage = your installation no.
For all entries in table1.
fetch BELNR ..BEGABRPE ENDABRPE from ERCH into table2 where vkont = table1-vkonto.
sort table2 by ENDABRPE descending.
read table2 index 1 .
This will hold your latest billing document.
Hope this helps.