2014 Feb 25 7:16 AM
Hello All,
I am trying to use BAPI "BAPI_ALM_NOTIF_CREATE" to create Maintenance Notification. I am working on SAP ECC 6.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.
2014 Feb 25 8:25 AM
After using BAPI_ALM_NOTIF_GET_DETAIL and i passed the data in this bapi but still i'm not getting notification number.
2014 Feb 25 7:38 AM
Hi ashok,
Please check your notification number in export parameter NOTIFHEADER_EXPORT.
If everything is correct, you may not get the return table.
Use BAPI_TRANSACTION_COMMIT and check the value of notif number.
Arivazhagan S
2014 Feb 25 7:45 AM
I was passing sufficient data to bapi it was returning notification number "%0000000001".
and i entered the same data in iw21 i got notification number so i'm clear that data is correct,but i'm not sure that why i'm getting this temparary number?
2014 Feb 25 8:02 AM
Hi Ashok
Please call BAPI_ALM_NOTIF_SAVE and BAPI_TRANSACTION_COMMIT after the BAPI call. NOTIF_SAVE will return you the number
Nabheet
2014 Feb 25 8:07 AM
hi first use BAPI
BAPI_ALM_NOTIF_GET_DETAIL and pass already created notification number to it.
it will give all the details of that notifications it will also help you to understand what parameters are to be passed to BAPI_ALM_NOTIF_CREATE . pass same parameters and check if it is creating notifications. i did same thing in my sytem and got details of notification number using it.
2014 Feb 25 8:19 AM
Ok i will use BAPI_ALM_NOTIF_SAVE and BAPI_TRANSACTION_COMMIT after the BAPI call,But input for BAPI_ALM_NOTIF_SAVE is notification number how can i give that?
2014 Feb 25 8:27 AM
You pass the importing notifheader_export-notif_no to the save BAPI
Nabheet
2014 Feb 25 8:36 AM
when i pass the export parameter of Bapi_create to import of bapi_save it will shortdump due to type conflict error.so i need to enter only notification number to bapi_save
2014 Feb 25 8:40 AM
Ashok do one thing check sample code in FM EM_NTF_ORD_CREATE it is calling all three and adapt accordingly
Nabheet
2014 Feb 25 11:09 AM
Hi Ashok,
You may given
CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'
EXPORTING
NUMBER = OUT-NOTIF_NO
* TOGETHER_WITH_ORDER = ' '
IMPORTING
NOTIFHEADER = OUTPUT-NOTIF_NO.
NOTIFHEADER = OUTPUT
You have to give OUTPUT NOT OUTPUT-NOTIF_NO.
Please check.
Arivazhagan S
2014 Feb 25 8:25 AM
After using BAPI_ALM_NOTIF_GET_DETAIL and i passed the data in this bapi but still i'm not getting notification number.
2014 Feb 25 8:35 AM
Hi Ashok,
Write a code like below and you will get required output..
DATA: HEAD TYPE BAPI2080_NOTHDRI,
OUT TYPE BAPI2080_NOTHDRE,
OUTPUT TYPE BAPI2080_NOTHDRE.
HEAD-SHORT_TEXT = 'Testing'.
HEAD-FUNCT_LOC = 'test'.
HEAD-REPORTEDBY = 'user'.
CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'
EXPORTING
* EXTERNAL_NUMBER =
NOTIF_TYPE = 'Z1'
NOTIFHEADER = HEAD
* TASK_DETERMINATION = ' '
* SENDER =
* ORDERID =
* IV_DONT_CHK_MANDATORY_PARTNER =
IMPORTING
NOTIFHEADER_EXPORT = OUT.
CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'
EXPORTING
NUMBER = OUT-NOTIF_NO
* TOGETHER_WITH_ORDER = ' '
IMPORTING
NOTIFHEADER = OUTPUT.
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
* IMPORTING
* RETURN =
.
WRITE OUTPUT-NOTIF_NO.
Arivazhagan S
2014 Feb 25 8:41 AM