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_ALM_NOTIF_CREATE

Former Member
0 Likes
6,636

Hi

I have searched a lot through sdn, but I couldn't find even one sample data which works.

I need to create a PM notification, with just an equipment.. nothing extra.

I just want some sample data to be passed to BAPI_ALM_NOTIF_CREATE FM.

I am passing the data acc to my understanding, running the BAPI_ALM_NOTIF_CREATE & BAPI_ALM_NOTIF_SAVE & BAPI_TRANSACTION_COMMIT.

The surprising this is I am getting nothing in RETURN in BAPI_ALM_NOTIF_CREATE.

Kindly help.

Regards

Ankur Malhotra

8 REPLIES 8
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
3,398

Check this similar one

link:[http://www.sap-img.com/abap/bapi-alm-notif-create-maintenance-notification.htm]

Read only

0 Likes
3,398

@Keshav: That was not helpful. I need some sample data with which this BAPI will get executed successfully.

Kindly help.

Ankur

Read only

0 Likes
3,398

Hi All,

I have created a Z FM and coded the following inside it:

+DATA: gt_return TYPE TABLE OF bapiret2 WITH HEADER LINE.

CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'

EXPORTING

notif_type = notif_type

notifheader = notifheader

  • task_determination = 'X'

IMPORTING

notifheader_export = notifheader_export

TABLES

notitem = notifitem

notiftask = notiftask

return = gt_return.

APPEND gt_return TO return.

CLEAR: gt_return. REFRESH: gt_return.

CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'

EXPORTING

number = notifheader_export-notif_no

IMPORTING

notifheader = notifheader_export

TABLES

return = gt_return.

APPEND gt_return TO return.

CLEAR: gt_return. REFRESH: gt_return.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

IMPORTING

return = gt_return.

APPEND gt_return TO return.

CLEAR: gt_return. REFRESH: gt_return.+

It is working now

Regards,

Ankur

Read only

0 Likes
3,398

Thanks Ankur, I just solved my problem using this code.

Regards from Bogotá - Colombia

Felipe Uribe

Read only

vijy_mukunthan
Active Contributor
0 Likes
3,398

Hi Ankur

WA_NOTIF-NOTIF_TYPE = '05'.
  WA_NOTIF-REFOBJECTTYPE = 'IF1001006'.
 APPEND WA_NOTIF TO IT_NOTIF.

  CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'
  EXPORTING
*   EXTERNAL_NUMBER          = 
    notif_type               =  WA_NOTIF-NOTIF
    notifheader              = WA_NOTIF-REFOBJECTTYPE 
*   TASK_DETERMINATION       = ' '
*   SENDER                   =
*   ORDERID                  =
* IMPORTING
*   NOTIFHEADER_EXPORT       =
* TABLES
*   NOTITEM                  =
*   NOTIFCAUS                =
*   NOTIFACTV                =
*   NOTIFTASK                =
*   NOTIFPARTNR              =
*   LONGTEXTS                =
*   KEY_RELATIONSHIPS        =
*  RETURN                   =
          .


 iF RETURN IS NOT INITIAL.

 WRITE : 'SUCCESS'.

ENDIF.

Use the sample code.

Regards

vijay

Read only

0 Likes
3,398

Just a quick question: What is WA_NOTIF's type?

And also what is to be passed in REFOBJECTTYPE?

Also in the below code, we are passing WA_NOTIF-REFOBJECTTYPE to notifheader, Is this right?

Ankur

Read only

0 Likes
3,398

BAPI return has error with this: "Notification type 05 not defined"

Read only

david_burg
Participant
0 Likes
3,398

There is a useful community wiki here.

If you go to T-Code IW51 for SN Creation you can see the list of notification types defined in the system. The defaults appear to be:

S1 Problem Notification

S2 Activity Report

S3 Service Request