‎2010 Jan 04 12:19 PM
Hi
I have searched a lot through sdn, but I couldn't find even one sample data which works.
I need to create a PM notification, with just an equipment.. nothing extra.
I just want some sample data to be passed to BAPI_ALM_NOTIF_CREATE FM.
I am passing the data acc to my understanding, running the BAPI_ALM_NOTIF_CREATE & BAPI_ALM_NOTIF_SAVE & BAPI_TRANSACTION_COMMIT.
The surprising this is I am getting nothing in RETURN in BAPI_ALM_NOTIF_CREATE.
Kindly help.
Regards
Ankur Malhotra
‎2010 Jan 04 12:26 PM
Check this similar one
link:[http://www.sap-img.com/abap/bapi-alm-notif-create-maintenance-notification.htm]
‎2010 Jan 04 12:54 PM
@Keshav: That was not helpful. I need some sample data with which this BAPI will get executed successfully.
Kindly help.
Ankur
‎2010 Jan 05 8:57 AM
Hi All,
I have created a Z FM and coded the following inside it:
+DATA: gt_return TYPE TABLE OF bapiret2 WITH HEADER LINE.
CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'
EXPORTING
notif_type = notif_type
notifheader = notifheader
task_determination = 'X'
IMPORTING
notifheader_export = notifheader_export
TABLES
notitem = notifitem
notiftask = notiftask
return = gt_return.
APPEND gt_return TO return.
CLEAR: gt_return. REFRESH: gt_return.
CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'
EXPORTING
number = notifheader_export-notif_no
IMPORTING
notifheader = notifheader_export
TABLES
return = gt_return.
APPEND gt_return TO return.
CLEAR: gt_return. REFRESH: gt_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
IMPORTING
return = gt_return.
APPEND gt_return TO return.
CLEAR: gt_return. REFRESH: gt_return.+
It is working now
Regards,
Ankur
‎2015 Aug 26 12:00 AM
Thanks Ankur, I just solved my problem using this code.
Regards from Bogotá - Colombia
Felipe Uribe
‎2010 Jan 04 12:31 PM
Hi Ankur
WA_NOTIF-NOTIF_TYPE = '05'.
WA_NOTIF-REFOBJECTTYPE = 'IF1001006'.
APPEND WA_NOTIF TO IT_NOTIF.
CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'
EXPORTING
* EXTERNAL_NUMBER =
notif_type = WA_NOTIF-NOTIF
notifheader = WA_NOTIF-REFOBJECTTYPE
* TASK_DETERMINATION = ' '
* SENDER =
* ORDERID =
* IMPORTING
* NOTIFHEADER_EXPORT =
* TABLES
* NOTITEM =
* NOTIFCAUS =
* NOTIFACTV =
* NOTIFTASK =
* NOTIFPARTNR =
* LONGTEXTS =
* KEY_RELATIONSHIPS =
* RETURN =
.
iF RETURN IS NOT INITIAL.
WRITE : 'SUCCESS'.
ENDIF.Use the sample code.
Regards
vijay
‎2010 Jan 04 12:51 PM
Just a quick question: What is WA_NOTIF's type?
And also what is to be passed in REFOBJECTTYPE?
Also in the below code, we are passing WA_NOTIF-REFOBJECTTYPE to notifheader, Is this right?
Ankur
‎2021 Sep 03 6:18 PM
BAPI return has error with this: "Notification type 05 not defined"
‎2021 Sep 03 6:28 PM
There is a useful community wiki here.
If you go to T-Code IW51 for SN Creation you can see the list of notification types defined in the system. The defaults appear to be:
S1 Problem Notification
S2 Activity Report
S3 Service Request