2015 Nov 02 11:30 AM
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
2015 Dec 14 6:23 AM
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.
2015 Nov 02 8:42 PM
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
2015 Nov 03 4:26 AM
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?
2015 Nov 05 3:58 PM
Hi Viraj,
Are you doing account maintenance as part of invoicing ?
thanks,
Vikram
2015 Nov 05 4:02 PM
Yes Vikram, account maitenance is done during invoicing
Thanks
Viraj
2015 Nov 06 3:33 PM
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
2015 Nov 07 5:36 AM
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.
2015 Nov 09 12:06 PM
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
2015 Nov 09 3:22 PM
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.
2015 Nov 10 8:36 PM
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
2015 Nov 14 4:56 AM
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
2015 Nov 16 10:47 AM
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
2015 Nov 17 5:06 AM
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.
2015 Nov 17 7:13 AM
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
2015 Nov 17 1:21 PM
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
2015 Nov 18 4:29 AM
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
2015 Nov 18 4:35 AM
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
2015 Nov 30 2:09 PM
Hi Amlan,
I raised OSS, but SAP replied me that there is no issue with standard program
Thanks
Viraj
2015 Nov 30 8:58 PM
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
2015 Dec 04 5:13 AM
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.
2015 Dec 07 5:39 PM
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
2015 Dec 08 5:48 AM
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
2015 Dec 14 6:23 AM
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.