SAP ABAP IMG Activity BADI_CPE_FE_QUOT_FOR (BAdI: CPE Quotation 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_QUOT_FOR BAdI: CPE Quotation Forecast Routine  
Transaction Code S_BRK_62000012   (empty) 
Created on 20131002    
Customizing Attributes BADI_CPE_FE_QUOT_FOR   BAdI: CPE Quotation Forecast Routine 
Customizing Activity BADI_CPE_FE_QUOT_FOR   BAdI: CPE Quotation Forecast Routine 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name BADI_CPE_FE_QUOT_FORECAST_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 quotations for which the quotation dates lie in the future.

You need to implement method READ_FORECAST_VALUES with the following parameters:

Import Parameters

  • IV_FORECAST_DATE: On the evaluation key date, the system determines the forecast values, for example, by using commodity curves.
  • IV_FORECAST_ROUTINE: The forecast routine number is the filter criterion that is used to determine the BAdI implementation.
  • IV_FORECAST_PROPOSED: This parameter determines if the system proposes to use forecast values depending on the current document type and usage. In the standard delivery, a quotation forecast is always proposed, except in invoicing.

    This parameter is used in the following quotation forecast routines delivered by SAP:

    • Routine 1 returns forecast values only if this parameter is set
    • Routine 2 returns forecast values independent of this parameter
  • IS_QUOTATION_KEY

    For quotations up to the used evaluation key date, no forecast is required and the market data has already been accessed directly by using the key fields given in parameter IS_QUOTATION_KEY. The corresponding quotations are in parameter IT_QUOTATIONS.

    For quotations after the used evaluation key date, forecast values are required for exactly the same key fields.

    There are the following key fields:

Field Name    Description   

DCSID    Derivative Contract Specification ID (TBA_DCSID)   

MIC    Market Identifier Code (TBA_MIC)   

PRICETYPE    Type of Price Quotation (TBA_PRICETYPE)   

TENOR    Time to Maturity (TBA_TENOR)   

  • IS_ COMMODITY_CURVE: This parameter defines which commodity curve is used:

Field Name    Description   

CURVE_TYPE    Commodity Curve Type (TBA_CURVETYPE)   

CURVE_DCSID    Alternative Derivative Contract Specification ID ( CPET_CURVE_DCSID)   

CURVE_MIC    Alternative Market Identifier Code ( CPET_CURVE_MIC)   

By default, the DCS ID and MIC are the same for quotations and the commodity curve. It is, however, also possible to use a commodity curve of a different DCS ID and MIC. For this reason, we recommend that you always use the CURVE_DCSID and CURVE_MIC when accessing a commodity curve. You can use class CL_CPE_CURVE_FACTORY for this purpose.

  • IT_ FORECAST_PRICEDATES: The system requests forecast values only for the price dates in this parameter. These price dates all lie later than the used evaluation key date.
  • IO_CALENDAR: You can use the calendar instance to check whether a certain day is a business day or not.
  • IT_QUOTATIONS: The quotations that the system found up to the used evaluation key date are available in this parameter.
  • 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.

Export Parameters

  • ET_FORECAST_VALUES: For each price date, the BAdI implementation returns a forecast value for a rate. A rate such as 1000 USD/ 1 TO is given by the fields PRICE (1000), CURRENCY (USD), PRICEUNIT (1), and UOM (TO).
  • EV_MARKET_DATA_INCOMPLETE: Unless all market data up to the used evaluation key date is already available in the system, set this parameter to value abap_true.

    Typically, the forecast values are based on quotations of other market data that are available up to the used evaluation key date. In most cases, the used evaluation key date corresponds to the present day's date for which the latest quotations are still not available.

    With this parameter, a process, such as period-end valuation, can check whether the market data is complete.

  • EV_CURVE_DATE: The actual curve date that is used by the commodity curve. If the requested market data is available (EV_MARKET_DATA_INCOMPLETE = abap_false), it equals IV_FORECAST_DATE. Otherwise it lies before it.
  • EV_COMMODITY_ID: The commodity ID for which the commodity curve master is defined.

Exceptions

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

Requirements

Quotation forecast requires quotations based on derivative contract specifications (DCS).

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

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 1   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