2011 Jul 16 1:24 PM
Hi All,
I have the previous meter reading, Previous meter reading date, current reading date and estimated consumption.
Is there any simple function module available to calculate the new meter reading based on the estimated consumption..
Thanks in advance
Murali
2011 Jul 16 10:27 PM
Hi Murali,
From function module ISU_O_METERDOCU_OPEN, you can get reading from consumption. You can update X_AUTO-CONSMPT and get meter reading. You can debug transaction EL28 when you enter consumption in screen (system automatically calculate meter reading) and put break point at function module ISU_O_METERDOCU_OPEN and verify input parameters.
Hope this helps.
Regards,
Avinash
2011 Jul 18 11:17 AM
You might also try the below logic
New read = (Previous MR result + consumption ) mod ((eabl-STANZVOR + 1)*10). This would also take of the scenario when the meter rolls back to 0.
2011 Jul 18 11:20 AM
Hi Vikrant,
If consumption is calculated based on register factors or transformation ratio... then your formula will not work. If we can handle all possible ratios, then we can handle this.
Regards,
Avinash
2011 Jul 18 12:15 PM
Hi Avinash
Agree with you. The scenario i proposed would only work for simple water utility scenarios. But hasn't he already derived the consumption.
I guess the difficult part was to calculate the consumption.
Edited by: vikrant guptarya on Jul 19, 2011 12:12 AM
Edited by: vikrant guptarya on Jul 19, 2011 12:14 AM
2011 Jul 18 11:34 PM
Hi All:
I think another option is to use the MF ISU_CALCULATE_WITH_METREAD:
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(X_STANZVOR) LIKE EABL-STANZVOR
*" VALUE(X_STANZNAC) LIKE EABL-STANZNAC
*" VALUE(X_METERREAD) LIKE EABLH-I_VERBERW
*" VALUE(X_CONSUMPTION) LIKE EABLH-I_VERBERW
*" VALUE(X_OPERATION) LIKE REGEN-WMODE
*" VALUE(X_REABLD) LIKE REABLD STRUCTURE REABLD OPTIONAL
*" VALUE(X_CUMULATING) LIKE REGEN-KENNZX DEFAULT 'X'
*" VALUE(X_RAISE_MSG) LIKE REGEN-KENNZX DEFAULT SPACE
*" EXPORTING
*" VALUE(Y_RESULT) LIKE EABLH-I_VERBERW
*" EXCEPTIONS
*" NOT_VALID
*" CONV_FAILED
Where:
- X_STANZVOR is Number of predecimal places for register.
- X_STANZNAC is Decimal Places in the Billed Meter Reading.
- X_METERREAD is the previus meter reading.
- X_CONSUMPTION is estimated consumption.
- X_OPERATION is the operation, in this case is '+'.
- X_REABLD is the structure with Screen Fields for Entry/Correction Initial Screen.
- X_CUMULATING is for default 'X'.
The new meter reading is returned in Y_RESULT.
I hope this helps.
Best regards,
David
Edited by: IS-U CGE on Jul 18, 2011 6:45 PM
2011 Jul 24 9:06 AM
THanks a lot for your response..
I tried using the FM ISU_CALCULATE_WITH_METREAD. but for some reason it is not considering the register factor and the multiplication factor when deriving the meter reading from consumption.
Regards,
Muraliraj