Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FM to create plant maintenance notification

Former Member
0 Likes
2,149

Hi all,

Could anyone help me with this problem! Notification is not getting created when i call the standard BAPI BAPI_ALM_NOTIF_CREATE. I have called the BAPI_TRANSACTION_COMMIT .

Tha BAPI returns a notification number .But when i check with this notification number i get a message Notification doesnt exist.

Can anyone give me a solution for this.

Thanks,

Renjitha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,305

Are you checking with the number that is returned from the bapi:

NOTIFHEADER_EXPORT-NOTIF_NO ?

7 REPLIES 7
Read only

suresh_datti
Active Contributor
0 Likes
1,305

Did you check if the Notification number exists in the Table QMEL?

~Suresh

Read only

0 Likes
1,305

Yes it doesnt exist in the table QMEL

Read only

Former Member
0 Likes
1,306

Are you checking with the number that is returned from the bapi:

NOTIFHEADER_EXPORT-NOTIF_NO ?

Read only

0 Likes
1,305

Yes ....I checked with NOTIFHEADER_EXPORT-NOTIF_NO .But doesnt exist.

Read only

0 Likes
1,305

Hi Renjitha,

If you call the save BAPI you will be able to retrieve the noti #.

Call these in the following order.

1) BAPI_ALM_NOTIF_CREATE

2) BAPI_ALM_NOTIF_SAVE <--- Noti returned from this BAPI.

3) BAPI_TRANSACTION_COMMIT

Regards,

Jason Lante

Read only

Former Member
0 Likes
1,305

Hi Renjitha Nambiar,

You need to call 3 FM's.....

CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'

EXPORTING

notif_type = wa_notif_type-notif_type

notifheader = wa_notif_header

IMPORTING

notifheader_export = wa_result

TABLES

notitem = t_notifitem

notifpartnr = t_notifpartner

longtexts = t_longtext

return = t_message.

you need to pass the WA_RESULT value in 2nd FM...

CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'

EXPORTING

number = wa_result-notif_no

TABLES

return = t_message.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = c_x.

Regards,

Sivaram.

Read only

Former Member
0 Likes
1,305

Hi all,

Thanks a lot for your responses. My problem is solved...

Kindly close this topic.

Thanks a lot,

Renjitha