Simplify SAP R/3 development with Excel VBA/VB RFC  
Home> Bapi>RetailPricing




The object Sales pricing contains the results of calculated sales material prices.

In sales pricing, retail prices for retail sites are determined at the
material group level using information from purchasing as well as planned margins.

A sales pricing result is the result of sales pricing calculated on the basis of a selected calculation schedule.



Available Methods

  • ApplicationLogGetDetail : Read details of entries in application log [ BAPI_APPLICATIONLOG_GETDETAIL ]
  • DataConversionExt2Int : Convert data from external format into internal format [ BAPI_CONVERSION_EXT2INT ] (Obsolete in 46A)
  • DataConversionExt2Int1 : Convert Data from External Format into Internal Format [ BAPI_CONVERSION_EXT2INT1 ]
  • DataConversionInt2Ext : Convert data from internal format into external format [ BAPI_CONVERSION_INT2EXT ] (Obsolete in 46A)
  • DataConversionInt2Ext1 : Convert data from Internal Format into External Format [ BAPI_CONVERSION_INT2EXT1 ]
  • FieldhelpGetDocu : Read input help for BAPI interface parameter [ BAPI_FIELDHELP_GETDOCU ]
  • HyperLinkGetText : Read hypertext link in documentation [ BAPI_HYPERLINK_GETTEXT ]
  • InterfaceGetDocu : Read BAPI Interface Documentation [ BAPI_INTERFACE_GETDOCU ]
  • MessageGetDetail : Read long text of error message [ BAPI_MESSAGE_GETDETAIL ]
  • TransactionCommit : Execute external Commit when using BAPIs [ BAPI_TRANSACTION_COMMIT ]
  • TransactionRollback : Execute external Rollback when using BAPIs [ BAPI_TRANSACTION_ROLLBACK ]




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
    individual tables.

    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.

    Customer-Specific Enhancements

    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 key

    Pricing items are identified using the logical key:

  • Sales_Org
  • Distr_Chan
  • Plant
  • Price_List

  • Material
  • Sales_Unit
  • Sales_Unit_ISO.
  • 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.