Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3212

Validation for MIRO not working

$
0
0

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


Viewing all articles
Browse latest Browse all 3212


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>