Check that the event name that you specify has been defined in the SAP system (with transaction SM62). A return code of 0 indicates that the event is defined in the SAP system.
For more information, please see the online documentation in the function module facility (transaction SE37).