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: 

BAPI_ALM_NOTIF_CREATE not creating any maintenance notification.

Former Member
0 Kudos

I am trying to use the BAPI_ALM_NOTIF_CREATE bapi to create a notification. If I use the transaction IW21, I can create it perfectly. However, when I call the bapi from my z program, or from the transaction se37 (as a test), passing exactly the same data, it returns no error or information message, but the notification is never created when I check the result with the transaction IW23.

Am I missing some data to pass to the BAPI, that gets automatically created when using Tx IW21?

Any pointer, any light over this matter is GREATLY appreciated.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You need to call the Function module BAPI_ALM_NOTIF_SAVE after BAPI_ALM_NOTIF_CREATE.

Also you need to commit using BAPI_TRANSACTION_COMMIT.

Thanks

Romit

8 REPLIES 8

Former Member
0 Kudos

Hi,

You need to call the Function module BAPI_ALM_NOTIF_SAVE after BAPI_ALM_NOTIF_CREATE.

Also you need to commit using BAPI_TRANSACTION_COMMIT.

Thanks

Romit

0 Kudos

Thanks Romit! I applied your ideas and it worked perfectly... thanks again.

0 Kudos

Hi,

I am also facing the same problem as you in creating th e Notification.if i create a test Program and call the sequesnce of Fuction modules PI_ALM_NOTIF_CREATE,BAPI_NOTIF_SAVE,BAPI_TRANSACTION_COMMIT Motification is successfully creating .where as if i call theses 3 FM's in BAPI FM which creates PM Order theNotification is not getting created .Could you please share your Experience on this issue..it would be helpful for me.

Thanks in advance.

Regards,

Ramu.

0 Kudos

Hi. That BAPI is actually pretty easy. The main idea is:

1. Create the notification with BAPI_ALM_NOTIF_CREATE

2. Save the notification with BAPI_ALM_NOTIF_SAVE

3. Do a BAPI_TRANSACTION_COMMIT

In my experience, I would suggest that you get the notification number from BAPI_ALM_NOTIF_CREATE within the field notifheader_export-notif_no.

You then pass that as a parameter to the save function module. Note that the field is actually a CHAR field, so the number '01' is actually different than '001', That's why it is better to take the notification number from the notifheader_export structure (specially if you are assigning external numbers to the notification)

0 Kudos

HI,

Please tell me if i want to create notifcation by executing FM BAPI_ALM_NOTIF_CREATE.how to pass parameters?

Thanks,

Anil

0 Kudos

HI,

Please tell me if i want to create notifcation by executing FM BAPI_ALM_NOTIF_CREATE.how to pass parameters?

Are there any madatory fields and dependencies between HDR>> other tables

Thanks,

Rao

Former Member
0 Kudos

Thanks for the quick response!

I used it in a test Y program and it worked, but now in the Z program it doesn't work I suspect it is because the bapi is called inside a function module, which in turn is called 'in update task' (V1). Where should I call the BAPI_TRANSACTION_COMMIT function module? Inside my Z-function module or outside. If I call it inside the function... couldn't that compromise the integrity of the DB? (I have to do another DB changes along with the PM/CS BAPI)

0 Kudos

Hehehe... I just realized (the hard way) that it is not possible to do commit work inside an update function. hehehe... I should have read more carefully my ABAP academy books....