EAM PM Schedule Upload 11i

Description

Categories
Enginatics, Upload
Repository
GitHub
EAM Preventive Maintenance Schedule Upload
=========================================
Create or update Oracle EAM Preventive Maintenance schedule definitions, including:
- PM Schedule header (asset or asset group, activity, schedule name, set name, type, rescheduling point, etc.)
- Activity group (for Rule Based schedules: list of activities with interval multiples)
- Scheduling rules: Day Interval, Runtime / Meter, and List Date rules
- Optional Last Service info (per meter)

Row Model
=========
Each spreadsheet row can contain PM header values plus any populated child-object columns. The upload infers the object levels from populated column groups:
- Header columns identify and define the PM schedule.
- Act Activity columns add PM activity-group entries. If no Act Activity is entered for a new Rule Based schedule, the header Activity is used as the first activity entry.
- Rule columns add Day Interval, Runtime Meter, or List Date scheduling rules.
- LSI columns add optional last-service readings.

The upload saves schedules and rules as the Preventive Maintenance form does: a changed rule is updated in place, Delete Rule removes it, and a rule row without a rule id is added. Rule Last Service Reading is read-only.

Rows belonging to the same PM must repeat the same Organization Code + Schedule Name + Asset + Activity and remain contiguous. The header is processed once per PM; repeated rows are used for additional activities, rules, and last-service readings.

Upload Modes
============
Create - empty spreadsheet for new PM schedules.
Create, Update - downloads existing PM schedules for review/edit and allows adding new ones.

IMPORTANT on Update
-------------------
In Create, Update mode, use Update Activities / Update Rules / Update Last Service to include those child details in the downloaded template. Update Activities defaults to Yes; the other child sections are optional.

PM Set Name
===========
- Reference an existing Set Name, or
- Enter a new Set Name together with Set Name Description / End Date / Local Flag; the upload will auto-create it via EAM_SetName_PUB.

After Upload
============
Schedule and run the "XMLSG - Create Preventive Maintenance Work Order" concurrent program - uploading a PM schedule alone does not generate work orders.

SQL 298 lines

Parameters 5

ParameterTypeList of values SQL
Upload ModeLOV
:p_upload_mode like '%' || xxen_upload.action_update
OrganizationLOV
x.organization_code=:p_organization
Update ActivitiesLOV
Update RulesLOV
Update Last ServiceLOV