SAP MSAM_MO_NOTIFICATION_CREATE Function Module for MSAM : Notification Create









MSAM_MO_NOTIFICATION_CREATE is a standard msam mo notification create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for MSAM : Notification Create processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for msam mo notification create FM, simply by entering the name MSAM_MO_NOTIFICATION_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: MSAM_MO_NOTIFICATION
Program Name: SAPLMSAM_MO_NOTIFICATION
Main Program: SAPLMSAM_MO_NOTIFICATION
Appliation area: I
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MSAM_MO_NOTIFICATION_CREATE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'MSAM_MO_NOTIFICATION_CREATE'"MSAM : Notification Create
EXPORTING
NOTIFICATION_HEADER = "Notification Header
* EXTERNAL_NUMBER = "Notification number
NOTIF_TYPE = "Notification type
* ORDERID = "Order number
* I_PARTNER_TPA_KEY = ' ' "

IMPORTING
NOTIFICATION_EXPORT = "BAPI Service Notification Header

TABLES
* NOTIFICATION_ITEM = "Notification item for creation
* NOTIFICATION_CAUSE = "Notification causes for creation
* NOTIFICATION_ACTIVITY = "Notification activity for creation
* NOTIFICATION_TASK = "Notification task for creation
* NOTIFICATION_PARTNER = "Partners for creation/change
* NOTIFICATION_LONGTEXT = "Notification long text
* NOTIFICATION_USERSTATUS = "User Status Definitions
* RETURN = "Return parameter

EXCEPTIONS
ERROR_IN_INPUT_DATA = 1 NOTIFICATION_ALREADY_EXISTS = 2 TASK_NOT_REL_OR_COMPL = 3 USER_STATUS_NOT_CHANGED = 4
.



IMPORTING Parameters details for MSAM_MO_NOTIFICATION_CREATE

NOTIFICATION_HEADER - Notification Header

Data type: MSAM10_NOTIF_HEADER
Optional: No
Call by Reference: No ( called with pass by value option)

EXTERNAL_NUMBER - Notification number

Data type: MSAM10_NOTIF_HEADER-NOTIF_NO
Optional: Yes
Call by Reference: No ( called with pass by value option)

NOTIF_TYPE - Notification type

Data type: MSAM10_NOTIF_HEADER-NOTIF_TYPE
Optional: No
Call by Reference: No ( called with pass by value option)

ORDERID - Order number

Data type: MSAM10_NOTIF_HEADER-ORDERID
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_PARTNER_TPA_KEY -

Data type: FLAG
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for MSAM_MO_NOTIFICATION_CREATE

NOTIFICATION_EXPORT - BAPI Service Notification Header

Data type: BAPI2080_NOTHDRE
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for MSAM_MO_NOTIFICATION_CREATE

NOTIFICATION_ITEM - Notification item for creation

Data type: MSAM10_NOTIF_ITEM
Optional: Yes
Call by Reference: Yes

NOTIFICATION_CAUSE - Notification causes for creation

Data type: MSAM10_NOTIF_CAUSE
Optional: Yes
Call by Reference: Yes

NOTIFICATION_ACTIVITY - Notification activity for creation

Data type: MSAM10_NOTIF_ACTIVITY
Optional: Yes
Call by Reference: Yes

NOTIFICATION_TASK - Notification task for creation

Data type: MSAM10_NOTIF_TASK
Optional: Yes
Call by Reference: Yes

NOTIFICATION_PARTNER - Partners for creation/change

Data type: MSAM10_NOTIF_PARTNER
Optional: Yes
Call by Reference: Yes

NOTIFICATION_LONGTEXT - Notification long text

Data type: MSAM10_LONGTEXT
Optional: Yes
Call by Reference: Yes

NOTIFICATION_USERSTATUS - User Status Definitions

Data type: MSAM10_USER_STATUS
Optional: Yes
Call by Reference: Yes

RETURN - Return parameter

Data type: BAPIRET2
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

ERROR_IN_INPUT_DATA -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NOTIFICATION_ALREADY_EXISTS -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TASK_NOT_REL_OR_COMPL -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

USER_STATUS_NOT_CHANGED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MSAM_MO_NOTIFICATION_CREATE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lt_notification_item  TYPE STANDARD TABLE OF MSAM10_NOTIF_ITEM, "   
lv_error_in_input_data  TYPE MSAM10_NOTIF_ITEM, "   
lv_notification_export  TYPE BAPI2080_NOTHDRE, "   
lv_notification_header  TYPE MSAM10_NOTIF_HEADER, "   
lv_external_number  TYPE MSAM10_NOTIF_HEADER-NOTIF_NO, "   
lt_notification_cause  TYPE STANDARD TABLE OF MSAM10_NOTIF_CAUSE, "   
lv_notification_already_exists  TYPE MSAM10_NOTIF_CAUSE, "   
lv_notif_type  TYPE MSAM10_NOTIF_HEADER-NOTIF_TYPE, "   
lt_notification_activity  TYPE STANDARD TABLE OF MSAM10_NOTIF_ACTIVITY, "   
lv_task_not_rel_or_compl  TYPE MSAM10_NOTIF_ACTIVITY, "   
lv_orderid  TYPE MSAM10_NOTIF_HEADER-ORDERID, "   
lt_notification_task  TYPE STANDARD TABLE OF MSAM10_NOTIF_TASK, "   
lv_user_status_not_changed  TYPE MSAM10_NOTIF_TASK, "   
lv_i_partner_tpa_key  TYPE FLAG, "   ' '
lt_notification_partner  TYPE STANDARD TABLE OF MSAM10_NOTIF_PARTNER, "   
lt_notification_longtext  TYPE STANDARD TABLE OF MSAM10_LONGTEXT, "   
lt_notification_userstatus  TYPE STANDARD TABLE OF MSAM10_USER_STATUS, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2. "   

  CALL FUNCTION 'MSAM_MO_NOTIFICATION_CREATE'  "MSAM : Notification Create
    EXPORTING
         NOTIFICATION_HEADER = lv_notification_header
         EXTERNAL_NUMBER = lv_external_number
         NOTIF_TYPE = lv_notif_type
         ORDERID = lv_orderid
         I_PARTNER_TPA_KEY = lv_i_partner_tpa_key
    IMPORTING
         NOTIFICATION_EXPORT = lv_notification_export
    TABLES
         NOTIFICATION_ITEM = lt_notification_item
         NOTIFICATION_CAUSE = lt_notification_cause
         NOTIFICATION_ACTIVITY = lt_notification_activity
         NOTIFICATION_TASK = lt_notification_task
         NOTIFICATION_PARTNER = lt_notification_partner
         NOTIFICATION_LONGTEXT = lt_notification_longtext
         NOTIFICATION_USERSTATUS = lt_notification_userstatus
         RETURN = lt_return
    EXCEPTIONS
        ERROR_IN_INPUT_DATA = 1
        NOTIFICATION_ALREADY_EXISTS = 2
        TASK_NOT_REL_OR_COMPL = 3
        USER_STATUS_NOT_CHANGED = 4
. " MSAM_MO_NOTIFICATION_CREATE




ABAP code using 7.40 inline data declarations to call FM MSAM_MO_NOTIFICATION_CREATE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
"SELECT single NOTIF_NO FROM MSAM10_NOTIF_HEADER INTO @DATA(ld_external_number).
 
 
 
"SELECT single NOTIF_TYPE FROM MSAM10_NOTIF_HEADER INTO @DATA(ld_notif_type).
 
 
 
"SELECT single ORDERID FROM MSAM10_NOTIF_HEADER INTO @DATA(ld_orderid).
 
 
 
DATA(ld_i_partner_tpa_key) = ' '.
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!