Messages Handling in Purchase Order (ME21N/ME22N/ME23N) and Purchase Requisition (ME51N/ME52N/ME53N) Enhancements
May 21, 2022

Issue / Problem Statement?

SAP provides Enhancement Spot ME_PROCESS_PO_CUST to enhance Purchase Order Screens (Transactions: ME21N/ME22N/ME23N) and BADI ME_PROCESS_REQ_CUST to enhance Purchase Requisition Screens (Transactions: ME51N/ME52N/ME53N). The ABAP MESSAGE statement does display or push messages to the Purchase Order or Purchase Requisition Screen.

Solution

We have to use SAP standard macro for Purchasing Document Message Handling.

  • Load Macros definition by including MM_MESSAGES_MAC
  • Use macro MMPUR_MESSAGE_FORCED to add messages to Purchasing Document Message Handler
INCLUDE mm_messages_mac. "useful macros for message handling

mmpur_message_forced sy-msgty sy-msgid sy-msgno
                           sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.