03-15-2011 10:11 AM
Hi all,
I'm trying to insert a new condition under a service line in a PO. This can be seen in ME23N under the services tab of the PO item. Then click on conditions (the button with the dollar and yen symbol).
I tried using the internal table POCOND and POCONDX. But these tables update the conditions of the PO item itself and not the service conditions. In ME23N this is the conditions tab of the PO item.
build condition item table
wa_conditem-change_id = 'I'.
wa_conditem-itm_number = wa_items-po_item.
wa_conditem-cond_type = c_condtypz.
wa_conditem-cond_value = l_plndisamt.
wa_conditem-currency = l_poheader-currency.
APPEND wa_conditem TO it_conditem.
CLEAR wa_conditem.
build condition item change parameter table.
wa_conditemx-itm_number = wa_items-po_item.
wa_conditemx-itm_numberx = 'X'.
wa_conditemx-cond_type = 'X'.
wa_conditemx-cond_value = 'X'.
wa_conditemx-currency = 'X'.
wa_conditemx-change_id = 'X'.
APPEND wa_conditemx TO it_conditemx.
CLEAR wa_conditemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = wa_ekpo_u-ebeln
TABLES
return = it_return
poitem = it_poitem
poitemx = it_poitemx
pocond = it_conditem
pocondx = it_conditemx
EXCEPTIONS
OTHERS = 1.
I tried using the internal tables POCONDHEADER and POCONDHEADERX but this doesn't seem to insert anything.
Can anyone guide me how to insert a new service condition?
thanks,
Shafiq
03-16-2011 12:24 AM
03-16-2011 3:38 AM
Found a SAP note 499626 quoted below. So it seems that it's not possible to use BAPI_PO_CHANGE.
"Can I create or change conditions on the service level with BAPI_PO_CREATE1 or BAPI_PO_CHANGE?
Answer:
Such a function is currently not available."
Anybody know any FM to do this?
Edited by: shafiq shamsuddin on Mar 16, 2011 4:38 AM
07-18-2011 6:27 AM