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: 

Merging manual bill with periodic bill always

Former Member
0 Kudos

Hi Experts,

We want to merge manual bill with periodic bills always. Our requirement is this if there are only manual bills for a CA then this CA should not be process for invoicing.

Regards,

Ankur

1 ACCEPTED SOLUTION

srinivasankh
Contributor
0 Kudos

Hi Ankur,

Solution for your scenarios is to implement a custom logic in event (from FQEVENTS) R403. If you have not already implemented custom FM in this even then simply create a new custom FM by coping standard FM ISU_SAMPLE_R403 and implement the below logic:

Table parameter T_EITR will have all the bill documents which are now selected for Invoice, here you can check which ones needs to be eliminated.

A) In your case if there are only Manual Bill Docs (ABRVORG = 06 )- you have to stop invoicing - for this you just have to clear the field E_GROUP for all the entries in the table T_EITR.

B) If you want to merge manual bills with periodic bills always - then you have to assign a same group number in E_GROUP in the table T_EITR - this will then produce invoice merging those Bill Docs

Even though you can control using Contract level JI indicator GEMFAKT, implementing this event will override and you have the control.

Hope this helps, let me know if you have any other scenario or the above solution doesn't work!

Thanks,

Srini

SAP IS-U Consultant

View solution in original post

5 REPLIES 5

Former Member
0 Kudos

Hi Ankur,

You can utilize event  --> R403 -Invoicing grouping for those processes.

May be you can seperate , manuel billings by using document type and raise an error popup .

Regards,

Ahmet Önder ÖZBEK

0 Kudos

Hi Ahmet,

Thanks for your reply!

I have check this event R403, here we have a structure T_EITR where we can check if manual bill is passed with periodic bill or not.

Here after this check, I deleted the T_EITR sturcture if it manual bill is there without periodic bill

Now for testing i passed two contract account (ex. 100 & 200) using tcode EA10 and getting the below error message for CA 100 (my requirement was if only manual bill is there then this will not invoiced and after the EITR deletion i got the same functionality)

Incorrect table in event R403 returned (CA 210000000607)

And CA 200 is invoiced successfully.

Kindly suggest if the changes are done correctly.

Regards,

Ankur

0 Kudos

Hi,

Of course it works , but instead of deleting T_EITR for CA 100 , you can loop and if you have manuel billing you can loop for TT , if   sy-subrc ne  0 you can raise your error.

If you ask me ,standart system error , below  ,does not seem good ,

Regards,

Ahmet

Former Member
0 Kudos

Hi Ankur - You can use "Joint Invoicing" functionality while creating the Manual billing document. 

When you set the "Joint Invoicing" Flag, manual bill cannot be invoiced separately but it requires a consumption billing document to get invoiced jointly.

Refer to table: ERCH for the field: N_INVSEP

Hope it helps.

Thanks,

Rakesh

srinivasankh
Contributor
0 Kudos

Hi Ankur,

Solution for your scenarios is to implement a custom logic in event (from FQEVENTS) R403. If you have not already implemented custom FM in this even then simply create a new custom FM by coping standard FM ISU_SAMPLE_R403 and implement the below logic:

Table parameter T_EITR will have all the bill documents which are now selected for Invoice, here you can check which ones needs to be eliminated.

A) In your case if there are only Manual Bill Docs (ABRVORG = 06 )- you have to stop invoicing - for this you just have to clear the field E_GROUP for all the entries in the table T_EITR.

B) If you want to merge manual bills with periodic bills always - then you have to assign a same group number in E_GROUP in the table T_EITR - this will then produce invoice merging those Bill Docs

Even though you can control using Contract level JI indicator GEMFAKT, implementing this event will override and you have the control.

Hope this helps, let me know if you have any other scenario or the above solution doesn't work!

Thanks,

Srini

SAP IS-U Consultant