Skip to Content

Updating user status for Closed Work orders

Hi Friends,

there would be requirement of updating User status for the Business closed work orders which are in thousands.

is there any way to accomplish the requirement,please let me know

thanks & Regards,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Nov 29, 2016 at 02:35 PM
    • Reverse the status back to TECO via program or IW38
    • Change the user-status via program
    • Set the status to CLSD via program or IW38


    Add comment
    10|10000 characters needed characters exceeded

  • Dec 04, 2016 at 01:27 AM
    Thanks Pete for your kind suggestion. Regards, Sunil.K
    Add comment
    10|10000 characters needed characters exceeded

  • Dec 04, 2016 at 02:33 AM
    I have one more issue Pete, Could you please suggest.. One of the user has deleted the Status profile "XXXXX" and its been imported to QAS as well because of that thousands of records (work orders) which as having "XXXXX" profile had the changes in status (Discrepancy in the records from PRD to DEV/QAS) profile, however in order to restore the normal situation again he created "XXXXX" profile by copying "XXXYY" but unfortunately both profiles are not same, so once again "XXXYY" moved to QAS which is having slight difference with "XXXXX" profile. Again realized and made the changes to "XXXYY" profile (Removed 4 user statuses) and ensure that perfect sync with"XXXXX" profile. (the TR laying in Golden client only) and copied TR to testing client and checked the user statuses of "XXXXX" profile but still discrepancy in the work orders user statuses records. Could you please suggest how to restore the statuses in the effected work orders.. and hurdle over here is first two TR's already got released and laying in Quality . Thanks in advance. Regards, Sunil.K
    Add comment
    10|10000 characters needed characters exceeded

  • Dec 04, 2016 at 03:44 AM


    It is possible to set user status to large number of CLSD Orders with the help of function module STATUS_CHANGE_EXTERN.

    See the small program below written for this purpose.

    REPORT zkjr_set_ustat
    tables: aufk.
    TYPES: BEGIN OF ty_ord,
           objnr TYPE j_objnr,
     END OF ty_ord.
    DATA: itab TYPE TABLE OF ty_ord,
         wa TYPE ty_ord.
    SELECT-OPTIONS:so_aufnr for aufk-aufnr.
    SELECT objnr INTO TABLE itab FROM aufk WHERE aufnr IN so_aufnr.
    LOOP AT itab INTO wa.
     objnr = wa-objnr
     user_status = p_stat
     set_inact = ' '.


    1. In the selection screen you need to input your CLSD Order-list in field SO_AUFNR.
    2. And give the status to be set in the field P_STAT. Please note that this status is a 5char code starting with E, like E0005. This you will get from table TJ30T by inputting the status profile in STSMA field and your Status text in TXT04 field.
    3. I tested this program and working well.
    4. To make it simpler I did not give any success or error messages. So after executing the program will not give you any feed back. You need to verify by going to IW33 or IW38.
    5. Through this program 1000s of Orders will get the desired status set withing seconds.
    6. I need not specially remind you to Test Well in DEV clients, get assured before using it for realtime need.

    Good luck

    Add comment
    10|10000 characters needed characters exceeded