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 can I read service line conditions price when saving the Purchase Order

Former Member
0 Kudos

People,

We need to validate the service line condition price when saving a Purchase Order.

I checked the EXIT_SAPMM06E_012 (that is called when saving PO), but it does not contain the line services nor service line conditions in parameters.

To get the line services I used 'MS_READ_SERVICES' function module (as I found here in forum). But I could not find a way to get the conditions price for each line service when saving the PO.

Could you help me?

Thanks a lot!

4 REPLIES 4

Former Member
0 Kudos

If you want to validate price against specific Condition Type then go for Custom Condition Routine through VOFM. This custom routine can be assigned to Pricing Schema for PO.

0 Kudos

Hello Amol,

I would like to check if a certain condition in service line was included and its value.

But I need to do it, when saving the Purchase Order.

0 Kudos

You can create BADI ME_PROCESS_PO_CUST Implementation. Look for CHECK or POST methods, parameter IM_HEADER.

This parameter is of type IF_PURCHASE_ORDER_MM.

You can call method GET_CONDITIONS inside the BADI methods CHECK or POST.

call method IM_HEADER->GET_CONDITIONS

importing EX_CONDITIONS = lt_cond.

Here lt_cond will have all header conditions.

If you want item conditions then, call method GET_ITEMS to get all items in PO. It will give you instance of all items where in you can call method GET_CONDITIONS for one item at a time and validate data as required.

0 Kudos

Hello Amol,

I already tried to use this BADI, but I does not work fine with line services.

I need the get_conditions method related to line services (and not in item).