Skip to Content

Validation for MIRO not working

Hi Experts,

We have below requirement.

If PO starts with 45, User is X, Tcode is MIRO then,

Check Amount is greater than 100000. Throw error.

So i wrote below validation initially.

BKPF-TCODE IN INVOICE_TCODE AND

BKPF-USNAM IN USERNAME_DM

AND BSEG-EBELN LIKE '45*'

Check

BSEG-WRBTR <= '100000.00'

This worked. But problem was, when you simulate the MIRO, you see many line items. It considers amount of GR line item. Now say there are 10 GR line item each of 90000. so total is 9,00,000. System consider each item below 1,00,000 and allowed to post the MIRO.

So i wrote another Validation as below to consider amount of header, i.e. Vendor total rather than GR IR

BKPF-TCODE IN INVOICE_TCODE AND

BKPF-USNAM IN USERNAME_DM

AND BSEG-EBELN LIKE '45*'

Check

BSEG-HKONT = '99218' AND BSEG-WRBTR <= '100000.00'

This started working fine as expected. But upon doing negative testing for PO greater than 1,00,000. it failed. Testing was we changed the amount from 1,00,000 to 2,000 in line item and also quantity. so now total amount is 2000. But still it is giving error message of amount is greater than 1,00,000.

My requirement is to consider the total of amount posted in MIRO.

Please guide.

Regards

Zunaid

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Dec 05, 2015 at 11:58 AM

    Use Exits in check and define your own logic. See also Creating user exits for substitutions - ERP Financials - SCN Wiki. Works in the same way for validations.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.