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

Create Notification in PM module

Former Member
0 Likes
1,092

Hi All,

I am trying to create a Notification in PM module.

I am using FM 'ALM_PM_MAINTNOT_CREATE' . I am bit confuse to provide REFOBJECTTYPE

and REFOBJECTKEY field values in NOTIFHEADER and in rest of the input table fields.

what should be the correct values for these fields?

Please share your program code if someone already used this FM in any program.

Regards,

Amit

Edited by: Amit Singh on Sep 21, 2010 1:06 PM

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
929

Use BAPI_ALM_NOTIF_CREATE , it well documented.

5 REPLIES 5
Read only

Former Member
0 Likes
929

Hi!

REFOBJECTTYPEs can be found in the table, TOJTB.

The service notification's type will be BUS2080, or BUS2080A.

The maintenance notification's type will be BUS2038, or BUS2038A.

The object key, will be the document number. If you are using internal numbering, then SAP will give this number. At external numbering, you have to give a number, which can be accepted for the give notification type.

Regards

Tamá

Read only

Former Member
0 Likes
929

customize it as u need. Here it is:

data: notifheader like bapi2080_nothdri,

notifheader_export like bapi2080_nothdre,

LONGTEXTS like BAPI2080_NOTFULLTXTI occurs 0 with header line,

RETURN like BAPIRET2 occurs 0 with header line.

clear notifheader.

notifheader-EQUIPMENT = u2018Testu2032.

notifheader-SHORT_TEXT = u2018Test it first'.

notifheader-PRIORITY = u20181u2032.

notifheader-PLANPLANT = u20181000u2032.

notifheader-PLANGROUP = u2018100u2032.

notifheader-REPORTEDBY = u2018USERu2019.

notifheader-NOTIF_DATE = sy-datum.

notifheader-NOTIFTIME = sy-uzeit.

refresh longtexts.

longtexts-OBJTYPE = u2018QMELu2019.

*OBJKEY

longtexts-FORMAT_COL = u2018U1u2032.

longtexts-TEXT_LINE = u2018line 1u2032.

append longtexts.

longtexts-TEXT_LINE = u2018line 2u2032.

append longtexts.

longtexts-TEXT_LINE = u2018line 3u2032.

append longtexts.

CALL FUNCTION u2018ALM_PM_MAINTNOT_CREATEu2019

EXPORTING

EXTERNAL_NUMBER = external_number

notif_type = u2018M1u2032

notifheader = notifheader

IMPORTING

NOTIFHEADER_EXPORT = notifheader_export

TABLES

LONGTEXTS = longtexts

RETURN = return.

if sy-subrc eq 0.

refresh return.

CALL FUNCTION u2018ALM_PM_MAINTNOT_SAVEu2019

EXPORTING

number = notifheader_export-NOTIF_NO

IMPORTING

NOTIFHEADER = notifheader_export

TABLES

RETURN = return.

Read only

0 Likes
929

Thanks a lot for your quick response.

But in my requirement I have to pass entries in Item table ,Cause table and Activity tables.

Please suggest.

Regards,

Amit

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
930

Use BAPI_ALM_NOTIF_CREATE , it well documented.

Read only

Former Member
0 Likes
929

Used BAPI 'BAPI_ALM_NOTIF_CREATE' with some field modification and worked fine.