SAP Function Modules

ALM_ME_NOTIFICATION_CREATE SAP Function module - Create Notification







ALM_ME_NOTIFICATION_CREATE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name ALM_ME_NOTIFICATION_CREATE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: ALM_ME_NOTIFICATION
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM ALM_ME_NOTIFICATION_CREATE - ALM ME NOTIFICATION CREATE





CALL FUNCTION 'ALM_ME_NOTIFICATION_CREATE' "Create Notification
  EXPORTING
    notification_header =       " alm_me_notif_header  Notification Header
*   external_number =           " alm_me_notif_header-notif_no  Notification Number
    notif_type =                " alm_me_notif_header-notif_type  Notification type
*   sender =                    " bapi_sender   Logical system of sender
*   orderid =                   " alm_me_notif_header-orderid  Order number
*   i_partner_tpa_key = ' '     " flag
  IMPORTING
    notification_export =       " bapi2080_nothdre  BAPI Service Notification Header
* TABLES
*   notification_item =         " alm_me_notif_item  Notification Item
*   notification_cause =        " alm_me_notif_cause  Notification causes for creation
*   notification_activity =     " alm_me_notif_activity  Notification activity
*   notification_task =         " alm_me_notif_task  Notification Task
*   notification_partner =      " alm_me_partner_key_struct  Notification Partner
*   notification_longtext =     " alm_me_longtext  Notification long text
*   notification_userstatus =   " alm_me_user_status_changes  Table with Status Changes for User Status
*   return =                    " bapiret2      Return parameter
  EXCEPTIONS
    ERROR_IN_INPUT_DATA = 1     "               Error in input data
    NOTIFICATION_ALREADY_EXISTS = 2  "
    TASK_NOT_REL_OR_COMPL = 3   "
    USER_STATUS_NOT_CHANGED = 4  "
    .  "  ALM_ME_NOTIFICATION_CREATE

ABAP code example for Function Module ALM_ME_NOTIFICATION_CREATE





The ABAP code below is a full code listing to execute function module ALM_ME_NOTIFICATION_CREATE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_notification_export  TYPE BAPI2080_NOTHDRE ,
it_notification_item  TYPE STANDARD TABLE OF ALM_ME_NOTIF_ITEM,"TABLES PARAM
wa_notification_item  LIKE LINE OF it_notification_item ,
it_notification_cause  TYPE STANDARD TABLE OF ALM_ME_NOTIF_CAUSE,"TABLES PARAM
wa_notification_cause  LIKE LINE OF it_notification_cause ,
it_notification_activity  TYPE STANDARD TABLE OF ALM_ME_NOTIF_ACTIVITY,"TABLES PARAM
wa_notification_activity  LIKE LINE OF it_notification_activity ,
it_notification_task  TYPE STANDARD TABLE OF ALM_ME_NOTIF_TASK,"TABLES PARAM
wa_notification_task  LIKE LINE OF it_notification_task ,
it_notification_partner  TYPE STANDARD TABLE OF ALM_ME_PARTNER_KEY_STRUCT,"TABLES PARAM
wa_notification_partner  LIKE LINE OF it_notification_partner ,
it_notification_longtext  TYPE STANDARD TABLE OF ALM_ME_LONGTEXT,"TABLES PARAM
wa_notification_longtext  LIKE LINE OF it_notification_longtext ,
it_notification_userstatus  TYPE STANDARD TABLE OF ALM_ME_USER_STATUS_CHANGES,"TABLES PARAM
wa_notification_userstatus  LIKE LINE OF it_notification_userstatus ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return .

DATA(ld_notification_header) = 'Check type of data required'.

DATA(ld_external_number) = some text here

DATA(ld_notif_type) = some text here
DATA(ld_sender) = 'Check type of data required'.

DATA(ld_orderid) = some text here
DATA(ld_i_partner_tpa_key) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_notification_item to it_notification_item.

"populate fields of struture and append to itab
append wa_notification_cause to it_notification_cause.

"populate fields of struture and append to itab
append wa_notification_activity to it_notification_activity.

"populate fields of struture and append to itab
append wa_notification_task to it_notification_task.

"populate fields of struture and append to itab
append wa_notification_partner to it_notification_partner.

"populate fields of struture and append to itab
append wa_notification_longtext to it_notification_longtext.

"populate fields of struture and append to itab
append wa_notification_userstatus to it_notification_userstatus.

"populate fields of struture and append to itab
append wa_return to it_return. . CALL FUNCTION 'ALM_ME_NOTIFICATION_CREATE' EXPORTING notification_header = ld_notification_header * external_number = ld_external_number notif_type = ld_notif_type * sender = ld_sender * orderid = ld_orderid * i_partner_tpa_key = ld_i_partner_tpa_key IMPORTING notification_export = ld_notification_export * TABLES * notification_item = it_notification_item * notification_cause = it_notification_cause * notification_activity = it_notification_activity * notification_task = it_notification_task * notification_partner = it_notification_partner * notification_longtext = it_notification_longtext * notification_userstatus = it_notification_userstatus * return = it_return EXCEPTIONS ERROR_IN_INPUT_DATA = 1 NOTIFICATION_ALREADY_EXISTS = 2 TASK_NOT_REL_OR_COMPL = 3 USER_STATUS_NOT_CHANGED = 4 . " ALM_ME_NOTIFICATION_CREATE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_notification_export  TYPE BAPI2080_NOTHDRE ,
ld_notification_header  TYPE ALM_ME_NOTIF_HEADER ,
it_notification_item  TYPE STANDARD TABLE OF ALM_ME_NOTIF_ITEM ,
wa_notification_item  LIKE LINE OF it_notification_item,
ld_external_number  TYPE ALM_ME_NOTIF_HEADER-NOTIF_NO ,
it_notification_cause  TYPE STANDARD TABLE OF ALM_ME_NOTIF_CAUSE ,
wa_notification_cause  LIKE LINE OF it_notification_cause,
ld_notif_type  TYPE ALM_ME_NOTIF_HEADER-NOTIF_TYPE ,
it_notification_activity  TYPE STANDARD TABLE OF ALM_ME_NOTIF_ACTIVITY ,
wa_notification_activity  LIKE LINE OF it_notification_activity,
ld_sender  TYPE BAPI_SENDER ,
it_notification_task  TYPE STANDARD TABLE OF ALM_ME_NOTIF_TASK ,
wa_notification_task  LIKE LINE OF it_notification_task,
ld_orderid  TYPE ALM_ME_NOTIF_HEADER-ORDERID ,
it_notification_partner  TYPE STANDARD TABLE OF ALM_ME_PARTNER_KEY_STRUCT ,
wa_notification_partner  LIKE LINE OF it_notification_partner,
ld_i_partner_tpa_key  TYPE FLAG ,
it_notification_longtext  TYPE STANDARD TABLE OF ALM_ME_LONGTEXT ,
wa_notification_longtext  LIKE LINE OF it_notification_longtext,
it_notification_userstatus  TYPE STANDARD TABLE OF ALM_ME_USER_STATUS_CHANGES ,
wa_notification_userstatus  LIKE LINE OF it_notification_userstatus,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return.

ld_notification_header = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_notification_item to it_notification_item.

ld_external_number = some text here

"populate fields of struture and append to itab
append wa_notification_cause to it_notification_cause.

ld_notif_type = some text here

"populate fields of struture and append to itab
append wa_notification_activity to it_notification_activity.
ld_sender = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_notification_task to it_notification_task.

ld_orderid = some text here

"populate fields of struture and append to itab
append wa_notification_partner to it_notification_partner.
ld_i_partner_tpa_key = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_notification_longtext to it_notification_longtext.

"populate fields of struture and append to itab
append wa_notification_userstatus to it_notification_userstatus.

"populate fields of struture and append to itab
append wa_return to it_return.

SAP Documentation for FM ALM_ME_NOTIFICATION_CREATE

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name ALM_ME_NOTIFICATION_CREATE or its description.