I am facing an issue related to Promise to Pay (P2P).
We are using FP2P1 to create P2P. The open items listed in FP2P1 creation screen appear to be sorted based on net due date (ascending), document number( ascending), amount (descending). The user selects the open items from the top and downward, until the promised amount is exhausted. When the payment is posted, the clearing sequence configured in the clearing variant is that first by the cash discount due day (ascending), division (ascending) and main transaction (ascending). Therefore, the payment would clear the items that not included in the P2P, however, the fulfillment is calculated based on the each P2P item's clearing status. For example, the customer has promised to pay $200. P2P includes document A, B, C for the total of 200. The customer paid $200 before the check date. However, the payment has cleared document A, D, E. When the P2P is evaluated, it is not fulfilled because only document A is cleared.
I would like to sort open items in the FP2P1 creation screen in the sequential order that is consistent with our clearing rule. I checked event 182 to 191, but not sure if one of them is called at time of open item selection. Do you think it is possible to add open item sorting logic in event 187?
Thank you very much for your help.