Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

regarding STATUS_TEXT_EDIT

i need to get the production orders which are having the status 'REL' and not 'lkd', DLFL AND DLT AND CRTD....

and i have to use the table to get production orders AUFK.....

i have to pass the functional module to get production order statuses...STATUS_TEXT_EDIT...

my question is how to write the select statement for passing this FUNCTIONAL MODULE and how to use this FM for getting the order status...

Former Member
Former Member replied

I don't think you should be using STATUS_TEXT_EDIT if you don't have the order number to start with.

Try something like:

SELECT objnr
  INTO w_rel
  FROM jest
  WHERE stat in ( select single istat from tj02t where spras = 'E' and txt04 = 'REL' )
  AND       inact = space.

  SELECT SINGLE *
    FROM jest
    WHERE objnr = w_rel
    AND       stat in ( select istat from tj02t where spras = 'E' and txt04 in ('LKD', 'DLFL', 'DLT', 'CRTD') 
    AND       inact = space.

  IF sy-subrc <> 0.
    SELECT SINGLE aufnr
      INTO CORRESPONDING TABLE it_aufnr
      FROM aufk
      WHERE objnr = w_rel.
  ENDIF.
ENDSELECT.

This is a quick bit of code, I'm sure you can improve on it.

Edited by: Michael Evershed on Oct 2, 2008 7:42 PM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question