‎2006 Sep 27 8:25 AM
Hi,
I created two orders with different order type one is internal order and another one is work order. And both of them are technically completed.
When I looked at AUFK table, internal order status has been updated as technically complete but for work order it is not updated.
I was wondering if I want to pick up the orders which are not technically completed then I can't pick them from AUFK, can anyone tell me from where can I pick up the orders with updated status.
Regards
Ria.
‎2006 Sep 27 8:33 AM
check JEST with OBJNR.
<b>Hi REN,
Getting the Status of the PO is not a simple thing ,Bcos One Production Order will have lot of MileStones , like REL,CNF,PCNF,TECO.
So first u have to get all the Stauts which Order contains from JEST then u have to manipulate the data.
</b>
regards
prabhu
Message was edited by: Prabhu Peram
‎2006 Sep 28 5:30 AM
Hi
Thanks for your reply, I check in Jest and yes the status is vissible but I can't make out what status it is. Whether it is technically completed, released or what?
Please help me...
Regards
Ria
‎2006 Oct 10 2:54 AM
‎2006 Oct 10 3:02 AM
use the function module <b>status_read</b>
concatenate 'OR' AFKO-AUFNR into L_AUFNR.
call function 'STATUS_READ'
exporting
OBJNR = L_AUFNR
ONLY_ACTIVE = 'X'
tables
STATUS = IT_JEST
exceptions
OBJECT_NOT_FOUND = 1
others = 2.
if SY-SUBRC <> 0.
endif.
if not IT_JEST[] is initial.
select ISTAT TXT04
from TJ02T
into table IT_TJ02T
for all entries in IT_JEST
where ISTAT = IT_JEST-STAT
and SPRAS = SY-LANGU.
endif.
Regards
- Gopi
‎2006 Oct 10 5:09 AM
Hi Gopi,
Thanks for your solution, I checked the TJ02T, it doesn't have status TECO in that, function module is returning 9 status for the object but when i look into the TJ02T table it shows only status starting with I but not starting with E, so not sure what to do. Can you help me further if you know something else.
regards
Ria
‎2010 Apr 12 1:44 PM
HI
check for teh status in table TJ30T. u'll get it along with the description.
‎2010 Apr 12 1:47 PM
Hi,
Feel free to revert if you have further Issues, This is a tested Code Snippet
" Pass AUFNR to CAUFV table and get the OBJNR and pass here
IF NOT ( <fs_caufv>-objnr = '00000000000000'
OR <fs_caufv>-objnr = c_space ).
CLEAR objnr.
objnr = <fs_caufv>-objnr.
CALL FUNCTION 'STATUS_TEXT_EDIT'
EXPORTING
flg_user_stat = 'I'
objnr = objnr
only_active = 'X'
spras = 'E'
IMPORTING
line = s_status.
IF ( s_status CS s_teco OR
s_status CS s_clsd OR
s_status CS s_dlfl OR
s_status CS s_crtd OR
s_status CS s_lkd ).
* g_flag_po_mes = c_x.
ENdifCheerz
Hope this serves your purpose
Ram
‎2010 Apr 12 1:56 PM
Hi Ria ,
Table TJ30 has the E statuses and its descriptions.
Pass the E Status to Field ESTAT , Field TXT30 will give you the Description
Please refer the below Doc in the page 14.
[http://www.sap4u.org/media/userfiles/articles/pdf/14.pdf]
Edited by: Prasath Arivazhagan on Apr 12, 2010 2:58 PM
‎2010 Apr 13 5:48 AM
Hi ria,
Check the function module "STATUS_SHOW_CHANGE_DOCUMENTS".
Regards
Vinod