This blog post provides detailed information about the process of importing pain.002 with rejected incoming or outgoing payments using the standard report RFEBKA00 (transaction FF_5). It focuses on the technical aspects of the solution, rather than the customizing which is described in the prerequisite notes.
Pain.002
Pain.002 or payment status report is a log containing the actual
status of payments
(e. g. rejection, acceptance) submitted by SEPA Credit Transfer (pain.001) or SEPA Direct Debit (pain.008).
Process Flow
The diagram below shows a simplified process from invoice creation to reversal via a pain.002 status message.
Note:
Step 4.a. is only executed when you receive the pain.002 file.
If you don’t receive pain.002 file, there is no need for the reversal (step 4.a. is skipped), and the process finishes with the CAMT.053 upload.
Prerequisites
The necessary customizing for this solution is described in the prerequisite notes
1957980
and
2311257.
Outgoing files that are sent to the bank must be generated from the SAP system. They must contain the information necessary for finding the correct payment document that is supposed to be reversed from the RFEBKA00 import of pain.002. What information and how it is used will be described below.
Only Rejected Items
As mentioned in the SAP note
2311257,
using RFEBKA00 you are only able to process items of pain.002 with the status
Rejected.
That means there must be at least one item with such status.
Please note that RFEBKA00 only serves to reverse rejected payments. If you require to process all information from pain.002, you should use the
Bank Communication Management solution
where you get an overview of all payments and where you can update statuses from pain.002.
How the payment document to be reversed is found
The purpose of the functionality is to reverse the payment document that was posted during the payment run so that it can be processed again. The payment document is found based on the following information from pain.002:
-
The tag
<OrgnlMsgId>
contains
<MsgId>
from the original payment file (pain.001 or pain.008) and this refers to the field REGUT-RENUM (Reference Number).
-
The tag
<OrgnlPmtInfId>
contains
<PmtInfId>
from the original payment file and this represents a payment batch within the payment file. Later we will explain how exactly the system does the search.
-
The tag
<OrgnlEndToEndId>
contains
<EndToEndId>
from the original payment file and it points to the payment document number posted during payment run. This payment document number is supposed to be reversed based on the rejection information in pain.002. The EndToEndId in the pain.001 and pain.008 is filled with the Internal reference from the Note to Payee (OBPM2) which is the payment document number.
-
A prerequisite for this is that the payment documents are exported to the cluster table RFDT during the payment medium creation (export to RFDT is described in the next chapter). The export is done by calling the function modules DMEE_EXIT_SEPA_21, DMEE_EXIT_SEPA_31 and DMEE_EXIT_SEPA_41.
Note:
This prerequisite is covered in the standard SAP delivered formats CGI_XML_CT and CGI_XML_DD (SAP Notes
Pedro Pascal
Se unió el 07/03/2018