‎2010 Sep 21 12:05 PM
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
‎2010 Sep 21 1:29 PM
‎2010 Sep 21 12:15 PM
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á
‎2010 Sep 21 12:22 PM
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.
‎2010 Sep 21 1:11 PM
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
‎2010 Sep 21 1:29 PM
‎2011 Dec 20 6:29 PM
Used BAPI 'BAPI_ALM_NOTIF_CREATE' with some field modification and worked fine.