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 Simulation - Invalid MR ?

Former Member
0 Kudos

hi guys,

I am using the ISU_SIMULATION_PERIOD_BILL for getting an estimate bill for a giving period.

Problem i encounter is when the period has a invalid meter reading.

In this case the function module aborts and does not complete the simulation.

Is there a way to ignore these MR ? I need to complete the SIM and want to discard all invalid MRs.

Thanks

SAF

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Unfortunately no, there is no way around it except to copy it and handle the exception. What we did was to copy it to a custom function module. Leave everything the same except for the " PERFORM build_izwst_for_simulatn CHANGING obj sobj." statement. Copy this subroutine into your own subroutine. Inside this subroutine, you will find a couple of call function statements. Add the exception ERROR_MESSAGE to all of them and check the sy-subrc after that and take the necessary action as per your requirements.

What this does is that it gives you control over handling that exception instead of terminating the whole simulation. We had to do this to simulate a bunch of bills for a one year period to calculate our budget bill amount.

View solution in original post

2 REPLIES 2

Former Member
0 Kudos

Unfortunately no, there is no way around it except to copy it and handle the exception. What we did was to copy it to a custom function module. Leave everything the same except for the " PERFORM build_izwst_for_simulatn CHANGING obj sobj." statement. Copy this subroutine into your own subroutine. Inside this subroutine, you will find a couple of call function statements. Add the exception ERROR_MESSAGE to all of them and check the sy-subrc after that and take the necessary action as per your requirements.

What this does is that it gives you control over handling that exception instead of terminating the whole simulation. We had to do this to simulate a bunch of bills for a one year period to calculate our budget bill amount.

0 Kudos

Thanks for the inputs. I tried your guidelines, still no success.

My funtion module does not contain your :

PERFORM build_izwst_for_simulatn CHANGING obj sobj

Instead i have a :

PERFORM IZWST_CONSTRUCT_FOR_S_SIMUL CHANGING OBJ SOBJ.

wich i copied to a Z*.

If the exceptions on this are handled in order to not treat the invalid MR, we get another error later on the :

PERFORM BILLING CHANGING OBJ SOBJ.

My version is 4.6.4 but i also have access to 6.0 and still it is the same code.~

BTW the message i get when an invalid MR is present is : EL 184

Thanks

Edited by: Filipe Sa on Sep 21, 2009 12:02 PM