API Sales Forecast


SalesForecast is a business object that represents the sales forecast for a specified period. The sales forecast is required for planning the purchase and production of items in the MRP module.

This object enables you to:

  • Add a sales forecast.
  • Retrieve a sales forecast by its key.
  • Update a sales forecast.
  • Remove a sales forecast.
  • Save the object in XML format.

Source table: OFCT.

Object Model


Mandatory fields in SAP Business One: ForecastCode and ForecastName.

To display the form in the application:

  • Select MRP --> Define Forecasts.


See Also

SAP® B1 DI-API C# definition

public class SalesForecastClass : ISalesForecast, SalesForecast { public virtual DataBrowser Browser { get; } public virtual string ForecastCode { get; set; } public virtual DateTime ForecastEndDate { get; set; } public virtual string ForecastName { get; set; } public virtual DateTime ForecastStartDate { get; set; } public virtual SalesForecast_Lines Lines { get; } public virtual int Numerator { get; } public virtual SAPbobsCOM.UserFields UserFields { get; } public virtual ForecastViewTypeEnum View { get; set; } public extern SalesForecastClass(); public virtual extern int Add(); public virtual extern string GetAsXML(); public virtual extern bool GetByKey( int lID); public virtual extern int Remove(); public virtual extern void SaveToFile( string FileName); public virtual extern void SaveXML( ref string FileName); public virtual extern int Update(); }

Related information

Sales Forecast Lines SalesForecast_Lines Object· Table: FCT1
SalesForecast_Lines is a child object of SalesForecast object and represents sales forecast of items and their quantity for a specified day. Source table: FCT1.
   Parent: Sales Forecast SalesForecast Object· Table: OFCT

Forecast View Type Enum ForecastViewTypeEnum Enumeration
Types of time periods for sales forecasts, indicating whether the forecast contains daily, weekly, or monthly estimated sales figures.
   Parent: Sales Forecast SalesForecast Object· Table: OFCT

SAP® Business One is the trademark(s) or registered trademark(s) of SAP AG in Germany and in several other countries. Contact
This website is not affiliated with, maintained, authorized, endorsed or sponsored by SAP AG or any of its affiliates