2012 Jul 03 6:53 AM
Dear All,
Iam using bapi(BAPI_PO_CHANGE) to update pricing conditions of PO. Sometimes it is working fine but sometimes it is misbehaving and not updating conditions in PO. Iam attaching code for reference please let me know if iam missing something.
it_poitem-po_item = it_poud-ebelp.
it_poitem-calctype = 'B'.
APPEND it_poitem.
it_poitemx-po_item = it_poud-ebelp.
it_poitemx-po_itemx = 'X'.
it_poitemx-calctype = 'X'.
APPEND it_poitemx.
it_cond-itm_number = it_poud-ebelp.
it_cond-change_id = 'U'.
it_cond-cond_updat = 'X'.
APPEND it_cond.
it_condx-itm_number = it_poud-ebelp.
it_condx-itm_numberx = 'X'.
it_condx-change_id = 'X'.
it_condx-cond_updat = 'X'.
APPEND it_condx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = ebeln
TABLES
return = it_return
poitem = it_poitem
poitemx = it_poitemx
pocond = it_cond
pocondx = it_condx.
COMMIT WORK AND WAIT.
Regards
Yogesh Sharma
2012 Jul 03 8:15 AM
Hi Yogesh,
I had faced a issue while uploading the multiple condition types for a PO.
I had the below observations:
1. While uploading the condition type with currency type ‘INR’ we need to populate 'POCOND-CHANGE_ID' field with value ‘U’ or ‘I’.
When to maintain the fields?
U:When condition type automatically comes in PO and we want to overwrite it.
I:When condition type does not come automatically and we want to insert it.
2. 2. While Uploading condition types with currency in USD or % we need not to maintain the field with ‘U’ or ‘I’.
Hope this will help you.
Regards,
Rajesh Akarte
Dear All,
Iam using bapi(BAPI_PO_CHANGE) to update pricing conditions of PO. Sometimes it is working fine but sometimes it is misbehaving and not updating conditions in PO. Iam attaching code for reference please let me know if iam missing something.
it_poitem-po_item = it_poud-ebelp.
it_poitem-calctype = 'B'.
APPEND it_poitem.
it_poitemx-po_item = it_poud-ebelp.
it_poitemx-po_itemx = 'X'.
it_poitemx-calctype = 'X'.
APPEND it_poitemx.
it_cond-itm_number = it_poud-ebelp.
it_cond-change_id = 'U'.
it_cond-cond_updat = 'X'.
APPEND it_cond.
it_condx-itm_number = it_poud-ebelp.
it_condx-itm_numberx = 'X'.
it_condx-change_id = 'X'.
it_condx-cond_updat = 'X'.
APPEND it_condx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = ebeln
TABLES
return = it_return
poitem = it_poitem
poitemx = it_poitemx
pocond = it_cond
pocondx = it_condx.
COMMIT WORK AND WAIT.
Regards
Yogesh Sharma
2012 Jul 03 7:05 AM
Hi Yogesh,
Why are you not populating the Condition type?
IT_COND-COND_TYPE and IT_CONDX-COND_TYPE .
You can also pass CONDITION_NO, COND_ST_NO and COND_COUNT and check.
These are available in KONV table for EKPO-KNUMV.
Thanks,
Shambu
2012 Jul 03 7:30 AM
Dear Shambu,
We are updating multiple conditions simultaneously ex. mrp & net price. Net price working fine but sometimes mrp is not updating. We cannnot use IT_COND-COND_TYPE and IT_CONDX-COND_TYPE as we cannot process mrp condition manually in our scenerio.
Regards
Yogesh Sharma
2012 Jul 03 7:34 AM
2012 Jul 03 7:41 AM
2012 Jul 03 7:50 AM
Hi Yogesh,
If you need to update a particular condition type you need to give the Condition type or the Condition Number.
Here you know that MRP is ZMRP, just give IT_COND-COND_TYPE = 'ZMRP' and set the X in the other structure.
Thanks,
Shambu
2012 Jul 03 8:15 AM
Hi Yogesh,
I had faced a issue while uploading the multiple condition types for a PO.
I had the below observations:
1. While uploading the condition type with currency type ‘INR’ we need to populate 'POCOND-CHANGE_ID' field with value ‘U’ or ‘I’.
When to maintain the fields?
U:When condition type automatically comes in PO and we want to overwrite it.
I:When condition type does not come automatically and we want to insert it.
2. 2. While Uploading condition types with currency in USD or % we need not to maintain the field with ‘U’ or ‘I’.
Hope this will help you.
Regards,
Rajesh Akarte