BAPI_ALM_NOTIF_CREATE - Maintenance Notification

I am trying to use BAPI "BAPI_ALM_NOTIF_CREATE" to create Maintenance Notification.  I am working on SAP ECC 5.0 Version.  When I try to create the same using IW21 transaction, by just passing Notificaiton type, Equiment Number and short text, I am able to create the notification.
If I try to pass the same value to BAPI, I am not getting the notification created, but also it is not giving back any message to return table.

To create items, causes, tasks, or actions, the sort field must be filled.

When you create a cause, the sort field of the item must also be filled.

When you create a long text, the fields OBJTYP and OBJKEY must be filled. OBJTYP can have the following values:

1. QMEL - Notification header
2. QMFE - Notification item
3. QMUR - Notification cause
4. QMSM - Notification task
5. QMMA - Notification action

OBJKEY must have the corresponding sort field for the values named above. The combination of sort field of item/cause, item/task and item/action must be unique within a notification. If you leave the sort field empty and the OBJTYP = QME, then a long text is created for the notification header.

In the field REFOBJECTKEY an external reference can be transferred. The link between external reference keys and R/3 keys is transferred in the export table KEY_RELATIONSHIP. If the fields SENDER, REFOBJECTTYPE and REFRELTYPE are filled, then an object link can be created at notification header level.

ABAP Tips by : Veeru 

See Also
Changed Service Order Status Upon Service Confirmation

SAP Books
SAP Certification, Interview Questions, Functional, Basis Administration and ABAP Programming Reference Books

More ABAP Tips

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.