Ansicht
Dokumentation

MRM_CHECK_INVOICE - BAdI: Check Invoice Data

MRM_CHECK_INVOICE - BAdI: Check Invoice Data

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the Invoice Verification (MM-IV) component. You can use this Business Add-In (BAdI) to perform your own customer-specific checks of header and item data in an invoice document.

Depending on the results of these checks, the system can raise messages and prevent actions such as posting supplier invoices. For a complete list of actions, see below.

The following list contains only parameters that require additional information.

Import Parameters:

  • HEADERDATA: Contains the header data.
  • ITEMSWITHPOREFERENCE: Contains the item data of items with a purchasing document reference.
  • GLACCOUNTITEMS: Contains the item data of G/L account items.
  • CONSIGNMENTITEMS: Contains the item data of consignment items.
  • ACTION: Indicates the action during which the BAdI is called.

Changing Parameters:

  • MESSAGES: Table of messages from the BAdI that are to be added to the log.

The BAdI MRM_CHECK_INVOICE_CLOUD is called in many different steps of the invoice processing. The call point is made available in the BADI using the importing parameter ACTION. This enables you to decide in detail for which process a message is to be issued.

The following actions are supported:

  • Check: This action is executed when checking an invoice. If messages are added during this phase, users can see them in the log while they are entering an invoice. Error messages added in this action also prevent the actions Post and Save as Completed.
Please note that the Check action is only called after the basic checks of the supplier invoice have been passed. Especially the company code, invoicing party, currency, posting date and invoice date must be specified for the Check action to be called. In some processes, there must also be at least one invoice item.
  • Post: This action is triggered before an invoice is posted. Any error messages issued in this phase prevent the invoice from being posted.
  • Hold: This action is triggered before an invoice is held. Any error messages issued in this phase prevent the invoice from being held.
  • Park: This action is triggered before an invoice is parked. Any error messages issued in this phase prevent the invoice from being parked.
  • Save as Completed: This action is triggered before an invoice is saved as completed. Any error messages issued in this phase prevent the invoice from being saved as completed.
  • Simulate: This action is triggered during the simulation of an invoice. Error messages terminate the simulation.
  • Delete: This action is triggered before an invoice is deleted. Any error messages issued in this phase prevent the invoice from being deleted.

The header and item data is made available to the BAdI. Note that you cannot change the invoice data, you can only check it using this Business Add-In. If required, you can issue system messages using the MESSAGES table. These messages are then added to the application log and displayed to the user. Error messages in the application log prevent the saving actions such as Post, Park, Hold, Save as Completed and Delete.

If you want to inform the user about an error before performing a saving action, you can do so using the Check action. Error messages from the Check action do not prevent a user from holding, deleting and parking an invoice. If you want to have the same messages when parking, holding or deleting an invoice as during the check, you must issue the message again in the respective action.

You can use the BAdI to check if the reference number in the invoice header is within a certain range. If this is not the case, you can prevent the invoice from being posted by adding an error message during the Post action.

For more information, see the example implementation.






Addresses (Business Address Services)   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 4915 Date: 20240523 Time: 204220     sap01-206 ( 99 ms )