06-01-2011 10:20 AM
Hi Experts,
I know that we can use FM STATUS_TEXT_EDIT to get the current status of a Production Order. I'm wondering if we could also get the previous status of a Production Order? If we can, what is the steps or FM to use?
Thanks
06-01-2011 10:42 AM
Hi,
Usually statuses are fetched from JEST table.
But using the same OBJNR whcih we pass to the FM 'STATUS_TEXT_EDIT',
we can access the table JCDS, to get the previous statuses.
Just write SELECT OBJNR STAT UDATE UTIME
from JCDS
where OBJNR = OBJNR.
UDATE is the creation date of the change document, i.e the previous staus.
If you get more than one statuses for one OBJNR, You can sort the results by UDATE descending UTIME descending.
Then you will get the immediately previous status for this.
Hope this should resolve the issue.
Thanks & regards,
Y Gautham
06-01-2011 10:42 AM
Hi,
Usually statuses are fetched from JEST table.
But using the same OBJNR whcih we pass to the FM 'STATUS_TEXT_EDIT',
we can access the table JCDS, to get the previous statuses.
Just write SELECT OBJNR STAT UDATE UTIME
from JCDS
where OBJNR = OBJNR.
UDATE is the creation date of the change document, i.e the previous staus.
If you get more than one statuses for one OBJNR, You can sort the results by UDATE descending UTIME descending.
Then you will get the immediately previous status for this.
Hope this should resolve the issue.
Thanks & regards,
Y Gautham
06-01-2011 11:18 AM
Hi Gautham,
Thanks for your quite reply. But I'm still a bit confuse with the data extracted.
There is a field INACT in the table JCDS, which indicates that the status whether isit active or inactive right?
By sorting the date and time descending, I can see the lastest and previous status clearly.
But the problem is that when I go to CO03, the status showed and the status in JCDS is different, and I'm trying to figure out how to link the data together.
For example, the active status in JCDS is 8, but in CO03 the status shows is only 4.
06-01-2011 1:00 PM
Hi,
I tried checking for some examples in my system. But unfortuantely I do not have any data for Production orders
in my system.
But I have observed for some other orders. If we have different statuses in the JCDS under active status, I think it is justified,
as in the case of Equipment which is in INST status, if we set a deletion flag on this equipment, then the table will have the
status of both INST and DLFL, i.e. Installed and Deletion flag set as well.
So we have to consider onky those records with the INACT = space. And still if we have doubts we can cross check with the
program that the other user has mentioned 'RBSVCDOC'.
it is actually returning all the other statusses avaialble for this OBJNR, but also highlights the presently active status.
So I hope with this we can identify the present and the Previous status.
I tried executing this program 'RBSVCDOC' on the same OBJNR by changing its statuses, and the result also changed accordingly, by highlighting the status that was presently set.
Hope this should help.
Thanks & regards,
Y Gautham
06-01-2011 10:50 AM