05-16-2011 2:46 PM
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!
05-16-2011 7:23 PM
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.
05-16-2011 8:52 PM
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.
05-16-2011 10:54 PM
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.
05-17-2011 1:16 PM
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).