SAP Function Modules

CNM2_SET_MRP_RELEVANCE SAP Function module







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

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


Pattern for FM CNM2_SET_MRP_RELEVANCE - CNM2 SET MRP RELEVANCE





CALL FUNCTION 'CNM2_SET_MRP_RELEVANCE' "
* EXPORTING
*   i_coll_reqs = SPACE         " c
  TABLES
*   t_component =               " resbkey
    t_network =                 " ord_pre
*   t_activity =                " afvgkey
  EXCEPTIONS
    ERROR_BANF = 1              "
    .  "  CNM2_SET_MRP_RELEVANCE

ABAP code example for Function Module CNM2_SET_MRP_RELEVANCE





The ABAP code below is a full code listing to execute function module CNM2_SET_MRP_RELEVANCE 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:
it_t_component  TYPE STANDARD TABLE OF RESBKEY,"TABLES PARAM
wa_t_component  LIKE LINE OF it_t_component ,
it_t_network  TYPE STANDARD TABLE OF ORD_PRE,"TABLES PARAM
wa_t_network  LIKE LINE OF it_t_network ,
it_t_activity  TYPE STANDARD TABLE OF AFVGKEY,"TABLES PARAM
wa_t_activity  LIKE LINE OF it_t_activity .

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

"populate fields of struture and append to itab
append wa_t_component to it_t_component.

"populate fields of struture and append to itab
append wa_t_network to it_t_network.

"populate fields of struture and append to itab
append wa_t_activity to it_t_activity. . CALL FUNCTION 'CNM2_SET_MRP_RELEVANCE' * EXPORTING * i_coll_reqs = ld_i_coll_reqs TABLES * t_component = it_t_component t_network = it_t_network * t_activity = it_t_activity EXCEPTIONS ERROR_BANF = 1 . " CNM2_SET_MRP_RELEVANCE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_i_coll_reqs  TYPE C ,
it_t_component  TYPE STANDARD TABLE OF RESBKEY ,
wa_t_component  LIKE LINE OF it_t_component,
it_t_network  TYPE STANDARD TABLE OF ORD_PRE ,
wa_t_network  LIKE LINE OF it_t_network,
it_t_activity  TYPE STANDARD TABLE OF AFVGKEY ,
wa_t_activity  LIKE LINE OF it_t_activity.

ld_i_coll_reqs = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_component to it_t_component.

"populate fields of struture and append to itab
append wa_t_network to it_t_network.

"populate fields of struture and append to itab
append wa_t_activity to it_t_activity.

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