Skip to Content
Author's profile photo Tobias Reiner Dolgener

Debugging tips: How to analyze error message F5 704?

Here are some hints on how to carry out an investigation, when the error message F5 704 “Inconsistent amounts” occurs.

Background

This error F5 704 is occurring, when an invoice is trying to be released to accounting via transaction VF02:

Error_message.gif

As can be seen from the F1 help text itself, the error is caused because the characteristics of the amount (positive/negative) to be posted does not fit to the used Credit/Debit indicator (SHKZG).

If this indicator is S (= Debit) than the amount can not be negative, whereas when it is H (=Credit), than it can not be positive.

The component to create a SAP Support message is usually SD-BIL-CA. However the error can be caused as well by the polish downpayment procedure with function module ID_PL_DOWNPAYMENT.  In this case the country specific component XX-CSC-PL-LO would have to be chosen,which is for Poland.

At the very beginning this latter case has to be taken into consideration, if currency used is PLN and the mentioned function module is executed in the release to accounting process.

Analysis procedure

1. Check because of what the error message is raised

The first step is to check, for which line item the error occurs, and which SHKZG is involved. To see this a break point at the error message itself should be set:

F5704.gif

By checking the fields of the two structures ACCIT_FI and ACCCR_FI you get the information what inconsistency occurred. In the above example for customer line with a debit indicator (ACCIT_FI-SHKZG = S) an amount (ACCCR_FI-WRBTR) is tried to be posted, which is negative. This is not allowed, therefore the error message is raised.

2. Check for changes of the amount / posting key

Usually such an error is caused by custom own modifications in user-exits. To find out, changes of the relevant line (POSNR) for which the error is given, has to be monitored starting in function module RV_ACCOUNTING_DOCUMENT_CREATE. In most cases the change occurred in exit 8:

Before_Exit_8.gif

Here it can be seen that before the user-exit is called, the value of the first line is still 4072.79.

After the exit is processed, this had been changed, and the new value is -0,03:

After_Exit_8.gif

The call stack looked like this:

Call_Stack.gif

What influences the amount and the credit/debit indicator can be different. In other cases another user-exit of the SD/FI interface was responsible. In EXIT_SAPLV60B_002 some customers changed the posting key XACCIT-BSCHL, which led to a different ACCIT_FI-SHKZG (H instead of S) and as a result again F5 704 because amount and indicator did not fit together.

Conclusion

The error message F5 704 can have different causes, in the past most often custom own manipulations of the amount in the user-exit EXIT_SAPLV60B_008 had been responsible.

If the polish downpayment functionality is used, then it will have to be checked with a break point in function module ID_PL_DOWNPAYMENT if therein values are changed. Several notes exist in this case, but if it gets complicated a SAP Support message will have to be created with the component XX-CSC-PL-LO.

Assigned Tags

      12 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Tobias Reiner Dolgener
      Tobias Reiner Dolgener
      Blog Post Author

      Any comments are welcome. 🙂

      Did you encounter this error message? Is the description of the investigation with the help of debugging clear enough?

      Author's profile photo Jyoti Prakash
      Jyoti Prakash

      Diagram or screenshot shared on the document are not visible. It might be b'coz you are using sapjam.com to share those. Can you re-post them.

      If this indicator is S (= Debit) than the amount can not be negative, whereas when it is H (=Credit), than it can not be positive.

      In addition to that as it involves change/enhancement related to accounting entries/principle also, views & comments of people related to SAP ERP Financials, would have been desirable.

      Thanks, JP

      Author's profile photo Tobias Reiner Dolgener
      Tobias Reiner Dolgener
      Blog Post Author

      Hi JP,

      you were right, the pictures were only visible on SAP Jam.

      Now it should work.

      Thanks for your hint!

      Best regards,

      Tobias

      Author's profile photo Suman Sardar
      Suman Sardar

      Thanks for sharing!

      It will help the functional to Debug and findout the reason.

      Author's profile photo Srinu S
      Srinu S

      Thanks for sharing. Useful document.

      Srinu.

      Author's profile photo Former Member
      Former Member

      Hi  Tobias,

      Thanks for sharing, in the first step what is the  t code used,it will help first timer like us to understand in a better way.Because these kind of blog are read by everyone , so request to kindly share the step by step details.

      Thanks

      Sukant Chakraborthy

      Author's profile photo Tobias Reiner Dolgener
      Tobias Reiner Dolgener
      Blog Post Author

      Hi Sukant Chakraborthy,

      thank you for your suggestion, I have added the transaction code VF02 in the text of the blog.

      Best regards,

      Tobias                     Debugging tips: How to analyze error message F5 704?

      Author's profile photo Siva kumar Devana
      Siva kumar Devana

      a good point with respective function modules.

      Author's profile photo Tobias Reiner Dolgener
      Tobias Reiner Dolgener
      Blog Post Author

      Thanks!

      This blog is also a kind of looking behind the scenes, and shows how SAP Support is carrying out investigations.

      With some good technical capabilities in debugging, and using the information shown here, the root cause analysis can be conducted successfully.

      Author's profile photo Matthew Billingham
      Matthew Billingham

      I strongly recommend that the "new" (since 2004) debugger be used, as it is more powerful and is continually being developed.

      Author's profile photo John Vo
      John Vo

      Thanks, it help me solve my problem.

      Author's profile photo Aman BENZAZA
      Aman BENZAZA

      Thanks a lot Brothers on SAP 😉

      Your explains are help us.