Skip to Content
0

Updating user status for Closed Work orders

Nov 28, 2016 at 05:30 PM

97

avatar image

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,

Sunil.K

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Peter Atkin Nov 29, 2016 at 02:35 PM
0
  • 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

PeteA

Share
10 |10000 characters needed characters left characters exceeded
KOTAGIRI Sunil Dec 04, 2016 at 01:27 AM
0
Thanks Pete for your kind suggestion. Regards, Sunil.K
Share
10 |10000 characters needed characters left characters exceeded
KOTAGIRI Sunil Dec 04, 2016 at 02:33 AM
0
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
Share
10 |10000 characters needed characters left characters exceeded
K Jogeswara Rao Dec 04, 2016 at 03:44 AM
0

KOTAGIRI,

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.
PARAMETERS: p_stat TYPE char5 OBLIGATORY.

SELECT objnr INTO TABLE itab FROM aufk WHERE aufnr IN so_aufnr.
LOOP AT itab INTO wa.
 CALL FUNCTION 'STATUS_CHANGE_EXTERN'
 EXPORTING
 objnr = wa-objnr
 user_status = p_stat
 set_inact = ' '.
COMMIT WORK.
ENDLOOP.

Note:

  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

Share
10 |10000 characters needed characters left characters exceeded