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: 

Bill Print details on a given date.

ricky_shaw
Contributor
0 Kudos

Hello Experts,

I need to write a report to pull what all Accounts (VKONT) have been bill printed for a given date. Along with this, i need to output the consumption and also the amount of the invoice generated.

I started querying ERDK with STOKZ eq ' '.

How do i get other information? What tables or FM's do i need to query to get other info?

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can write query on ERDK with Print date as selection criteria. In order to fetch the consumption details you need to store the information in tables through schema steps. Assign a line item type for consumption (create a new line item type through SPRO) against the schema steps written for getting register consumption. The same will be stored in table DBERCHZ1 and DBERCHZ3 where you identify the consumption by bill doc no. and line item type(BELZART).

Only thing you need to take care is that if you create a query then using join table it will display multiple row in report for print docs having multiple lines in DBERCHZ1. So it is better to develop a ABAP report / BI report for the same.

View solution in original post

5 REPLIES 5

Former Member
0 Kudos

You can write query on ERDK with Print date as selection criteria. In order to fetch the consumption details you need to store the information in tables through schema steps. Assign a line item type for consumption (create a new line item type through SPRO) against the schema steps written for getting register consumption. The same will be stored in table DBERCHZ1 and DBERCHZ3 where you identify the consumption by bill doc no. and line item type(BELZART).

Only thing you need to take care is that if you create a query then using join table it will display multiple row in report for print docs having multiple lines in DBERCHZ1. So it is better to develop a ABAP report / BI report for the same.

former_member587072
Participant
0 Kudos

ERDK is the right place to start.   

Select all the invoices with a creation reason (ERGRD) = 01, INVOICED = X, reversed (STOKZ) = space and print date (DRUCKDAT) in range.  

If you use the TOTAL_AMNT as your amount, depending on configuration, you are most likely getting current charges and open arrears.   

If you just need the current charges then you'll need to get that from the billing documents.

As for consumption, speak to the invoice print person to see where the invoice is getting consumption from ... there are a few options.

Joe

former_member227287
Active Participant
0 Kudos

Hi Ricky,

    Once you got the print docs from ERDK , You can get the contract details from EVER where vkont = ERDK-vkont.

You can get the Invoice data from ERCHC where opbel = ERDK-opbel.

To get the Consumption data you need to pass the installation from EVER to the table ETTIFN and get WERT1.

Sample Code is shown below.

select vertrag anlage vkonto from EVER into gt_ever where vkonto = ERDK-vkont.

select belnr lfdnr opbel from ERCHC where opbel = ERDK-opbel

select anlage operand bis ab belnr wert1 where anlage = EVER-anlage and operand = 'Operand to calculate the Consumption'.

Regards,

Chandan

0 Kudos

Hello,

Thank you for your replies.

How can i get the list of Con Accounts(VKONT) that were Bill Printed today or someother date?

0 Kudos

In ERDK table there is a field named DRUCKDAT (Print date) also you can get the Contract account here in this table.

In SE16 you can provide the Druckdat and get the contract accounts that were bill printed on this date.

Regards,

Chandan