Monday, October 30, 2017

Invalid Planning Version

Now, I've seen a few errors on the SCM systems in my time. But this one really took me around a lot of corners.
It all started with a simple homogenous system copy. We were changing provider, and had to move our systems. After the migration, I did a few spot checks on the Live Cache, was it running, etc. And those simple checks were ok. But when we handed over the system to business, a simple forecasting ended my world. It started with a "livecache not accessible" error. This lead to a slew of missing parameters, missing configuration items, and authorization issues on the host. However, after several days of back-and-forth, the provider finally said "now it's working". So we tested again. Yes, live cache was now available, but the forecasting now gave an "invalid planning version". WTF ?!?


Clicking the error just took me to the S000 menu. So not much was offered in the way of help from SAP.
However, I COULD go to transaction /SAPAPO/MVM, and the planning version this time at least gave me an error:

An application error has occurred in the LiveCache

Message no. /SAPAPO/MVM075

Ok. I had something to go on... I tried to run a consistency check in /SAPAPO/OM17. And I do mean tried. It failed horribly too. Shortdump. What was that about ? So I ran the consistency check without selecting any object to test, and lo and behold, I caught a fish. 


Right, the planning versions. Here they were, plain as day. Clearing inconsistencies, quickly removed the entry not in the database. But why wouldn't the planning version load from the database ? All my checks on the Livecache said it was running ! Various SAP notes suggested restarting. I tried. No help. I even found a note that said to recreate the object manually (note 2419054), if the clearing didn't make the error go away. But I had no clue about how many objects were impacted, as I couldn't run the consistency check in its entirety. It could be a LOT of objects that required manual intervention, so I dismissed that idea for the time being. It had to be something closer to home. I needed to find the cause of the problem, not fix the symptoms.
I finally went back to LC10, and went into the monitoring. Everything looked ok, but something was fishy, it had to be. Something in the back of my head told me to check the datafiles. they were there. so I checked the tables within... And ... CRAP. They were empty.

So no wonder the livecache couldn't write to the database, or read from it. No wonder I got a shotdump when trying to read the data tables. There was just a clean database, with no imported tables. Not a single APO entry in sight. So I had my culprit. Now I just have to find out how the provider could have mucked up the restore. Not to mention, having them restore everything again.