Skip to Content
Author's profile photo Former Member

To add validation for vendor accounts in MIRO t-code

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 –

Capture1.JPG

Capture2.JPG

Step 3:

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

Capture3.JPG

The class has following parameters:

Capture4.JPG

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 –

Capture5.JPG

Result-

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

Capture6.JPG

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.

Assigned tags

      10 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Pablo Casamayor
      Pablo Casamayor

      Hi,

      please consider as well Erika Szanto´s answer in this thread:

      Vendor with Multiple Bank Account in MIRO | SCN

      and this thread too:

      Error message issued using BADI MRM_HEADER_CHECK appears more than once

      Best regards.

      Author's profile photo Former Member
      Former Member

      Really a very good document.. very helpful 🙂

      Author's profile photo Former Member
      Former Member

      Good work..helpful!!!

      Author's profile photo Venkat Aileni
      Venkat Aileni

      Very well presented with appropriate steps and description -Well Done!

      -Venkat

      Author's profile photo Former Member
      Former Member

      Nice Work , Rashmi .. helpful !!!

      Author's profile photo Former Member
      Former Member

      Good work Rashmi..Very helpful document !!!!

      Author's profile photo Former Member
      Former Member

      Nicely Explained step by step.. 🙂

      Author's profile photo Former Member
      Former Member

      Hi,

      Nice One.

      Really helpful.

      Regards,

      Riju Thomas.

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      The above code lets the message to be displayed more than once. To overcome this please reffer the following link -

      https://scn.sap.com/thread/3469004

      Author's profile photo sheik abid
      sheik abid

      Nicely explained , very informative