This BAPI, or the CalculatePrices method in the RetailPricing business object, facilitates communication between the sales price calculation function of the SAP System and one or moreexternal systems.
You can use this BAPI to request and adjust calculations in external systems:
Requesting a Pricing Item
Every pricing item required must be requested precisely once using thisBAPI. Requesting a pricing item causes the system to suggest all therelevant pricing data (such as markup, margins and sales prices, for example).
Adjusting a Requested Pricing Item
If the pricing items requested do not meet your expectations - forexample, if the sales price suggested by the system is either too high or too low, the pricing item can be adjusted using this BAPI.
Depending on whether a calculation is to be requested or whether a requested calculation is to be adjusted, the interface tablesCALCITEMIN and CALCITEMINX can be filled in different ways. You will find further information on this in the documentation for the
Results of the Calculation
Each time the BAPI is called up, the result of the calculation isentered in the CALCITEMOUT export table. Any errors that may haveoccured are displayed in the RETURN export table. You will find further
information in the interface documentation for the relevant tables.
Further fields that are not contained in the CALCITEMIN, CALCITEMINX orCALCITEMOUT interface tables can be entered using the enhancement
tables EXTENSIONIN and EXTENSIONOUT and the BAPI. You can find furtherinformation on this in the interface documentation for the individual tables.
A dialog for calculating store-specific sales prices is to be createdin an external system. A store, a quantity of articles and a validity
period for the calculation (required fields) are to be entered in aninitial screen. The system should then suggest the appropriate pricingitems in a subsequent screen. The suggested final price should be the same as the current valid final price.
The data entered in the initial screen should be transferred to the
BAPI using table CALCITEMIN (see "Pricing key" below). For the finalprice to be suggested in the way described above, the VKERV field mustcontain the value "02". When the BAPI is called up this time, theCALCITEMINX table does not have to be filled as pricing items have only
been requested. Once the BAPI has been called up, the calculations requested are to be found in the CALCITEMOUT export table.
Users should be able to enter the prices suggested on the subsequentscreen interactively. After each change the changed pricing items should be adjusted (markup, margins, and so on).
To do this, the contents of the fields must be transferred to theCALCITEMIN table along with the pricing key. The changed fields arealso to be marked in the CALCITEMINX table, using the pricing key toensure that the items are unambiguously assigned. When the BAPI is
called up, the adjusted pricing items are displayed in the CALCITEMOUT export table.
Pricing items are identified using the logical key:Sales_OrgDistr_ChanPlantPrice_List
Certain fields have to be filled, depending on the level at which thecalculation is to be performed. You will find details of this in the interface documentation on table CALCITEMIN.