Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Oct 02, 2008 at 05:37 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Declare a final internal table and append internal tables to final internal table after each select. your are set.

      In the above code after every select append that itab to final itab.

      Thanks,

      Sree.