Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

MIRO T-code:

It is used for entering vendor invoice details received into SAP for incoming Invoice in SAP. All invoice details such as basic data, payment details, tax details etc. can be entered using this t-code. Once the user has input the details of the invoice at the basic data, he will go to the payment tab; there is a small icon to choose the bank account for the vendor.

Because of overlook of this icon (if there are multiple bank accounts or not), user may end up with failed wires (wrong currency paid to the bank account) and this may result in bad consequences as vendor received lesser $ for the exchange rate different.

Requirement:

To display a warning/information message if the vendor has more than one bank account, so that the user can select the correct bank account from payment tab.

Solution:

Once a user enters a Date, PO number and hits ENETER

The system will check in background whether the relevant vendor has more than one bank account or not from Table LFBK

If that vendor has more than one BANK account in table LFBK, a warning popup will be displayed.

For this the BADI ‘MRM_HEADER_CHECK’ was implemented.

MRM_HEADER_CHECK:

Along with the checks in the standard system when entering invoices in the Logistics Invoice Verification, you can use the BADI MRM_HEADER_CHECK to execute customer-specific checks for header and item data of an invoice document. Depending on the checks, the system may, for example, issue an error message or call other transactions.

Step 1:

Go to T-code se-18 and give the BADI name to be implemented.

Step 2:

Implement the BADI using Implementation option as below –

Step 3:

Implement the logic in your z implementation of BADI in following way –

The class has following parameters:

You can implement the logic in based on the vendor number (LIFNR) passed in I_RBKPV parameter.

·         Select the bank details from LFBK table based on LIFNR in an internal table.

·         Describe the internal table, if there are more than one no of lines, issue the relevant message.

Following is code implemented -

Result-

An information message is displayed if the vendor has more than one bank account as below:

Due to the warning message the user will be warned of existing accounts of vendor so that he can check if the correct currency paid to the bank account before final posting.

11 Comments