Skip to end of metadata
Go to start of metadata



Fixing Negative Demand history for the given period in Transaction /SAPAPO/SPPDMDH 


Reject demand is uploaded several times into the SPP either from ERP or CRM backend system. It leads to negative quantity in the 9ADEMMUL.

Recreate Steps

Case 1:

1. Create a Sales Order with one item and quantity.

2. CIF order to SPP, order has been arrived.

3. Go Changed mode, Reject the order giving the Rejection reason in ERP.

4. CIF again changed order to SPP and Changed Order to be uploaded into SPP. (results in 0 demand)

5. Check in both Info Provider 9ADEMAND and 9ARAWDAT, Demand has been changed to 0.

 6. CIF again the Rejected order multiple times, which will updated negative quantity in 9ADEMMUL. It leads error.

 7. Check the Negative demand history in transaction /SAPAPO/SPPDMDH

8. system throws error that Product/location &1/&2&4: Inconsistent historical data in period &3. Message No./SAPAPO/PFCS_MESS 036

Case 2:

Other Inconsistency:

Transaction /SAPAPO/SPPDMRD with inconsistencies due to abnormal demand functionality.

Between the change and the commit of a specific data set for abnormal demand in transaction /SAPAPO/SPPDMRD like below:

1. You start the UI 'Manual Adjustment of Raw Data' (transaction /SAPAPO/SPPDMRD).
2. You select data records for a product and order date.
3. You mark an order line, set the abnormal flag and save the data.
Wait a few seconds until the data of the first UI is stored on the DB and all locks are released.
4. You select the identical data record for the same product and order date and press the button CHANGE.
5. It is possible to enter the edit mode on the outdated data, set the abnormal flag again and save the data.
The abnormal demand is stored twice on the database.

These inconsistencies are responsible for errors in the forecast service with error message: "Inconsistent historical data in period yyyymmdd" 



Case 1 :

  1. Create Trigger SPP_REPL_INDI_CHANGE for the Service SPP_PDEM_STOCKING_RLG in transaction /SAPAPO/TRIGGER
  2. Execute the Stocking/Destocking realignment service SPP_PDEM_STOCKING_RLG for location product. It will remove all negative quantities in the infoprovider.


Case 2:

When the system detects that the data on the UI is out-of-date, it won't allow the change mode unless a re-selection is executed.
Specific problem here for this UI is, that when you flag a record as abnormal 2 records will be produced at time of update.
A new record for abnormal demand and an updated record with 0 quantity and regular demand category.
It could also be that in a parallel session a user has changed multiple relevant records.
To get a full picture of a data situation where marked records on the UI are not in sync with data on the DB, a complete re-selection is required.

Please implement the following note to fix this issue.

Note: 2459814 "Duplicate records when saving in Manual Adjustment of Raw Data".

Related SAP Notes/KBAs

1836600 - Inconsistent historical data of orders with rejection reason
1850091 - Inconsistent historical data after order rejection


  • No labels


  1. Former Member

    Hello Mallampalli,

    Thanks for sharing the good information.

    I have two queries over here.

    Do you want me to create new trigger for the particular product-location and then run the stocking realignment??

     I could see in your screen shot why there is location with "—", in our project we are facing the same issue with negative values and blank location.

    Please help me on this.




  2. Hi Sankar,

    It is good, if you create trigger always to specific location product and service level before executing the service.

    Blank Location was created because location was not clearly noted in the uploading document.

     There are negative values at the Entry location as well as  VCL location level in above screen shot not at blank location level.

    I hope it is clear now.