Hi Sandra,
I have created a Z function module. Inside the function module I'm using BAPI_ALM_NOTIF_SAVE. So I'm creating notification based on sub operation of an PM order. A PM order may have several operation and sub operation. So that is why I'm using this BAPI inside the loop.
Regards
Shankar