Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cannot create Forecasting periods with BAPI_MATERIAL_SAVEREPLICA

Guneet20
Explorer
0 Likes
1,576

Hi,

I am working on MRP planning and have some issues with a report which is updating Forecasting values for materials.

In my report, user can modify or enter the forecasting values which has to be updated in Material Master. My issue is that BAPI I am using is not creating Forecasting periods if they are not already existing. If forecasting has already been carried out, the BAPI updates the Material master, but If Forecasting is not already carried out, then the data is not being added and am getting an error that " No Forecast possible for period xxxx". What my requirement is that if forecasting is already created, then the BAPI should update the forecasting values and if Forecasting periods are not there, then create the forecasting period and then update the values from the report. Please Help!!

Any ideas on how to create forecasting periods from my report ?? Is there any FM which I can run before my BAPI is called which can create the forecasting periods.

5 REPLIES 5
Read only

gouravkumar64
Active Contributor
0 Likes
1,218

Hi,

I am not sure,but u can try with this .

BAPI_MATERIAL_SAVEREPLICA    

You have to use HEADDATA and FORECASTVALUES.

Now search for available code & information.

Hope it helps a little.

Thanks

Gourav.

Read only

0 Likes
1,218

Hi Gourav,

Thanks for the reply. I am already using BAPI_MATERIAL_SAVEREPLICA but the forecast periods are not getting created.

Read only

0 Likes
1,218

Hi,

In this BAPI try to fill the structure BAPIE1MPRW.

in that you will find the value CORR_VALUE .

standard program  RMDATIND also helpful for u.

additional field also try to specify.like this thread.

http://scn.sap.com/thread/95507

look that thread for help.

Thnaks

Gourav.

Read only

0 Likes
1,218

You are observing standard SAP behaviour. Based on periodicity(D/W/M) of the forecast periods, forecast periods will automaically opened by system. For example if you have defined 12 forecast periods with weekly periodicity, System would show next 12 forecast weeeks starting with current week.

You can run forecast either for current week or next week in MP30/MM02. For manually updating the forecast values of period , You can add values for periods in future from current date only upto periods mentioned in forecasting view.

Regards,

Santosh Sarda

Read only

0 Likes
1,218

Hi Guneet,

For Views to be created, There are Several Flags to be set apart from Filling Tables

First you fill the table BAPIE1MPOP and BAPIE1MPOPX.

in Addition to that, 2 flags have to set

FORECAST_VIEW in  HEADDATA

and FORECAST_VIEW in PLANTDATA tables of the BAPI.

This will create the Forecast view.

let me know if it helps.

Thanks

Gaurav Guglani