cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_ALM_NOTIF_CREATE - unable to create notification

Former Member
0 Kudos

Hello experts!

I'm trying to create notification in SAP ERP via SAP MII. I've searched a lot about this in SCN and other resources. I've figured out that I need to use two BAPIs:

1. BAPI_ALM_NOTIF_CREATE - to create notification;

2. BAPI_ALM_NOTIF_SAVE - to save notification.

According to my scenario I should pass only notification type, functional location and breakdown flag. So I fill the following BAPI input nodes:

/BAPI_ALM_NOTIF_CREATE/INPUT/NOTIF_TYPE = notification type;

/BAPI_ALM_NOTIF_CREATE/INPUT/NOTIFHEADER/FUNCT_LOC = functional location;

/BAPI_ALM_NOTIF_CREATE/INPUT/NOTIFHEADER/BREAKDOWN = breakdown flag.

After execution BAPI_ALM_NOTIF_CREATE returns temporary notification number '%00000000001'. Then I pass this number into BAPI_ALM_NOTIF_SAVE (node {/BAPI_ALM_NOTIF_SAVE/INPUT/NUMBER).

At this step I am facing a problem: BAPI_ALM_NOTIF_SAVE returns error message E IM 258 Object does not exist (Status Management).

I assume, that not all of required parameters in BAPI_ALM_NOTIF_CREATE are filled and that's why BAPI_ALM_NOTIF_SAVE can not save the message. Is that correct? If so, what are minimal requirements to create message in BAPI_ALM_NOTIF_CREATE?

Maybe there is another cause?

Can somebody please help me to solve this problem?

Any reply will be greatly aprreciated!

Thanks in advance,

Vitaliy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi Vitaliy, there is an additional point.

If you are using the JRA connection from MII to ERP then the standard implementation will autocommit the action, which will prevent you to do a double call. You then have to set a special flag in the JRA connection in order to disable the autocommit functionality.

So in order for you scenario to work you should set the flag autocommit to false. This is described in the installation guide for 12.2.

"AutoCommit

You can define the AutoCommit property for the JRA resource from NetWeaver Administrator.

For more information, see SAP Note 1638870."

This actually does not seem to be in the latest release of the documentation, you may create a ticket for that.

Hope it helps,

Arnaud

Former Member
0 Kudos

Hello Arnaud,

Thank you alot for your reply. I've paid attention to autocommit option and set flag to false. But the result is still the same..

Best Regards,

Vitaliy

Former Member
0 Kudos

Ho Vitaliy, you may want to restart your netweaver stack in case.

Arnaud

Former Member
0 Kudos

Hi Vitaliy, just for the sake of clarity, I'm not talking about the Autocommit in the Workbench and the JRA action, but the one in the Netwaver stack where you create your JRA resource.

Just in case,

Arnaud

Former Member
0 Kudos

Hi Arnaud,

Thank you for making it clear. I've been talking about Workbench...

So, If I've understood you correctly, I should disable autocommit for JRA in Netwaver. And then in Workbench by selecting Autocommit Flag in JRA Action I will decide to autocommit or not current JRA Action?

Is that correct?

Best Regards,

Vitaliy

Former Member
0 Kudos

Hi Vitaliy, yes this is correct.

Arnaud

Former Member
0 Kudos

Hi Arnaud,

Success! Disabling autocommit on NetWeaver level resolve the problem!

Thank you a lot!

Best Regards,

Vitaliy

Former Member
0 Kudos

Your welcome

former_member204240
Active Participant
0 Kudos

Hi Arnaud,

Is it the problem of double commit is only with JRA action(which comes with auto commit)?

JCO action works fine?

Just curious to know whether this is only with some versions or how?

Regards,

Padma Rao

Former Member
0 Kudos

Hi Padma, the behaviour is across version and is due to the implementation of the JRA resource in Netweaver, I've noticed it for the first time in 7.11 but it is possibly also in previous versions.

It is only mentioned in 12.2 installation guide and is more linked to the version of your Netweaver stack than the version of MII. So for me, the behaviour is going to stay for a while.

Best Regards,

Arnaud

former_member204240
Active Participant
0 Kudos

Thanks for the update.

Have a great day!

Answers (6)

Answers (6)

Former Member
0 Kudos

Hello, everyone!

Thank you a lot for your replies, they were very helpful! Hope this thread would help another developer, who will face this issue.

Thank's again!

Best Regards,

Vitaliy

former_member193328
Active Participant
0 Kudos

Hi Vitaly

Which version of MII are you using?

Ideally you have to call the CREATE and SAVE BAPI in the same ABAP LUW. This can be achieved in MII using the JCO Start and End sessions.

I created a sample transaction and added the flow here as image. Let me know if this is clear to you or not.

Regards

Partha

Former Member
0 Kudos

Hello Partha,

Thank you a alot for reply and for an example. I am using MII 14 and JRA connection instead of JCO. But I've developed my BLS identically to your example and unfortunately the result is the same - Notification Save Action Block returns an error:

E IM 258 Object doesn't exist (status management)

I've checked out autocommit flags in JRA calls, but this gave no results.

Maybe LUW creation is not avaliable form remote systems (like MII)?

Best Regards,

Vitaliy

Former Member
0 Kudos

Hello Gurus,

Thank you a lot for your replies. I've tried to build my BLS transaction according to your suggestions, but unfortunately I still have the same result:

BAPI_ALM_NOTIF_CREATE returns temporary notification number %00000000001

BAPI_ALM_NOTIF_SAVE with that notifacation number returns an error "E IM 258 Object doesn't exist (status management)"

I guess I should explore notification statuses, maybe there is the cause..

Maybe there are any other suggestions?

Thanks in advance!

Vitaliy

0 Kudos

Hi Vitaly,

Are you solely working in MII or have you also been working in BAPI or SE37 for testing?  For BAPIs that I have not worked with before, I usually try to do the t-code first with sample information, view it in MII, then go back and try to replicate it in SE37/BAPI.  Some fields get populated automatically from the regular input screen or even SE37 that do not get populated automatically in MII.  Going through the regular process, then reviewing the contents of the xml document in MII will often provide insight into formatting and contents which you will not get inside the workbench.

Regards, Mike

SAP Rapid Innovation Group - RIG

Former Member
0 Kudos

Hello Mike,

Thank you a lot for reply and good advice! I always check BAPIs that are new for me in SE37 first and then go to MII. But this time I've missed that step..

I will try to figure out what is going wrong in SE37..

Thank you again!

Best Regards,

Vitaliy

Former Member
0 Kudos

Hi Vitaliy,

Few days ago, I have worked on ALM Notif Create. There I have passed below parameters. So you can try with that.

Request{/BAPI_ALM_NOTIF_CREATE/INPUT/NOTIFHEADER/EQUIPMENT} - Equipment ID

Request{/BAPI_ALM_NOTIF_CREATE/INPUT/NOTIFHEADER/MAINTPLANT } - Plant ID

Request{/BAPI_ALM_NOTIF_CREATE/INPUT/NOTIFHEADER/BREAKDOWN} - "X"

Request{/BAPI_ALM_NOTIF_CREATE/INPUT/NOTIFHEADER/SHORT_TEXT} - User Input

Request{/BAPI_ALM_NOTIF_CREATE/INPUT/NOTIFHEADER/REPORTEDBY} – Requested UserID

Request{/BAPI_ALM_NOTIF_CREATE/INPUT/NOTIFHEADER/NOTIF_DATE } – User input

Request{/BAPI_ALM_NOTIF_CREATE/INPUT/NOTIFHEADER/NOTIFTIME} – User input

Request{/BAPI_ALM_NOTIF_CREATE/INPUT/NOTIF_TYPE} – Notification Type


and rest of the process I followed is same with what you have followed. after getting the notif no in response you have to pass it to ALM NOTIF SAVE. and then you will get the final notif No.


Though I am not sure but I guess you have to pass all the parameters under NOTIFHEADER.

You can try with these parameters and I hope you will get your desired output properly. This solution is working perfectly in our scenario.

Hope it will help you.


Regards,

Suman

former_member204240
Active Participant
0 Kudos

Perhaps, you might have missed to do commit work in your JCo Action where this BAPI is called.

It wont save in DB until commit is done

Please try that.

ponilango_p
Explorer
0 Kudos

Hi Vitaliy,

Please follow the url below for evaluation12.x project at the url - 12.x Module Libraries - zip file  (Corrected the link)

You can find the PM folder containing the transaction (ALMNotifCreate) and many such useful transactions. Refer to them and create your own.

The sample follows the standard sequence of  "Create>> PutInProgress>> Save >> Commit" try to follow the same.

Other than the hard coded parameters, others can be changed to fit your needs - please check with your PM consultant.

Eg., For saving Long text you need set the object type as QMEL. But for adding Damage reason codes required PM configuration must exist.

With regards,

Ponilango

Message was edited by: Ponilango P 1. Changed the url from Samples project link to SAP Module libraries (Evaluation tool) url 2. Briefed on sequence and parameters for creating PM Notification