on 2020 Sep 02 10:35 AM
I have a requirement to change the date on work orders during Technical Completion and have written a script. The issue is with some work orders the field name is RIARCH-ADDAT & some other work orders use RIWO1-BEZDT for the close date.
How do I edit my script to work for either field name?
Session.findById("wnd[1]/usr/ctxtRIARCH-ADDAT").Text = B Session.findById("wnd[1]/usr/ctxtRIWO1-BEZDT").Text = B
Currently I run the script for 1 field, then change it and run it again. I just can't get it to work 😞
Thanks all!
Dan,
For future reference; you will get a better response if you also tag your posts with: PLM Enterprise Asset Management (EAM)/Plant Maintenance (PM).
I think the difference is because of a maintenance plan assignment. So the system uses RIWO1-BEZDT if there is no maintenance plan, and RIARCH-ADDAT/RIARCH-NPLDA if a maintenance plan is assigned. THis difference in dates is triggered via IMG settings in node Set Maintenance Plan Categories - specifically the Completion Data checkbox.
So try adding an "IF" statement checking if the CAUFVD-WARPL field is populated (i.e. a plan is assigned), assuming all of the checkboxes in the above IMG node re active. If they aren't, then you will need to readt table T399W to determine the MPCONFDATE value.
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.