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: 

default Periodic consumption

Former Member
0 Kudos

Hi!

I have a question:

Do you know if it posible fill the Period Consumption in transaction EG31 automatically?

In exit EXIT_SAPLE30D_001 in fill this field in  XY_ZW_INPUT-PERVERBRO and PERVERBR, but the fill is empty:

Thanks!

1 ACCEPTED SOLUTION

srinivasankh
Contributor
0 Kudos

Hi Indi,

This is not possible using the user-exit you have provided.

Please see the notes provided by SAP:

Notes

Note that only the input fields in dictionary structure REG30_I_AC and REG30_ZW_I for register data, may be changed in this function module.

If you want to use one of the constants listed above, you must install include IEE07ACTION.

It is not possible to prepopulate the period consumption or meter reading result fields.

Thanks,

Srini

View solution in original post

8 REPLIES 8

srinivasankh
Contributor
0 Kudos

Hi Indi,

This is not possible using the user-exit you have provided.

Please see the notes provided by SAP:

Notes

Note that only the input fields in dictionary structure REG30_I_AC and REG30_ZW_I for register data, may be changed in this function module.

If you want to use one of the constants listed above, you must install include IEE07ACTION.

It is not possible to prepopulate the period consumption or meter reading result fields.

Thanks,

Srini

0 Kudos

hi!

Thanks A LOT for your answer.

But I see in this exit, table xy_zw_input has field Period consumption

if in the exit do this:

LOOP AT xy_zw_input INTO w_register.

     w_register-perverbr = '8'.

     w_register-anzdaysofperiod = '365'.

     w_register-tarifart = 'KWH'.

     MODIFY xy_zw_input FROM w_register INDEX sy-tabix

   ENDLOOP.


In the screen field Tarifart IS MODIFIED , ONLY THIS FIELD.


For this, I think that it must be possible...



Do not you think?


Many Thanks.

0 Kudos

Hi!

In program SAPLE30D, include LE30DF03, form CUSTOMER_SUGGESTION, is the exit EXIT_SAPLE30D_001.

In this exit period consumption is assigned:

Action = 01 -> install

But later, in the screen of transaction EG31, only show the field TARIFART, not field PERVERBR and ANDAYSOFPERIOD-

I need your help please!

Thanks!

0 Kudos

Hi Indi,

Even though technically if you perform this modification, SAP standard will not use this due to 'standard' data consistency reasons.

If you want to understand why then you can debug the code - LE30DF03 from EG31, set break-point at the place after the user exit is called i.e. after 'CALL CUSTOMER-FUNCTION '001', there the structure  cust_zw_input is used to get the values modified by the user-exit.

Here standard SAP only considers 'allowed' changes ahead.

Please see the below code snippet:

Can you please re-visit your business requirement as to why you need to default this? Based on the requirement you can possible have an additional step to update the Periodic consumption using separate custom program/process (may be)

Thanks,

Srini

0 Kudos

Hello Srini,

But if I write the Period Consumption in transaction EG31, it is saved correctly.

Manually I can write this field. And I can see in transaction EL56.

I think there must be something in the code to modify the period consumption with X value.

Do you Agree?

Modify value in EG31

See value in EL56

Thanks a lot!

Regards.

0 Kudos

Hi Indi,

I think I found what the issue is here, I have tested this myself in our dev system here in debug mode and found that the issue is with the standard code where it uses 'MOVE-CORRESPONDING zw_input_wa TO zw_input_i.' here the field names are not matching and hence the user-exit values for periodic consumption (PC) is not considered.

In user-exit we set the PC to field PERVERBRO, but after this call the field name in the structure  zw_input_i is PERVERBR which is not same and hence its not populating the PC values.

But again I have populated the values during debug mode and even then the values are not considered and not shown in the display - this could be because the structure -  xy_disp_input is not having our PC field.

I think you can raise OSS message with SAP to check what they say.

Alternatively you can check to populate this PC after this step and introduce a new step (either standard way or custom program) as I suggested earlier.

Hope this helps 🙂

Thanks,

Srini

0 Kudos

Hi!!

The field is PERVERBR, and it is in structure zw_input_wa.

but In screen field PERVERBR is empty

the value field is in :

is cleared in CALL SCREEN co_dynnr_install.

in the module MODULE pbo_consumption_subscr.

is cleared in  ISU_GET_CONSUMPTION_INSTALL

if You fill again this field, in screen el31, show the period consumption!!!!

What I can do?

Thanks a lot!

0 Kudos

Hi Indi,

I think you got the answer from our analysis above, SAP is not allowing you to change the PC in the user-exit!

Please use different approach rather then relying on the user-exit EXIT_SAPLE30D_001.

A) A separate program to populate the PC after the 'Full Installation' i.e. to do EL56

B) Implement explicit enhancement in the FM - ISU_GET_CONSUMPTION_INSTALL  -check whether the current call is from EG31 and then populate the PC here - this is not the ideal solution and carries risk with it.

C) Raise OSS message and check what SAP says in this regard - why user-exit changes are not considered - but in the FM documentation it clearly says changes to PC are not allowed.

Thanks,

Srini