Ansicht
Dokumentation

IFW_FORECAST_ENHANCE - BAdI: Forecasting Enhancements

IFW_FORECAST_ENHANCE - BAdI: Forecasting Enhancements

BAL Application Log Documentation   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

You can use this BAdI to change the behavior of the invoice forecasting run. The BAdI supplies two methods:

  • The first method MERGE_FORECAST_DATA is called at the end of merge functionality for differential invoicing items in the forecasting run. By using differential invoicing, it is possible that there is a difference amount between the original item and the new item. This system handles these differences in separate records for the item, an original and new record. In standard, the user is only interested in seeing a consolidated delta record. Therefore, the corresponding credit and debit records are merged into a single delta record. If the standard logic for the merge is not needed or a different logic is to be executed, this BAdI method needs to be implemented.
  • The second method ADD_VALUES is called during the mapping of the forecasting results. If it is necessary fore example to add more than one set of condition information to the IFW forecasting result, this BAdI method needs to be implemented. If additional fields are to be enhanced, it is also necessary to extend the IFW database model to be able to store additional condition information.

Interface of MERGE_FORECAST_DATA

  • IS_INVREQ contains the record that was forecasted.
  • IS_FORECAST_ITEM contains a single forecasting item for which the BAdI implementation is called
  • IT_FORECAST_ITEMS contains all forecasting results including the record of parameter IS_FORECAST_ITEM
  • CS_MESSAGE returns an error message
  • CS_MERGE_ITEM contains the merged information coming from the standard logic. This information can be changed in the BAdI implementation

Interface of ADD_VALUES

  • IS_INVREQ contains the record that was forecast
  • IS_FORECAST_HEADER contains the forecasting header result
  • IT_FORECAST_ITEMS contains all forecasting results
  • IS_KOMK contains the communication header of the pricing
  • IT_KOMV contains all available condition information based on the type of the simulation
  • CS_MESSAGE returns an error message
  • CT_INVDATA contains the invoice forecasting result based on the standard logic. This result can be changed in the BAdI.

The BAdI methods are to be called in addition to the standard logic. Both methods are supplied with the result of the standard logic in a changing parameter. Within the BAdI implementation, it is possible to enhance this data or even create and delete new results.

Behavior of standard logic for merging:

The forecasting result based on differential invoicing may contain different records for an item. The standard logic tries to find the items that are logically linked together using service method GET_DINV_PAIR_ITEM of class CL_IFW_SERVICES (MM/SD have different logic). If an additional record is found, the logic merges this into one final record and adds this delta record to the result.

Behavior of standard logic for condition logic:

In standard, only one condition is added to the forecasting result. It is possible to configure one condition type in table IFW_C_COND_TYPE that is to be used for the IFW forecasting. This specific condition type is used to read the condition information from the MM or SD sources. If a specific condition that is not directly linked to the document needs to be displayed or if multiple condition types are needed, the BAdI needs to be implemented.






Vendor Master (General Section)   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 3931 Date: 20240523 Time: 192009     sap01-206 ( 85 ms )