SAP Function Modules

ALM_MEREP_001_CREATE SAP Function module







ALM_MEREP_001_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_MEREP_001_CREATE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: ALM_MEREP_001
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM ALM_MEREP_001_CREATE - ALM MEREP 001 CREATE





CALL FUNCTION 'ALM_MEREP_001_CREATE' "
  EXPORTING
    user =                      " alm_me_user_data-userid  User name
    order_header =              " mam_20_order_header
  IMPORTING
    orderid =                   " mam_20_order_header-orderid
* TABLES
*   order_operation =           " mam20_order_operation
*   order_operation_split =     " mam_20_operation_split
*   order_component =           " alm_me_pm_component
*   order_objectlist =          " alm_me_pm_objectlist
*   order_partner =             " alm_me_partner_key_struct
*   order_longtext =            " alm_me_longtext  Notification long text
*   order_user_status =         " alm_me_user_status_changes
*   ce_order_header =           " alm_me_customer_enhancement
*   ce_order_operation =        " alm_me_customer_enhancement
*   ce_order_component =        " alm_me_customer_enhancement
*   ce_order_objectlist =       " alm_me_customer_enhancement
*   return =                    " bapiret2      Return parameter
*   wsap_extension =            " alm_me_sap_extension
    .  "  ALM_MEREP_001_CREATE

ABAP code example for Function Module ALM_MEREP_001_CREATE





The ABAP code below is a full code listing to execute function module ALM_MEREP_001_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_orderid  TYPE MAM_20_ORDER_HEADER-ORDERID ,
it_order_operation  TYPE STANDARD TABLE OF MAM20_ORDER_OPERATION,"TABLES PARAM
wa_order_operation  LIKE LINE OF it_order_operation ,
it_order_operation_split  TYPE STANDARD TABLE OF MAM_20_OPERATION_SPLIT,"TABLES PARAM
wa_order_operation_split  LIKE LINE OF it_order_operation_split ,
it_order_component  TYPE STANDARD TABLE OF ALM_ME_PM_COMPONENT,"TABLES PARAM
wa_order_component  LIKE LINE OF it_order_component ,
it_order_objectlist  TYPE STANDARD TABLE OF ALM_ME_PM_OBJECTLIST,"TABLES PARAM
wa_order_objectlist  LIKE LINE OF it_order_objectlist ,
it_order_partner  TYPE STANDARD TABLE OF ALM_ME_PARTNER_KEY_STRUCT,"TABLES PARAM
wa_order_partner  LIKE LINE OF it_order_partner ,
it_order_longtext  TYPE STANDARD TABLE OF ALM_ME_LONGTEXT,"TABLES PARAM
wa_order_longtext  LIKE LINE OF it_order_longtext ,
it_order_user_status  TYPE STANDARD TABLE OF ALM_ME_USER_STATUS_CHANGES,"TABLES PARAM
wa_order_user_status  LIKE LINE OF it_order_user_status ,
it_ce_order_header  TYPE STANDARD TABLE OF ALM_ME_CUSTOMER_ENHANCEMENT,"TABLES PARAM
wa_ce_order_header  LIKE LINE OF it_ce_order_header ,
it_ce_order_operation  TYPE STANDARD TABLE OF ALM_ME_CUSTOMER_ENHANCEMENT,"TABLES PARAM
wa_ce_order_operation  LIKE LINE OF it_ce_order_operation ,
it_ce_order_component  TYPE STANDARD TABLE OF ALM_ME_CUSTOMER_ENHANCEMENT,"TABLES PARAM
wa_ce_order_component  LIKE LINE OF it_ce_order_component ,
it_ce_order_objectlist  TYPE STANDARD TABLE OF ALM_ME_CUSTOMER_ENHANCEMENT,"TABLES PARAM
wa_ce_order_objectlist  LIKE LINE OF it_ce_order_objectlist ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return ,
it_wsap_extension  TYPE STANDARD TABLE OF ALM_ME_SAP_EXTENSION,"TABLES PARAM
wa_wsap_extension  LIKE LINE OF it_wsap_extension .


DATA(ld_user) = some text here
DATA(ld_order_header) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_order_operation to it_order_operation.

"populate fields of struture and append to itab
append wa_order_operation_split to it_order_operation_split.

"populate fields of struture and append to itab
append wa_order_component to it_order_component.

"populate fields of struture and append to itab
append wa_order_objectlist to it_order_objectlist.

"populate fields of struture and append to itab
append wa_order_partner to it_order_partner.

"populate fields of struture and append to itab
append wa_order_longtext to it_order_longtext.

"populate fields of struture and append to itab
append wa_order_user_status to it_order_user_status.

"populate fields of struture and append to itab
append wa_ce_order_header to it_ce_order_header.

"populate fields of struture and append to itab
append wa_ce_order_operation to it_ce_order_operation.

"populate fields of struture and append to itab
append wa_ce_order_component to it_ce_order_component.

"populate fields of struture and append to itab
append wa_ce_order_objectlist to it_ce_order_objectlist.

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

"populate fields of struture and append to itab
append wa_wsap_extension to it_wsap_extension. . CALL FUNCTION 'ALM_MEREP_001_CREATE' EXPORTING user = ld_user order_header = ld_order_header IMPORTING orderid = ld_orderid * TABLES * order_operation = it_order_operation * order_operation_split = it_order_operation_split * order_component = it_order_component * order_objectlist = it_order_objectlist * order_partner = it_order_partner * order_longtext = it_order_longtext * order_user_status = it_order_user_status * ce_order_header = it_ce_order_header * ce_order_operation = it_ce_order_operation * ce_order_component = it_ce_order_component * ce_order_objectlist = it_ce_order_objectlist * return = it_return * wsap_extension = it_wsap_extension . " ALM_MEREP_001_CREATE
IF SY-SUBRC EQ 0. "All OK 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_orderid  TYPE MAM_20_ORDER_HEADER-ORDERID ,
ld_user  TYPE ALM_ME_USER_DATA-USERID ,
it_order_operation  TYPE STANDARD TABLE OF MAM20_ORDER_OPERATION ,
wa_order_operation  LIKE LINE OF it_order_operation,
ld_order_header  TYPE MAM_20_ORDER_HEADER ,
it_order_operation_split  TYPE STANDARD TABLE OF MAM_20_OPERATION_SPLIT ,
wa_order_operation_split  LIKE LINE OF it_order_operation_split,
it_order_component  TYPE STANDARD TABLE OF ALM_ME_PM_COMPONENT ,
wa_order_component  LIKE LINE OF it_order_component,
it_order_objectlist  TYPE STANDARD TABLE OF ALM_ME_PM_OBJECTLIST ,
wa_order_objectlist  LIKE LINE OF it_order_objectlist,
it_order_partner  TYPE STANDARD TABLE OF ALM_ME_PARTNER_KEY_STRUCT ,
wa_order_partner  LIKE LINE OF it_order_partner,
it_order_longtext  TYPE STANDARD TABLE OF ALM_ME_LONGTEXT ,
wa_order_longtext  LIKE LINE OF it_order_longtext,
it_order_user_status  TYPE STANDARD TABLE OF ALM_ME_USER_STATUS_CHANGES ,
wa_order_user_status  LIKE LINE OF it_order_user_status,
it_ce_order_header  TYPE STANDARD TABLE OF ALM_ME_CUSTOMER_ENHANCEMENT ,
wa_ce_order_header  LIKE LINE OF it_ce_order_header,
it_ce_order_operation  TYPE STANDARD TABLE OF ALM_ME_CUSTOMER_ENHANCEMENT ,
wa_ce_order_operation  LIKE LINE OF it_ce_order_operation,
it_ce_order_component  TYPE STANDARD TABLE OF ALM_ME_CUSTOMER_ENHANCEMENT ,
wa_ce_order_component  LIKE LINE OF it_ce_order_component,
it_ce_order_objectlist  TYPE STANDARD TABLE OF ALM_ME_CUSTOMER_ENHANCEMENT ,
wa_ce_order_objectlist  LIKE LINE OF it_ce_order_objectlist,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return,
it_wsap_extension  TYPE STANDARD TABLE OF ALM_ME_SAP_EXTENSION ,
wa_wsap_extension  LIKE LINE OF it_wsap_extension.


ld_user = some text here

"populate fields of struture and append to itab
append wa_order_operation to it_order_operation.
ld_order_header = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_order_operation_split to it_order_operation_split.

"populate fields of struture and append to itab
append wa_order_component to it_order_component.

"populate fields of struture and append to itab
append wa_order_objectlist to it_order_objectlist.

"populate fields of struture and append to itab
append wa_order_partner to it_order_partner.

"populate fields of struture and append to itab
append wa_order_longtext to it_order_longtext.

"populate fields of struture and append to itab
append wa_order_user_status to it_order_user_status.

"populate fields of struture and append to itab
append wa_ce_order_header to it_ce_order_header.

"populate fields of struture and append to itab
append wa_ce_order_operation to it_ce_order_operation.

"populate fields of struture and append to itab
append wa_ce_order_component to it_ce_order_component.

"populate fields of struture and append to itab
append wa_ce_order_objectlist to it_ce_order_objectlist.

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

"populate fields of struture and append to itab
append wa_wsap_extension to it_wsap_extension.

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_MEREP_001_CREATE or its description.