SAP Function Modules

CM_F_INITIALIZE_AND_LOAD SAP Function module







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

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


Pattern for FM CM_F_INITIALIZE_AND_LOAD - CM F INITIALIZE AND LOAD





CALL FUNCTION 'CM_F_INITIALIZE_AND_LOAD' "
  EXPORTING
    aplid =                     " tcmf6-aplid
    cmf_nr =                    " cmfp-nr
*   ocs_activ = SPACE           " c
  IMPORTING
    initialize_not_allowed =    "
  EXCEPTIONS
    UNKNOWN_APLID = 1           "
    UNKNOWN_OBJECT_ID = 2       "               Unknown Object
    LOG_NOT_FOUND = 3           "
    .  "  CM_F_INITIALIZE_AND_LOAD

ABAP code example for Function Module CM_F_INITIALIZE_AND_LOAD





The ABAP code below is a full code listing to execute function module CM_F_INITIALIZE_AND_LOAD 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_initialize_not_allowed  TYPE STRING .


SELECT single APLID
FROM TCMF6
INTO @DATA(ld_aplid).


SELECT single NR
FROM CMFP
INTO @DATA(ld_cmf_nr).

DATA(ld_ocs_activ) = 'Check type of data required'. . CALL FUNCTION 'CM_F_INITIALIZE_AND_LOAD' EXPORTING aplid = ld_aplid cmf_nr = ld_cmf_nr * ocs_activ = ld_ocs_activ IMPORTING initialize_not_allowed = ld_initialize_not_allowed EXCEPTIONS UNKNOWN_APLID = 1 UNKNOWN_OBJECT_ID = 2 LOG_NOT_FOUND = 3 . " CM_F_INITIALIZE_AND_LOAD
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 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_initialize_not_allowed  TYPE STRING ,
ld_aplid  TYPE TCMF6-APLID ,
ld_cmf_nr  TYPE CMFP-NR ,
ld_ocs_activ  TYPE C .


SELECT single APLID
FROM TCMF6
INTO ld_aplid.


SELECT single NR
FROM CMFP
INTO ld_cmf_nr.

ld_ocs_activ = 'Check type of data required'.

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