When you create a purchase order, values I, U and D refer to the conditionsthat were derived automatically, that is, you can also use U and D already during the creation. when you change a purchase order, they also refer to existing conditions.
Prerequisite
You must implement note 494759 in your system to use these functions.
Example A: change_id = 'I'
You create a purchase order with bapi_po_create1. the system shoulddetermine the conditions for item 10 automatically. in addition, however, you want to calculate 3% freight costs. you use condition type fra1 for the freight costs. then tables pocond and pocondx must be filled with the following values:
POCOND-ITM_NUMBER = 10 (item number)
POCOND-COND_TYPE = fra1 (condition type)
POCOND-COND_VALUE = 3.0 (condition value)
POCOND-CURRENCY = %
POCOND-CHANGE_ID =
POCONDX-ITM_NUMBER = 10
POCONDX-ITM_NUMBERX = x
POCONDX-COND_TYPE = x
POCONDX-COND_VALUE = x
POCONDX-CURRENCY = x
POCONDX-CHANGE_ID = x
Example B: change_id = 'U'
You create a purchase order with bapi_po_create1. the system determines a price (Condition Type pb00) of 90 EUR for item 10. you want to change the 90 EUR to 100 EUR. to do this, fill tables pocond and pocondx with the following values:
POCOND-ITM_NUMBER = 10
POCOND-COND_TYPE = pb00.
POCOND-COND_VALUE = 100
POCOND-CURRENCY = EUR
POCOND-CHANGE_ID = u
POCONDX-ITM_NUMBER = 10
POCONDX-ITM_NUMBERX = x
POCONDX-COND_TYPE = x
POCONDX-COND_VALUE = x
POCONDX-CURRENCY = x
POCONDX-CHANGE_ID = x
Example C: change_id = 'D'
Now you want to use bapi_po_change to delete the freight costs added in Example A again. To do this, fill tables pocond and pocondx with the following values:
POCOND-ITM_NUMBER = 10
POCOND-COND_TYPE = fra1
POCOND-CHANGE_ID = d
POCONDX-ITM_NUMBER = 10
POCONDX-ITM_NUMBERX = x
POCONDX-COND_TYPE = x
POCONDX-CHANGE_ID = x
It is not necessary to transfer additional item data. theonlyinformation that must be transferred in addition to the condition tables is the purchase order number (purchaseorder field ).
1. POCONDHEADER-CHANGE_ID
The header conditionsaretransferred using the pocondheader table. Here, the change_id field has the same function as in the pocond table (see abve ).
Prerequisite
You must implement note 494759 in your system to use these functions.
Example
You create a purchase order with several items and want to distributethe amount 100 EUR to the items on a percentage basis. you defined condition type hb00 for this purpose. then the pocondheader and pocondheaderx tables must be filled as follows:
POCONDHEADER-COND_TYPE = hb00.
POCONDHEADER-COND_VALUE = 100
POCONDHEADER-CURRENCY = EUR
POCONDHEADER-CHANGE_ID =
POCONDHEADERX-COND_TYPE = x
POCONDHEADERX-COND_VALUE = x
POCONDHEADERX-CURRENCY = x
POCONDHEADERX-CHANGE_ID = x