Workmode API in FRUN
Workmode API in FRUN
Workmode API in FRUN
FRUN F01 has two set of APIs for Work Mode Management.
1. Adhoc API: The Adhoc API can be made use to quickly start and stop work mode for
a technical component. The Adhoc APIs must be used in the following cases:
b. You want to schedule a work mode for a duration with a time offset
c. You want to create work mode on multiple systems by supplying a short SID
2. Work Mode Generic APIs: These APIs can be made use to query, create, delete, edit
work modes.
From FRUN F01, the Work Mode application has introduced Adhoc Start and Stop of
Work Modes through RFC enabled Function Modules. This can be enhanced into a web-
service also.
Function module/API
Use Case Class Method Parameters/Description
Specify the Short SID, with
Start Adhoc Work FM_START_ADHOC_WOR Customer Network. You may
Modes KMODE also specify Instance Name, WM
Type, System Type etc.
Specify the Short SID, with
Stop Adhoc Work FM_STOP_ADHOC_WORK Customer Network. You may
Modes MODE also specify Instance Name, WM
Type, System Type etc.
1.1 FM_START_ADHOC_WORKMODE:
Importing Parameter:
Note:
2. Entering the 3 letter System id into field IV_SYSTEM_ID will schedule work
mode on all technical systems in the provided customer network that has the
same system id (Short SID = FA7 implies FA7~ABAP, FA7~JAVA,
FA70001~BOBJ).
4. Supply Short SID, System Type, Instance name to schedule work mode directly
on an instance. The supported instance types are ABAP and JAVA technical
instances.
5. The Naming Convention to follow for technical Instance: Use the caption/Display
name of the technical instance in the LMDB screen.
8. If you do not specify an Offset, duration or title, these values will be picked from
the work mode Customizing table, “WMM_CUSTOM”. If it is not maintained in
WMM_CUSTOM and is not supplied during execution, the function module
execution will be aborted.
9. The Time zone is UTC by default. There is no option to specify time zone as of
now.
Importing Parameter:
Note:
3. IV_WM_TYPE if specified stops only the work modes of that type. The default
value is ‘010’ i.e., Planned Downtime.
2. Work Mode Generic APIs:
These APIs are part of CL_WMM_API class. Please open transaction se24 and
navigate to CL_WMM_API to use these.
Moreover, the IV_CURRENT flag can be used to retrieve the active/inactive work
modes.
Importing Parameter:
Exporting Parameter:
Note:
Importing Parameter:
Exporting Parameters:
Exceptions:
Note:
1. The Time zone is used to convert the timestamps to UTC. The user may enter in
the timestamp in any time zone.
2. The exporting parameter EV_WMM_GUID can be supplied to the
DELETE_WORKMODE or EDIT_WORKMODE to delete/edit the work mode.
3. Overlapping work modes are possible. User is not notified in case of one. The API
creates a new work mode and returns a new EV_WORKMODE_GUID. An
overlapping work mode with a lesser priority is also accepted.
4. This API creates a work mode while the FM_GET_WORKMODES retrieves the
existing work modes.
2.3 EDIT_WORKMODE:
The EDIT_WORKMODE API can be used to edit a previously created work mode.
The user may edit title, category, start, end, time zone, description. If the user is
not planning to change a mandatory field you are supposed to provide the old
value again.
The Category and Description fields are made optional whereas the title, start
time, end time and time zone are a mandate.
Importing parameters:
No. PARAMETER NAME TYPE EXAMPLE
1 IV_WMM_GUID CHAR32 AD0560342341890923
849235783ABT12
2 IV_TITLE CHAR120 Test
3 IV_CATEGORY WMM_D_CATEGORY 002
4 IV_START TZNTSTMPS 20170802000000
5 IV_END TZNTSTMPS 20170803000000
6 IV_TIMEZONE TZNZONE INDIA
7 IV_DESCRIPTION STRING Test
Exporting parameters:
Exceptions:
2.4 DELETE_WORKMODE:
Importing parameters:
Exporting parameters:
Exceptions:
Note:
The Adhoc APIs are RFC enabled and can thus be called via RFC. If you
would like to achieve that external systems can start and stop work modes
(e.g. planned downtimes) by web services, you need to create the
corresponding web services as follows:
1) Call transaction SE80. Select Function group FG_EXTERNAL_APIS.