Purpose: understand the functionality of statistical posting and reversal
Standard behavior:
- For statistical posting in T-code F-38 has always a special design in the SAP standard
1st line of the document: customer line (BSEG-BUZID = 'A') 2nd line of the document: clearing line.
The standard FI transaction F-38 can only create such a statistical document with exactly two lines in just this sequence. - Reverse statistical posting in T-code F-19 is exactly based on this design. It expects the 1st line as customer and the second line as clearing line. If this is not fulfilled, the document can't be regarded in F-19. Normally it's always fulfilled in the SAP standard.
Additionally, If you created your own kind of statistical document via BAPI or other functionality which doesn't fulfill this design conditions, then error F5345 can occur.
Hence please regard the necessary design of statistical documents and create them with just two lines in the described sequence.