Replace the Document
The cause of this error is varied. One of the common reason is that PS Cash Management is active in the involved business area and the error FI057 is occurring due to technical limitation of 999 lines being reached. This limitation in this case refers to the number of PS-Cash relevant lines for the related FI document.
Within PS cash management, all cash relevant lines are split into more lines corresponding the number of lines in the FI document containing receivables against debtors or payables against creditors. This splitting is necessary to distribute the cash relevant lines over the lines of receivables or payables This can lead to a high number of lines in the cash document. So the lines in your invoice will result in a greater number of lines in the corresponding FI document for PS-Cash.
However here is a technical limitation of 999 lines to an FI document, which cannot be exceeded: if the above logic causes this to occur, then system error FI057 is output. This is a standard restriction and cannot be avoided if the size of the invoice and the number of associated debtors and creditors lead to these 999 lines being exceeded.
First check if SAP note 1516294 has been implemented. If not, the note should be implemented first. This note corrects a specific scenario where the error message FI 057 is issued -inappropriately-, however the note does not (and cannot) change the underlying restriction as per the above.
Please note that there is no way to change the above logic or exceed the aforementioned limitation in the standard. In order to be able to post the invoice, the
following workarounds can help:
the preferred solution is ensure that several smaller FI documents are created instead of one single document with so many lines, in order to avoid this high overall number of cash document lines per FI document. This would involve splitting the invoice into several smaller invoices to be processed separately.
a short-term workaround which can enable you to process a particular invoice is to temporarily switch off PS-Cash Management, carry out the action (i.e. post the invoice), and then switch PS-Cash Management back on again. The side effect is that the corresponding PS-Cash information is missing and therefore the PS Cash reporting figures will not be correct (anything that was posted during the time that PS cash was not active for this company code will not appear in the PS Cash reporting figures). There are no other side effects to switching PS Cash off temporarily.
You deactivate/activate PS cash via transaction OPI6:
– to deactivate PS cash you must run transaction OPI6, remove flag “active” next to the relevant Company Code, then save.
– to activate PS cash again, proceed as above, set the flag and save.
If you think the document you post may not lead to 999 lines which is causing the error, then you can set a breakpoint in the following program LFMPRF0M FORM GET_DATE:
DELETE ADJACENT DUPLICATES FROM W_T_ZHLDT.
DESCRIBE TABLE W_T_ZHLDT LINES L_CNT_TOTAL. “650912
L_CNT_TOTAL = L_CNT_HIGH * L_CNT_TOTAL.
IF L_CNT_TOTAL > ‘999’.
MESSAGE E057(FI) with ‘IN LFMPRF04: GET_DATE’.
-> check the value of L_CNT_TOTAL. This is the number of lines which woud be created for PS Cash. If this exceeds 999, then the error is output.