Show TOC

Function documentationBilled Consumption and Period Type

 

You use the API method GET_BILLED_CONSUMPTION within the class CL_ISU_UMC_API_GET_BILLED_CONS to retrieve the billed consumption. This API returns the raw billed consumption for the given contract or the installation.

The class CL_ISU_UMC_API_GET_BILLED_CONS is based on the default BAdI implementation CL_DEF_IM_ISU_BILLED_CONSUMPT of the BAdI definition ISU_PROVIDE_BILLED_CONSUMPT.

Features

Billed Consumption

Based on the API, the SAP Multichannel Foundation for Utilities OData Service entity ContractConsumptionValues in SAP ERP, returns the billed consumption records with the following fields:

Value

Description

Contract ID

Utilities Contract ID

PeriodTypeID

Period Type ID

StartDate

Start date of the billing period

EndDate

End date of the billing period

BilledAmount

Contract monetary amount billed

Currency

Currency for BilledAmount

ConsumptionValue

Billed utilities consumption amount

ConsumptionUnit

Utilities consumption unit of measurement

BillingPeriodYear

Invoice Year

BillingPeriodMonth

Invoice Month

MeterReadingCategoryID

Meter Reading Category ID

Besides the standard fields listed above, the back end system API of the OData service also retrieves additional fields as defined in the DDIC structure ISUS_UMC_CONSUMPTION as listed in the following table:

Value

Description

MR_TYPE

Meter reading type

REGISTER

Register

BILLING_DOC_ID

Number of a billing document

MR_DOCUMENT

Meter reading document ID

MR_BILLED

Billed meter reading

MR_PREVIOUS

Previous meter reading

If the consumption values from multiple registers for the same period are billed together, the billed consumption and billed net values are aggregated. In this case, all fields related to meter reading are empty since the record reflects the aggregated value based on the meter reading values from the different registers.

When the billing cycle is not yearly, but the PeriodTypeID = 'Y' (yearly), the billed consumption values and net values are aggregated by the invoice year.

Period Type

All validated period types are defined in the DDIC Domain ISU_UMC_PERIOD_TYPE as listed in the following table:

Value

Description

BC

Billing Cycle

Y

Yearly

M

Monthly

W

Weekly

D

Daily

2W

Bi-Weekly

2M

Bi-Monthly

HM

Half-Monthly

HY

Half-Yearly

Currently, the standard SAP Multichannel Foundation for Utilities OData Service entity PeriodType only supports BC (Billing Cycle) and Y (yearly). If you need to support a period type other than that of the types billing cycle and yearly, the method GET_PERIOD_TYPE_LIST in the API class CL_ISU_UMC_API_CONSUMPTION needs to be overwritten.