Application Development 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: 

FM to get Production Order user status (CO03) and system status

Former Member

Is there an FM to get Production Order user status (CO03)?

I used STATUS_READ but it shows more active status than displayed on the transaction CO03...why?

1 ACCEPTED SOLUTION

Former Member

Hello Miljo,

Status_read is the correct FM to get status of FM.

You have to sort the status by read command and keep command whatever status you need.

it is similar to JEST table..

Thanks

Seshu

7 REPLIES 7

Former Member
0 Kudos

Former Member

Hello Miljo,

Status_read is the correct FM to get status of FM.

You have to sort the status by read command and keep command whatever status you need.

it is similar to JEST table..

Thanks

Seshu

gopi_narendra
Active Contributor

STATUS_READ is used to get the Status of a Production Order

See the code below


  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.
 " to get the texts of statuses
  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

STATUS_READ does not display as CS03

I have used this and it displays as CS03 statuses

CALL FUNCTION 'STATUS_TEXT_EDIT'

EXPORTING

flg_user_stat = 'X'

objnr = caufvd-objnr

only_active = 'X'

spras = sy-langu

IMPORTING

anw_stat_existing = caufvd-astex

line = t_hresb-sttxt

user_line = t_hresb-asttx

EXCEPTIONS

object_not_found = 01.

Former Member
0 Kudos

i had figured out the best solution is to use FM 'STATUS_TEXT_EDIT'

0 Kudos

Hi ,

Very helpful answer...!!!

Ashutosh K

0 Kudos

We can use FM 'AIP9_STATUS_READ'

Logic Pass OBJNR from CAUFV to above FM and get

1) User status

2) System Status