SAP PM Pack — Maintenance
The maintenance pack has two rather different uses, and it is worth choosing which one matters before installing:
- Reactive maintenance — the line breaks down, the operator opens a notification from a tablet, the technician confirms the time spent and the notification is closed.
- Preventive maintenance by measurement — the asset’s hour meter, piece counter or sensor temperature becomes a measurement document in SAP, and SAP triggers the preventive plan by itself.
The second one is the impressive one, and where the CMS does something a plain integration does not.
Before installing, read SAP Packs — the wizard and the parameters are shared by all three packs.
Measurement with no code
The CMS already reads OPC UA, Modbus, PI Web API and MQTT. The PM pack closes the other side. Put the two together and the path looks like this:
You configure the tag collection, forward it to the pack’s measurement interface, and the asset’s hour meter starts feeding SAP preventive maintenance. Without a line of code.
Two measurement recipes — which to use
| EAM MES integration | By measurement point | |
|---|---|---|
| Function | EAM_MES_CREATE_MEASUREM_DOCUM | MEASUREM_DOCUM_RFC_SINGLE_001 |
| You provide | The equipment | The measurement point number |
| When to use | The MES knows the asset, not SAP’s measurement structure | The MES was already set up with point numbers |
| Extra | — | Can auto-create a notification when the reading exceeds the limit |
The first is simpler and the recommended start. It requires the quantity role code, which identifies which quantity is being recorded — confirm it with the maintenance team and fill it in at step 3 of the wizard.
There is no measurement BAPI in this SAP release. The functions are classic modules
(MEASUREM_*), without the BAPI_ prefix. One of them commits by itself, which is why it is the
pack’s only delivery with “commit after call” turned off — enabling both would commit twice.
Maintenance notification
The notification type (M1 breakdown, M2 request, M3 activity) is a pack parameter. Confirm
which ones are active in your plant’s Customizing before installing.
As in QM, creating alone does not persist: BAPI_ALM_NOTIF_CREATE only builds the notification
in the RFC session’s memory. That is why the Open notification recipe calls BAPI_ALM_NOTIF_SAVE
next, in the same session, and commits — see
follow-up calls. The final number is the one
SAVE returns (NOTIFHEADER.NOTIF_NO); CREATE’s is provisional (%00000000001).
Two Deliveries do not make the pair. Forwarding the response of “Open” to “Save” looks like it works and saves nothing: each message opens its own RFC connection, and the notification created in the first does not exist in the second. It is the same session or nothing.
This is the recipe Help Desk uses to open a notification from an alert.
The full cycle available is create → save → in progress → close, plus postpone and complete task.
Note that BAPI_ALM_NOTIF_COMPLETE does not exist in this release — the real pair is
PUTINPROGRESS and CLOSE.
Gotchas in this pack
Counters only go up. Recording a reading lower than the last one fails. If the instrument was
replaced or reset, use a differential reading (leituraDiferencial) instead of the absolute value.
Volume. The measurement interface starts with a 50-message batch and a 2000 alert threshold, against 10 and 500 for the others: measurement is by far the pack’s highest volume. If you plan to record every minute, review the interface schedule before activating.
Equipment with no measurement point. If the asset has no point registered for that quantity, SAP rejects it. The pack maps the error; the master data is the maintenance team’s job.
Summary
31 recipes — 14 collection, 17 delivery — of which 12 essential.
Recipes
Order
| Recipe | Direction | SAP function | Solves |
|---|---|---|---|
| Maintenance order detail ·essential | Collection | BAPI_ALM_ORDER_GET_DETAIL | Header, operations and components of a PM order — what the technician needs on the tablet before going out. |
| Maintenance order backlog ·essential | Collection | BAPI_ALM_ORDERHEAD_GET_LIST | Lists PM orders by selection range — the backlog that feeds the maintenance board. |
| PM order time confirmation ·essential | Delivery | BAPI_ALM_CONF_CREATE | The technician confirms time spent on the maintenance order operation straight from the tablet. |
| Distribute PM order to the MES | Collection | EAM_MES_DISTRIBUTE_PMORD | Distribute PM order to the MES. Recipe generated from the EAM_MES_DISTRIBUTE_PMORD signature in SAP. |
| PM confirmations | Collection | BAPI_ALM_CONF_GETLIST | PM confirmations. Recipe generated from the BAPI_ALM_CONF_GETLIST signature in SAP. |
| PM confirmation detail | Collection | BAPI_ALM_CONF_GETDETAIL | PM confirmation detail. Recipe generated from the BAPI_ALM_CONF_GETDETAIL signature in SAP. |
| Cancel confirmation | Delivery | BAPI_ALM_CONF_CANCEL | Cancel confirmation. Recipe generated from the BAPI_ALM_CONF_CANCEL signature in SAP. |
Notification
| Recipe | Direction | SAP function | Solves |
|---|---|---|---|
| Maintenance notification detail ·essential | Collection | BAPI_ALM_NOTIF_GET_DETAIL | Item, cause, activity and long texts of a notification — the problem history. |
| Create maintenance notification ·essential | Delivery | BAPI_ALM_NOTIF_CREATE | A breakdown or anomaly on the line becomes a PM notification immediately, already linked to the equipment — nobody opens SAP. |
| Save maintenance notification ·essential | Delivery | BAPI_ALM_NOTIF_SAVE | Persists the notification created in the previous step. |
| Close maintenance notification ·essential | Delivery | BAPI_ALM_NOTIF_CLOSE | Closes the notification when the repair is done — the other end of the cycle opened on the line. |
| Notifications for an equipment | Collection | BAPI_ALM_NOTIF_LIST_EQUI | Notifications for an equipment. Recipe generated from the BAPI_ALM_NOTIF_LIST_EQUI signature in SAP. |
| Notifications for a functional location | Collection | BAPI_ALM_NOTIF_LIST_FUNCLOC | Notifications for a functional location. Recipe generated from the BAPI_ALM_NOTIF_LIST_FUNCLOC signature in SAP. |
| Add data to the notification | Delivery | BAPI_ALM_NOTIF_DATA_ADD | Add data to the notification. Recipe generated from the BAPI_ALM_NOTIF_DATA_ADD signature in SAP. |
| Change notification data | Delivery | BAPI_ALM_NOTIF_DATA_MODIFY | Change notification data. Recipe generated from the BAPI_ALM_NOTIF_DATA_MODIFY signature in SAP. |
| Put notification in process | Delivery | BAPI_ALM_NOTIF_PUTINPROGRESS | Put notification in process. Recipe generated from the BAPI_ALM_NOTIF_PUTINPROGRESS signature in SAP. |
| Postpone notification | Delivery | BAPI_ALM_NOTIF_POSTPONE | Postpone notification. Recipe generated from the BAPI_ALM_NOTIF_POSTPONE signature in SAP. |
| Complete notification task | Delivery | BAPI_ALM_NOTIF_TASK_COMPLETE | Complete notification task. Recipe generated from the BAPI_ALM_NOTIF_TASK_COMPLETE signature in SAP. |
Assets
| Recipe | Direction | SAP function | Solves |
|---|---|---|---|
| Equipment ·essential | Collection | BAPI_EQUI_GETDETAIL | Asset master data — what the MES mirrors to tie together line, machine and order. |
| Functional location ·essential | Collection | BAPI_FUNCLOC_GETDETAIL | The asset’s position in the plant’s technical hierarchy — used to group KPIs by area or line. |
| Measurement point ·essential | Collection | MEASUREM_POINT_RFC_SINGLE_002 | Measurement point data: quantity, unit and limits. What the SCADA needs to record the right reading in the right place. |
| Equipment list | Collection | BAPI_EQUI_GETLIST | Equipment list. Recipe generated from the BAPI_EQUI_GETLIST signature in SAP. |
| Functional location list | Collection | BAPI_FUNCLOC_GETLIST | Functional location list. Recipe generated from the BAPI_FUNCLOC_GETLIST signature in SAP. |
| Install equipment | Delivery | BAPI_EQUI_INSTALL | Install equipment. Recipe generated from the BAPI_EQUI_INSTALL signature in SAP. |
| Dismantle equipment | Delivery | BAPI_EQUI_DISMANTLE | Dismantle equipment. Recipe generated from the BAPI_EQUI_DISMANTLE signature in SAP. |
| Change equipment | Delivery | BAPI_EQUI_CHANGE | Change equipment. Recipe generated from the BAPI_EQUI_CHANGE signature in SAP. |
Measurement point
| Recipe | Direction | SAP function | Solves |
|---|---|---|---|
| Record measurement via EAM MES integration ·essential | Delivery | EAM_MES_CREATE_MEASUREM_DOCUM | A counter or sensor reading becomes a SAP measurement document. Paired with an OPC UA, Modbus or PI collection, it is the asset’s hour meter feeding preventive maintenance with no code. |
| Record measurement by measurement point ·essential | Delivery | MEASUREM_DOCUM_RFC_SINGLE_001 | Alternative to the previous recipe when the MES knows the measurement point number rather than the equipment. Can also auto-create a notification when the reading exceeds the limit. |
| Measurement entry list | Collection | MEASUREM_ENTRYLIST_READ_DB | Measurement entry list. Recipe generated from the MEASUREM_ENTRYLIST_READ_DB signature in SAP. |
| Record measurement document — variant | Delivery | MEASUREM_DOCUM_RFC_SINGLE_002 | Record measurement document — variant. Recipe generated from the MEASUREM_DOCUM_RFC_SINGLE_002 signature in SAP. |
| Cancel measurement document | Delivery | MEASUREM_DOCUM_RFC_CANCEL | Cancel measurement document. Recipe generated from the MEASUREM_DOCUM_RFC_CANCEL signature in SAP. |
Field contracts
Maintenance order detail
PREFIXO_PM_ORDEM_DETALHE — Your system provides these fields when calling the collection URL.
| Field | Required | SAP field |
|---|---|---|
ordem | yes | NUMBER |
Maintenance order backlog
PREFIXO_PM_ORDEM_LISTA — Your system provides these fields when calling the collection URL.
Needs review before activating. Created inactive with a sample selection range in IT_RANGES. Adjust field and value to your plant before activating — an unfiltered list can be huge.
No input fields: the recipe runs on the scheduler, with the values fixed in the pack parameters.
Maintenance notification detail
PREFIXO_PM_NOTIF_DETALHE — Your system provides these fields when calling the collection URL.
| Field | Required | SAP field |
|---|---|---|
notificacao | yes | NUMBER |
Equipment
PREFIXO_PM_EQUIPAMENTO — Your system provides these fields when calling the collection URL.
| Field | Required | SAP field |
|---|---|---|
equipamento | yes | EQUIPMENT |
Functional location
PREFIXO_PM_LOCAL_INSTALACAO — Your system provides these fields when calling the collection URL.
| Field | Required | SAP field |
|---|---|---|
localInstalacao | yes | FUNCTLOCATION |
Measurement point
PREFIXO_PM_PONTO_MEDICAO — Your system provides these fields when calling the collection URL.
Needs review before activating. Classic function module, not a BAPI: no BAPI_ prefix, read in display mode (empty EDIT_MODE). There is no BAPI_MEASUREMENTPOINT_* in this release.
| Field | Required | SAP field |
|---|---|---|
pontoMedicao | yes | MEASUREMENT_POINT |
Create maintenance notification
PREFIXO_PM_NOTIF_ABRIR — Your system sends these fields in the message body.
Needs review before activating. Creates AND saves the notification in one call: BAPI_ALM_NOTIF_CREATE and, in the same session, BAPI_ALM_NOTIF_SAVE (under “Call next”), with commit. The final number comes in BAPI_ALM_NOTIF_SAVE.NOTIFHEADER.NOTIF_NO — the one in NOTIFHEADER_EXPORT is temporary (%00000000001).
| Field | Required | SAP field |
|---|---|---|
descricao | yes | NOTIFHEADER.SHORT_TEXT |
equipamento | — | NOTIFHEADER.EQUIPMENT |
localInstalacao | — | NOTIFHEADER.FUNCT_LOC |
prioridade | — | NOTIFHEADER.PRIORITY |
dataInicioDesejada | — | NOTIFHEADER.DESSTDATE |
Save maintenance notification
PREFIXO_PM_NOTIF_GRAVAR — Your system sends these fields in the message body.
Needs review before activating. Only saves a notification still in the memory of the SAME RFC session — since each CMS message opens its own connection, this Delivery alone does not save the notification created by “Open notification”. Use “Open notification”, which already creates and saves in one call.
| Field | Required | SAP field |
|---|---|---|
notificacao | yes | NUMBER |
Close maintenance notification
PREFIXO_PM_NOTIF_ENCERRAR — Your system sends these fields in the message body.
| Field | Required | SAP field |
|---|---|---|
notificacao | yes | NUMBER |
dataEncerramento | — | SYSTSTAT.REFDATE |
horaEncerramento | — | SYSTSTAT.REFTIME |
Record measurement via EAM MES integration
PREFIXO_PM_MEDICAO_EAM — Your system sends these fields in the message body.
Needs review before activating. The interface starts with a 50-message batch and a 2000 alert threshold: measurements are usually the pack’s highest volume. Confirm the quantity role code with the maintenance team.
| Field | Required | SAP field |
|---|---|---|
equipamento | yes | IV_EQUIPMENT |
valor | yes | IV_RECORDED_VALUE |
dataLeitura | — | IV_READING_DATE |
horaLeitura | — | IV_READING_TIME |
responsavel | — | IV_READER |
leituraDiferencial | — | IV_DIFFERENCE_READING |
Record measurement by measurement point
PREFIXO_PM_MEDICAO_PONTO — Your system sends these fields in the message body.
Needs review before activating. Classic function module, not a BAPI: it commits itself via COMMIT_WORK=‘X’, so this is the pack’s only delivery with “commit after call” turned off — enabling both would commit twice.
| Field | Required | SAP field |
|---|---|---|
pontoMedicao | yes | MEASUREMENT_POINT |
valor | yes | RECORDED_VALUE |
unidade | — | RECORDED_UNIT |
dataLeitura | — | READING_DATE |
horaLeitura | — | READING_TIME |
responsavel | — | READER |
observacao | — | SHORT_TEXT |
leituraDiferencial | — | DIFFERENCE_READING |
PM order time confirmation
PREFIXO_PM_CONF_TEMPO — Your system sends these fields in the message body.
| Field | Required | SAP field |
|---|---|---|
ordem | yes | TIMETICKETS.ORDERID |
operacao | yes | TIMETICKETS.OPERATION |
trabalhoRealizado | yes | TIMETICKETS.ACT_WORK |
unidadeTrabalho | yes | TIMETICKETS.UN_WORK |
apontamentoFinal | — | TIMETICKETS.FIN_CONF |
dataLancamento | — | TIMETICKETS.POSTG_DATE |
observacao | — | TIMETICKETS.CONF_TEXT |
Notifications for an equipment
PREFIXO_PM_ALM_NOTIF_LIST_EQUI — Your system provides these fields when calling the collection URL.
| Field | Required | SAP field |
|---|---|---|
equipamento | yes | EQUIPMENT |
Notifications for a functional location
PREFIXO_PM_ALM_NOTIF_LIST_FUNCLOC — Your system provides these fields when calling the collection URL.
No input fields: the recipe runs on the scheduler, with the values fixed in the pack parameters.
Equipment list
PREFIXO_PM_EQUI_GETLIST — Your system provides these fields when calling the collection URL.
No input fields: the recipe runs on the scheduler, with the values fixed in the pack parameters.
Functional location list
PREFIXO_PM_FUNCLOC_GETLIST — Your system provides these fields when calling the collection URL.
No input fields: the recipe runs on the scheduler, with the values fixed in the pack parameters.
Measurement entry list
PREFIXO_PM_ENTRYLIST_READ_DB — Your system provides these fields when calling the collection URL.
No input fields: the recipe runs on the scheduler, with the values fixed in the pack parameters.
Distribute PM order to the MES
PREFIXO_PM_MES_DISTRIBUTE_PMORD — Your system provides these fields when calling the collection URL.
| Field | Required | SAP field |
|---|---|---|
itOrders | yes | IT_ORDERS |
PM confirmations
PREFIXO_PM_ALM_CONF_GETLIST — Your system provides these fields when calling the collection URL.
No input fields: the recipe runs on the scheduler, with the values fixed in the pack parameters.
PM confirmation detail
PREFIXO_PM_ALM_CONF_GETDETAIL — Your system provides these fields when calling the collection URL.
| Field | Required | SAP field |
|---|---|---|
numeroConfirmacao | yes | CONFIRMATION |
contadorConfirmacao | yes | CONFIRMATIONCOUNTER |
Add data to the notification
PREFIXO_PM_ALM_NOTIF_DATA_ADD — Your system sends these fields in the message body.
| Field | Required | SAP field |
|---|---|---|
numero | yes | NUMBER |
Change notification data
PREFIXO_PM_ALM_NOTIF_DATA_MODIFY — Your system sends these fields in the message body.
| Field | Required | SAP field |
|---|---|---|
numero | yes | NUMBER |
Put notification in process
PREFIXO_PM_ALM_NOTIF_PUTINPROGRESS — Your system sends these fields in the message body.
| Field | Required | SAP field |
|---|---|---|
numero | yes | NUMBER |
Postpone notification
PREFIXO_PM_ALM_NOTIF_POSTPONE — Your system sends these fields in the message body.
| Field | Required | SAP field |
|---|---|---|
numero | yes | NUMBER |
Complete notification task
PREFIXO_PM_ALM_NOTIF_TASK_COMPLETE — Your system sends these fields in the message body.
| Field | Required | SAP field |
|---|---|---|
numero | yes | NUMBER |
taskKey | yes | TASK_KEY |
Record measurement document — variant
PREFIXO_PM_DOCUM_RFC_SINGLE_002 — Your system sends these fields in the message body.
| Field | Required | SAP field |
|---|---|---|
measurementDocument | yes | MEASUREMENT_DOCUMENT |
Cancel measurement document
PREFIXO_PM_DOCUM_RFC_CANCEL — Your system sends these fields in the message body.
Needs review before activating. Created INACTIVE: the pack cannot guess the content — preencher a tabela IT_CANCEL_REQUESTS. Open the definition, use the “SAP Function Parameters” popup to fill it in, then activate.
No input fields: the recipe runs on the scheduler, with the values fixed in the pack parameters.
Cancel confirmation
PREFIXO_PM_ALM_CONF_CANCEL — Your system sends these fields in the message body.
| Field | Required | SAP field |
|---|---|---|
numeroConfirmacao | yes | CONFIRMATION |
contadorConfirmacao | yes | CONFIRMATIONCOUNTER |
Install equipment
PREFIXO_PM_EQUI_INSTALL — Your system sends these fields in the message body.
Needs review before activating. Created INACTIVE: the pack cannot guess the content — preencher a estrutura DATA_INSTALL. Open the definition, use the “SAP Function Parameters” popup to fill it in, then activate.
| Field | Required | SAP field |
|---|---|---|
equipamento | yes | EQUIPMENT |
Dismantle equipment
PREFIXO_PM_EQUI_DISMANTLE — Your system sends these fields in the message body.
| Field | Required | SAP field |
|---|---|---|
equipamento | yes | EQUIPMENT |
Change equipment
PREFIXO_PM_EQUI_CHANGE — Your system sends these fields in the message body.
Needs review before activating. Created INACTIVE: the pack cannot guess the content — preencher a estrutura DATA_GENERAL; preencher a estrutura DATA_GENERALX; preencher a estrutura DATA_SPECIFIC; preencher a estrutura DATA_SPECIFICX. Open the definition, use the “SAP Function Parameters” popup to fill it in, then activate.
| Field | Required | SAP field |
|---|---|---|
equipamento | yes | EQUIPMENT |