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

BAPI_SERVNOT_CREATE example

Former Member
0 Likes
2,497

Hello everyone,

I'm facing a problem in creating service notification using BAPI_SERVNOT_CREATE. It's always saying the same error message, 'Notification type M1 is not defined'. I've been looking for the example code in Google but never got any luck. Does anyone have any example for implementing this function module? Your help will be very much appreciated. Thanks a lot.

-Vera-

9 REPLIES 9
Read only

Former Member
0 Likes
1,535

Hi,

Please go through the following link

Regards

Akshay

Read only

0 Likes
1,535

I have read the link you gave me but unfrotunately we don't have BAPI_ALM_NOTIF_CREATE function module. FYI we are using SAP/R3 4.6D Thanks

Read only

Former Member
0 Likes
1,535

Hi,

U can do recording and create an FM and use it.

Let me know further.

Cheers,

Parth Parikh

Read only

0 Likes
1,535

I have tried to use recording but some fields are missing..

Read only

Former Member
0 Likes
1,535

Check below link

Hope this helps..

Read only

0 Likes
1,535

Hi Karan,

I have read the thread but still haven't got the answer since it's not displaying example code like this link does: I try to fill the same values to BAPI_SERVNOT_CREATE with the values I found on that link but it still gave me the same error message.

Thanks

Read only

Former Member
0 Likes
1,535

Hi,

After the call to function 'BAPI_SERVNOT_CREATE' read the contents of the table RETURN. If it does not have a entry with key = E then call the subsequent BAPI's.

Use the code below after the call to function 'BAPI_SERVNOT_CREATE'.

READ TABLE return WITH KEY type = 'E'.

IF sy-subrc EQ 0.

*Write the error

ELSE.

CALL FUNCTION 'BAPI_SERVNOT_SAVE'

READ TABLE return WITH KEY type = 'E'.

IF sy-subrc EQ 0.

*Write the error

ELSE.

CALL 'BAPI_TRANSACTION_COMMIT'

ENDIF.

ENDIF.

Also check the below Thread

Hope it helps.

Regards,

Anki Reddy

Read only

0 Likes
1,535

Hi Anki,

I have never even succeeded creating the notification using BAPI_SERVNOT_CREATE. It always gives error in the RETURN table saying 'the notification type XXX is not defined'.

Thanks.

-Vera-

Read only

0 Likes
1,535

Helo everyone,

I think I found the function module I've been looking for. It's ALM_PM_MAINTNOT_CREATE. It's not BAPI but it works fine on my system. Thanks for all your responds..

-Vera-