Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to check PO amount at run time and trigger error message ?

santanunayek
Explorer
0 Kudos

Hello Everyone !!

My requirement is to validate PO pricing amount with PR pricing amount. Please check the below image. As you can see that

Gross Price is 1,000.00 INR which is same as corresponding PR amount. But if it is not then i have to trigger an error message. So, please suggest me the BADI or EXIT which i should use to solve the problem.

with best regards,

Santanu Nayek

1 ACCEPTED SOLUTION

pavanm592
Contributor
0 Kudos

Hi Santanu,

You can do it with BADI ME_PROCESS_PO_CUST

In method Process Item you can get the item data by using the reference of the interface

DATA: ls_item TYPE mepoitem.

lsitem = im_item->get_data( ).


after getting the item data you can compare the price with PR by fetching it from EBAN table


Check it once and revert.


Regards,

Pavan

6 REPLIES 6

pavanm592
Contributor
0 Kudos

Hi Santanu,

You can do it with BADI ME_PROCESS_PO_CUST

In method Process Item you can get the item data by using the reference of the interface

DATA: ls_item TYPE mepoitem.

lsitem = im_item->get_data( ).


after getting the item data you can compare the price with PR by fetching it from EBAN table


Check it once and revert.


Regards,

Pavan

0 Kudos

But how to fetch the price field data , field is KOMV-KBETR .

0 Kudos

Hi,

Do like this you can get the conditon records.

data : lt_komv type MMPUR_TKOMV.

lt_komv = im_item->GET_CONDITIONS( ).

Regards,

Pavan

0 Kudos

Thank you Pavan.


the problem is that the method process item is not triggered when i am trying to change the value of that field.


Regards,

Santanu Nayek

0 Kudos

Hi ,

Put a break point in the process item and change the amount and click enter then the badi gets triggered.

you need to activate the badi implementation. one more thing you cannot have multiple implementations for this BADI,

Did you created an implementation for ME_PROCESS_PO_CUST ??? if yes check what is the status of your implementation

is it The implementation will be called status?

Regards,

Pavan

0 Kudos

Sorry it was my mistake it's working fine. I will get back to you later.

thanks for your cooperation.

regards,

santanu