SAP ABAP IMG Activity BADI_CPE_FE_EXRATE_F (BAdI: CPE Exchange Rate Forecast Routine)
Hierarchy
PI_BASIS (Software Component) Basis Plug-In
   CA-GTF-CPE (Application Component) Commodity Pricing Engine
     CPE_BASIS (Package) Commodity Pricing Engine: Basic Objects
IMG Activity
ID BADI_CPE_FE_EXRATE_F BAdI: CPE Exchange Rate Forecast Routine  
Transaction Code S_BRK_62000022   (empty) 
Created on 20131002    
Customizing Attributes BADI_CPE_FE_EXRATE_F   BAdI: CPE Exchange Rate Forecast Routine 
Customizing Activity BADI_CPE_FE_EXRATE_F   BAdI: CPE Exchange Rate Forecast Routine 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name BADI_CPE_FE_EXRATE_FCAST_ROUT    

Use

This Business Add-In (BAdI) is used in the Commodity Pricing Engine (CA-GTF-CPE) component. You can use this BAdI to provide forecast values for exchange rates for which the exchange rate dates lie in the future.

You need to implement method READ_FORECAST_VALUES with the following parameters:

Importing Parameters

  • IV_EVALUATION_KEY_DATE: The forecast values are determined based on the market data that is available up to the evaluation key date.
  • IV_FORECAST_ROUTINE: The forecast routine number is the filter criterion that is used to determine the BAdI implementation.
  • IV_FORECAST_PROPOSED: This parameter indicates if the system proposes to use forecast values depending on the forecast mode and the current document category. In the standard delivery, a forecast is always proposed, except for invoices and credit memos.
  • IV_CURRENCY_FROM: The exchange rate is requested as conversion factor from this currency.
  • IV_CURRENCY_TO: The exchange rate is requested as conversion factor into this currency.
  • IV_EXCHANGE_RATE_TYPE: The type for which exchange rates are requested.
  • IT_FORECAST_CURRDATES: The system requests forecast values only for the dates in this parameter. These dates all lie later than the evaluation key date.
  • IO_EVALUATION_DATA: This class contains all data relevant for calculating CPE formulas, such as document data (document type, currency), formula data, and term data.

Exporting Parameters

  • ET_FORECAST_VALUES: For each date in parameter IT_FORECAST_CURRDATES, the BAdI implementation returns an exchange rate forecast. The following fields are available:
    • CURRDATE: Date from parameter IT_FORECAST_CURRDATES.
    • UKURS: Exchange rate as ratio of the to-currency divided by from-currency.
    • READ_BACK: If the forecast value is not based on up-to-date market data, this indicator is selected. This is typically the case if the evaluation key date is the today's date for which market data still need to be uploaded into the system.
    • MISSING: This indicator is selected for missing forecast values. A missing entry routine - if available - reacts on these entries.

      The following fields are optional as they are specific to routine 1:

    • SPOT_RATE: The spot exchange rate for the evaluation key date.
    • SWAP_RATE: The swap rate value on the evaluation key date for the requested CURRDATE.
    • INTERPOLATED: Indicator that the swap rate value was interpolated between two swap rates.

Exceptions

In the event of errors, an exception of type CX_CPE_EVALUATION_TERMINATED can be raised. This invalidates the formula result and leads to an error status.

Requirements

Standard settings

For more information about the standard settings (filters, single or multiple uses), see the Enh. Spot Element Definitions tab in the BAdI Builder (transaction SE18).

Activities

For information about implementing BAdIs as part of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.

Example

Routine 1 = Use FX Forward Rates uses BAdI BADI_TBA_FX_FWD_RATES.

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20131002 
SAP Release Created in