Ansicht
Dokumentation

BADI_CPE_FE_QUOT_FOR - BAdI: CPE Quotation Forecast Routine

BADI_CPE_FE_QUOT_FOR - BAdI: CPE Quotation Forecast Routine

PERFORM Short Reference   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

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_VALUESwith the following 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.
Alternative Market Identifier Code ( CPET_CURVE_MIC)
  • 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.
Alternative Market Identifier Code ( CPET_CURVE_MIC)

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.


Alternative Market Identifier Code ( CPET_CURVE_MIC)

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

Alternative Market Identifier Code ( CPET_CURVE_MIC)

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).

Alternative Market Identifier Code ( CPET_CURVE_MIC)

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

Alternative Market Identifier Code ( CPET_CURVE_MIC)






Fill RESBD Structure from EBP Component Structure   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 8316 Date: 20240524 Time: 012336     sap01-206 ( 137 ms )