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: 

Interest document not included as an open item in invoicing

shah_viraj
Active Participant
0 Kudos

Hi,

An interest document is posted while invoicing but it was not included in open item in DBERDL table. I checked in ERDB table where it shows the document type of this document is clearing document. Ideally document type in ERDB of this document should be "Print with invoice". The main sub of interest document is maintained in the configuration node of "Item selection in invoicing". Then also it does not included in DBERDL. what could be the reason?

Thanks

Viraj

1 ACCEPTED SOLUTION

shah_viraj
Active Participant
0 Kudos

Finally after lots of brain storming and debugging I found the cause of the problem. We have set interest frequency of 15 days in config. So, whenever, a final invoice is created within this interval of 15 days, once an interest document has posted, system does not calculate interest using FM ISU_INV_INTEREST_ACTION, so it is not included in table DBERDL. But, once the invoice is generated and posted in FICA, at the time of clearing system calculates and posts interest document which is not included in DBERDL as it is clearing document.

Special thanks to Amlan, for taking deep interest in the issue and try to give the resolution.

Thanks

Viraj.

View solution in original post

22 REPLIES 22

AmlanBanerjee
Active Contributor
0 Kudos

Hi Viraj,

I think the interest document was cleared by any outstanding payment on account/credit in the account maintenance run during invoicing.

Are you finding any anomalies out there in the account maintenance run?

Thanks,

Amlan

0 Kudos

I appreciate your reply Amlan, but unfortunately this is not the case here. The interest document generated during invoicing is still open and not clear.

However, to my wonder, the interest document is generated as a clearing document to other open items. So, I think due to this it is not considered in print line items in invoicing. But if I want it to be considered in print line items then what to do? And how to avoid the interest document being generated as a clearing document for other open items?

0 Kudos

Hi Viraj,

Are you doing account maintenance as part of invoicing ?

thanks,

Vikram

0 Kudos

Yes Vikram, account maitenance is done during invoicing

Thanks

Viraj

0 Kudos

Hi Viraj,

Is zero clearing happened for the interest document?

You can check that, if you take the interest document and go to DFKKOP, you will find two line items against the document number. One with clearing status with blank containing the full amount and another with clearing status as 9 with the amount field as 0.00

Also can you send me the screenshot for the Config. node 'Item Selection in Account Maintenance/ Define Sub-Items' where in you have maintained the main/sub tr for the interest document.

Thanks,

Amlan

0 Kudos

Thanks Amlan for your interest in my solving my issue.

I checked in DFKKOP, there is only one record in DFKKOP when I passed interest document number in DFKKOP-OPBEL which is a non zero item with clearing status not equal to 9. Also, when I passed interest document number in DFKKOP-AUGBL, I get more than one records which are cleared.

Please find attached screenshots.

Thanks

Viraj.

0 Kudos

Hi Viraj,

Checked your screenshots and so if the Interest document  that is getting generated during invoicing is clearing some of the Open credits (even if its partial), then it should have a clearing document type as C in ERDB table.

In table DBERDL,I think you will have this document under the line item type 'ACCMNT' and the field 'Line Item posting relevant' will be blank.

Please revert back if your thoughts differ.

Thanks,

Amlan

0 Kudos

Hi Amlan,

Here interest document is not clearing open credits, it is actually being passed as account maintenance document. If you look at the screenshot that I have attached once again here, it has both credit and debit document which are being cleared when I pass interest document in DFKKOP-AUGBL.

Moreover, Yes it is having document type C in ERDB.

But, when I passed interest document number in DBERDL-CA_OPBEL, I did not get any entry in table DBERDL.

0 Kudos

Hi Viraj,

Is the genuine interest document getting posted during invoicing in the first place?

If there is an interest document getting posted during invoicing as per standard functionality, then you will have a new line item type INTDEB. Is it happening?

Moreover, have you maintained the following configuration-

IMG--> SAP Utilities --> Invoicing --> Invoice Processing --> Item Selection in Invoicing --> Item Selection in Account Maintenance/ Define Sub-Items

In the part "Item Selection for Bill Printout (Subitems)" you'll find the field "Int".


This needs to be ticked for combination of Clearing type, Clearing category, Main Tr. and Sub Tr. as well for calculating interest during invoicing


The interest functionality during invoicing happens in the FM,ISU_INV_INTEREST_ACTION.

If the processing of the FM is working fine, then it should generate a interest document with line item type INTDEB.

Hope it helps...

Thanks,

Amlan

0 Kudos

Hi Amlan,

I checked the configuration, int field is ticked. But as you said I couldn't find any line item posted with line item type INTDB.

Thanks

Viraj

0 Kudos

Hi Viraj,

Have you checked whether the FM, ISU_INV_INTEREST_ACTION, is getting triggerred during the invoicing run?

You can put a breakpoint and check of the same during the generation of Invoice through EASIBI.

FM,ISU_INV_INTEREST_ACTION, does all the checks and then posts the interest document by calling the FM, FKK_OPENITEM_POST_INTEREST_DOC.

I think you will be able to find it out by debugging this FM.

Thanks,

Amlan

0 Kudos

Hi Amlan,

The case which I have posted here is of Production server. Some how, this issue does not come up every time, so I am not able to re-generate the scenario in Quality server to debug the FM.

Thanks

Viraj.

0 Kudos

Moreover, I found that interest document has origin key R4(Invoicing) instead of 29(Interest Posting). So, I think it is not posted with FM ISU_INV_INTEREST_ACTION.

Thanks

Viraj

0 Kudos

Hi Viraj,

As per my knowledge goes, if any document is posted during invoicing, it will have an origin key R4.

This applies for posting interest document through standard Configuration or through enhancement in event R402.

The issue that you are facing,is it a one-off issue? or there are quite a lot of accounts which are having this same scenario.

Moreover, if you are not able to replicate the same in QA, I would recommend you to raise an OSS for SAP team to check .

Thanks,

Amlan

0 Kudos

Hi Amlan,

Other interest documents which are posted with invoicing and not having this issue is having origin key 29.

Yes this issue comes in mostly final move-out invoicing only. I have raised parallel to SAP also.

Thanks

Viraj

0 Kudos

Also, Amlan if you check code of FM ISU_INV_INTEREST_ACTION, in CALL FUNCTION FKK_OPENITEM_POST_INTEREST_DOC , I_HERKF is passed as '29' constant. So, document posted with ISU_INV_INTEREST_ACTION must have origin key 29 only.

Thanks

Viraj

0 Kudos

Hi Amlan,

I raised OSS, but SAP replied me that there is no issue with standard program

Thanks

Viraj

0 Kudos

Hi Viraj,

Have you checked if there are any implicit enhancements which have been developed previously are responsible for the issue.

I think, you have to replicate the issue in QA first and then take it from there.

Thanks,

Amlan

0 Kudos

Hi Amlan,

I tried to reproduce the case in QA system, but I failed. Every time I generate a final move-out invoice, it calculates interest and post it in DBERDL table also, but in production it does not happen.

Thanks

Viraj.

0 Kudos

Hi Viraj,

Its sounds really wierd.

When you raised the OSS, has SAP checked the behavior of the generation of the Interest document in Prod?

I think you have to give two test cases to SAP- One happening in QA (Which is right) and another in Pro; assuming the two SAP Systems are in sync (from Code and Configuration point of veiw)

Then check, what SAP has to suggest.

Thanks,

Amlan

0 Kudos

Hi Amlan,

I tired to create scenario in QA and sent to SAP. Actually I could not generate the same test case as in Production. In production I face issue while doing final move-out invoice. In QA, I was able to generate test case for periodic invoice.

Here is what SAP has to say on my test case given for QA:

I created invoice  300000031418 and and the related

clearing document 11000061311 which have the transaction 0040. It's

referring to the open items considered for invoicing. It turns out

that these open items are not qualified for the interest process

during invoicing for some reason (mostly credit amount) although

the customizing for interest calculation seems to be OK. This happens

in FORM CHECK_ITEMS in function FKK_OPENITEM_POST_INTEREST_DOC

(coding part *selection criteria debit/credit, open/cleared*) which is

called out of ISU_INV_INTEREST_ACTION. That is the reason for not

printing interest items onto the invoice. Now, the new interest

document created during invoicing and having the transaction 0040 is

created during FICA interest calculation and due to your customizing

settings for "Interest Calculation Used with Clearing"

(TFK000C-XZIAU). This flag is set and thus, clearing

document  11000061311 with transaction 0040 was created. This item

can't be printed onto the invoice since it is created after the

invoicing process is already finished. It is created during the final

FICA posting process due to your customizing settings. The customizing

path is:

/nficaimg

Contract Accounts Receivable and Payable

- Basic Functions

-- Postings and Documents

--- Basic Settings

---- Maintain Central Settings for Posting

------> "Interest Calculation Used with Clearing"

docu: "Specifies that items are checked during clearing and that

interest is calculated if required. If the indicator is set, the

function module FKK_SAMPLE_2055 (Check Items for Interest calculation)

is set."

Moreover, Your customizing setting for "interest calculation

during invoicing" (table TE502) the flag XINT_DEB was set to X

meaning "debit interest" only. Thus, I recommend to check out the

value B "debit and credit item" here.  It could be that the result

fits to your requirements and expectation then.

Thanks

Viraj

shah_viraj
Active Participant
0 Kudos

Finally after lots of brain storming and debugging I found the cause of the problem. We have set interest frequency of 15 days in config. So, whenever, a final invoice is created within this interval of 15 days, once an interest document has posted, system does not calculate interest using FM ISU_INV_INTEREST_ACTION, so it is not included in table DBERDL. But, once the invoice is generated and posted in FICA, at the time of clearing system calculates and posts interest document which is not included in DBERDL as it is clearing document.

Special thanks to Amlan, for taking deep interest in the issue and try to give the resolution.

Thanks

Viraj.