Application Development 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: 

FM to create plant maintenance notification

Former Member
0 Kudos
1,063

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

former_member181962
Active Contributor
0 Kudos
219

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

NOTIFHEADER_EXPORT-NOTIF_NO ?

7 REPLIES 7

suresh_datti
Active Contributor
0 Kudos
219

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

~Suresh

0 Kudos
219

Yes it doesnt exist in the table QMEL

former_member181962
Active Contributor
0 Kudos
220

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

NOTIFHEADER_EXPORT-NOTIF_NO ?

0 Kudos
219

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

0 Kudos
219

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

Former Member
0 Kudos
219

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.

Former Member
0 Kudos
219

Hi all,

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

Kindly close this topic.

Thanks a lot,

Renjitha