Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Order Status

Former Member
0 Likes
1,583

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.

9 REPLIES 9
Read only

Former Member
0 Likes
1,151

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

Read only

0 Likes
1,151

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

Read only

0 Likes
1,151

Can any one help me on this!!

Read only

0 Likes
1,151

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

Read only

0 Likes
1,151

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

Read only

0 Likes
1,151

HI

check for teh status in table TJ30T. u'll get it along with the description.

Read only

0 Likes
1,151

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.
ENdif

Cheerz

Hope this serves your purpose

Ram

Read only

0 Likes
1,151

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

Read only

Former Member
0 Likes
1,151

Hi ria,

Check the function module "STATUS_SHOW_CHANGE_DOCUMENTS".

Regards

Vinod