2007 Nov 29 2:32 PM
Hi,
I want to change the Condition value for a particular Condition type using BAPI_PO_CHANGE.
I am populating values for following
Import parameters
PURCHASEORDER
POHEADER (Fields PO_NUMBER)
POHEADERX (Fields PO_PO_NUMBER = X)
Tables
POITEM (Fields PO_ITEM, PLANT, STGE_LOC
POITEMX (Field PO_ITEM, PO_ITEMX = X, PLANT = X, STGE_LOC= X)
POCOND (Fields COND_TYPE, COND_VALUE, CURRENCY)
POCONDX (Fields COND_TYPE = X, COND_VALUE = X, CURRENCY = X)
But PO condition value is not getting changed...
Regards,
Balaji Viswanath.
Hi,
I want to change the Condition value for a particular Condition type using BAPI_PO_CHANGE.
I am populating values for following
Import parameters
PURCHASEORDER
POHEADER (Fields PO_NUMBER)
POHEADERX (Fields PO_PO_NUMBER = X)
Tables
POITEM (Fields PO_ITEM, PLANT, STGE_LOC
POITEMX (Field PO_ITEM, PO_ITEMX = X, PLANT = X, STGE_LOC= X)
POCOND (Fields COND_TYPE, COND_VALUE, CURRENCY)
POCONDX (Fields COND_TYPE = X, COND_VALUE = X, CURRENCY = X)
But PO condition value is not getting changed...
Regards,
Balaji Viswanath.
2007 Nov 29 3:36 PM
Hi,
I got the answer from Naren's earlier post... Given the answer below...
Hi,
I believe you can use this BAPI to PO conditions..
Check this code..
PARAMETERS: p_ebeln LIKE ekko-ebeln.
DATA: t_poitem LIKE bapimepoitem OCCURS 0 WITH HEADER LINE.
DATA: t_poitemx LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE.
DATA: t_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: t_cond LIKE bapimepocond OCCURS 0 WITH HEADER LINE.
DATA: t_condx LIKE bapimepocondx OCCURS 0 WITH HEADER LINE.
t_poitem-po_item = '00010'.
t_poitem-net_price = '17.00'.
APPEND t_poitem.
t_poitemx-po_item = '00010'.
t_poitemx-net_price = 'X'.
t_poitemx-po_itemx = 'X'.
APPEND t_poitemx.
t_cond-itm_number = '00010'.
t_cond-cond_type = 'P000'.
t_cond-cond_value = '17.00'.
t_cond-currency = 'USD'.
t_cond-change_id = 'U'.
APPEND t_cond.
t_condx-itm_number = '00010'.
t_condx-itm_numberx = 'X'.
t_condx-cond_type = 'X'.
t_condx-cond_value = 'X'.
t_condx-currency = 'X'.
t_cond-change_id = 'X'.
APPEND t_condx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = p_ebeln
TABLES
return = t_return
poitem = t_poitem
poitemx = t_poitemx
pocond = t_cond
pocondx = t_condx.
COMMIT WORK.
The above code works fine for me...
Thanks,
Naren
2016 Apr 22 10:39 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |