I assumed that the STOJOU table will be the best place to look, and I'm currently looking at the CREMVTDAT field, but I just wanted to see if that is correct, or should I be using something else ?
I assumed that the STOJOU table will be the best place to look, and I'm currently looking at the CREMVTDAT field, but I just wanted to see if that is correct, or should I be using something else ?
That would be the field I would use, the STOJOU entry is only created once you validate the shipment, and is initiated with the current date on generation.
It should work BUT if your delivery has been posted and then modified to add an additional line or stock, then the CREDAT maybe different from the inital delivery validation. So you would need to find the earliest record created from this delivery to identify for sure the initial validation date...
Of course, for non managed in stock product the information is lost.
It should work BUT if your delivery has been posted and then modified to add an additional line or stock, then the CREDAT maybe different from the inital delivery validation. So you would need to find the earliest record created from this delivery to identify for sure the initial validation date...
Of course, for non managed in stock product the information is lost.
Once a delivery has been validated, you only can modify a select few elements on the header, but you cannot modify or add any lines onto it. The only issue is on non-stock managed lines, as those will not create entries in STOJOU.
Hi Regard Hulsbos.
"but you cannot modify or add any lines onto it"
I agree with you if the delivery is fully invoiced. But of the delivery is not fully invoiced, you can still modify the delivered quantity and select a new stock line for instance. This would create new record in STOJOU linked to the very same delivery document:
As you can see, I have now for the same document and same line 2 different creation dates:
In that case, the date of the validation is the smaller date between the two.
You might have new records created as well when using the Cost adjustment function.
My apologies if I was unclear in my explanation, you are correct, you can only perform stock modifications if the delivery has been validated. In either event two new STJ entries will be created, the first will be a copy of the original entry netting off the original entry (CREMVTDAT equals date of original validation), the second will be the new entry generated for the stock modification which would be set by IPTDAT from screen [M:STW], which would be todays date.
In either event performing a select min(CREMVTDAT)) from STOJOU group by VCRNUM_0,VCRLIN_0 should provide with the original date of validation.
*Community Hub is the new name for Sage City