cancel
Showing results for 
Search instead for 
Did you mean: 

Forecast consumption not working when using BAPI_SLSRVAPS_SAVEMULTI2

Former Member
0 Kudos

HI SAP APO experts,

I have a problem. We are sourcing our transactional data from non-SAP system so we had to develop an interface that will post transactional data to APO. We developed a program that will post data from flat file to APO LC. We used BAPI_SLSRVAPS_SAVEMULTI2 in posting sales order but my problem is that its not consuming my forecast. I am using strategy 20 and backward consumption of 28 days in my product master.

Using CIF, forecast consumption is working but not for our abap. Hope you can help me. Thanks.

Mylene

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi All,

Does anyone knows what is internal request type for sales order. I found this in SAP help:

"Only sales order that were created in R/3 and then transferred to SAP APO or that were created using a BAPI are consumed. If a BAPI is used, the sales order must have the internal request type '52'. "

I wonder were can I see/mantain that internal request type in sales order/. Thanks.

Mylene

sarvesh_rathore
Explorer
0 Kudos

Hi Mylene,

Where you able to find where exactly we mention the internal request type "52". I am facing the same problem of Sales order not consuming the forecast when loading from BAPI. I am not able to find in which field/segment of BAPI posting to pass "52".

Appreciate your input.

Thanks,

Sarvesh

Former Member
0 Kudos

Hi Sarvesh,

No, I was not able to find what is that internal request type 52. But I did some more research and you need to have check mode populated in your BAPI. In our case, we can not hard code check mode in the BAPI since we are using more than one check mode. My abaper just parsed then change the program that it will parse check mode from material master to the BAPI. Now, forecast consumption is alreayd working. But I am still facing 2 issues:

1. After this change in the code, our program is now running longer than usual. This used to run only for 20 minuutes but now its running for more than 3 hours.

2. For materials using demand strategy 20, sales order is consuming forecast which is correct. But when I delete this sales order, forecast quantity does not go back to original quantity in the planning book.

Mylene

sarvesh_rathore
Explorer
0 Kudos

Hi Mylene,

Thanks for the input. When I passed the requirement class as check mode through BAPI, the consumption happened. Your suggestion worked.

But as you mentioned when I am deleting the sales order, the forecast is not coming back to the original value. I have raised an OSS for this.

But there is a workaround you can use: Use the same BAPI (used for creation of sales orders) and pass the quantity as zero on this. Rest all fields should be same as in creation. The effect of this is that the order gets deleted and forecast goes back to the original position.

Thanks,

Sarvesh

Former Member
0 Kudos

Hi,

I am facing the same issue, When we delete sales order, Forecast is not going back to Original Quantity. Do u got any reply from SAP OSS note mentioned by you ? Can you please share the same.

Thanks in advance !!!

Former Member
0 Kudos

Hi All,

I am running /SAPAPO/CSP_CORRECT_FCST every after sales order deletion in order to correct the forecast consumption.

Regards,

Mylene

Former Member
0 Kudos

Hi Andy.

Where do I see/mantain planning_mode_usage structure? Thanks.

Mylene

Former Member
0 Kudos

Hi Andy,

Found it. Its in the BAPI. But after doing this, its still not consuming my forecast I have the correct master data setup. Proposed strategy is 20 with backward consumption methos and period and I have also check mode populated. Not sure whats wrong

Former Member
0 Kudos

Hi Mylene - make sure you have the planning_mode set to 1 in the planning_mode_usage structure so the planning settings from the product master are used.

Regards

Andy