SAP CNV_MBT_STATE_INIT Function Module for Connect to central PCL state management and check start capability









CNV_MBT_STATE_INIT is a standard cnv mbt state init SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Connect to central PCL state management and check start capability 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 cnv mbt state init FM, simply by entering the name CNV_MBT_STATE_INIT into the relevant SAP transaction such as SE37 or SE38.

Function Group: CNV_MBT_STATE
Program Name: SAPLCNV_MBT_STATE
Main Program: SAPLCNV_MBT_STATE
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function CNV_MBT_STATE_INIT 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 'CNV_MBT_STATE_INIT'"Connect to central PCL state management and check start capability
EXPORTING
PACKID = "
PHASE = "
ACTIVITY_ID = "
* RESTART = ' ' "flag
* ONLY_CHECK = ' ' "flag
* NO_DIALOG = '' "flag
* IV_JOBNAME = "Background job name
* IV_JOBCOUNT = "Job ID

IMPORTING
SESSION_ID = "
EX_CNVMBTSTATE = "
RESTART_MODE = "flag

EXCEPTIONS
INVALID_STATE_REQUEST = 1 START_NOT_POSSIBLE = 2 INTERNAL_SM_DB_ERROR = 3 EXECUTION_CANCELLED_BY_USER = 4
.



IMPORTING Parameters details for CNV_MBT_STATE_INIT

PACKID -

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

PHASE -

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

ACTIVITY_ID -

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

RESTART - flag

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

ONLY_CHECK - flag

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

NO_DIALOG - flag

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

IV_JOBNAME - Background job name

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

IV_JOBCOUNT - Job ID

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

EXPORTING Parameters details for CNV_MBT_STATE_INIT

SESSION_ID -

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

EX_CNVMBTSTATE -

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

RESTART_MODE - flag

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

EXCEPTIONS details

INVALID_STATE_REQUEST -

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

START_NOT_POSSIBLE -

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

INTERNAL_SM_DB_ERROR -

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

EXECUTION_CANCELLED_BY_USER -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CNV_MBT_STATE_INIT 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:
lv_packid  TYPE CNVMBTACTIVE-PACKID, "   
lv_session_id  TYPE CNVMBTSESSIONID-SESSION_ID, "   
lv_invalid_state_request  TYPE CNVMBTSESSIONID, "   
lv_phase  TYPE CNVMBTACTIVE-PHASE, "   
lv_ex_cnvmbtstate  TYPE CNVMBTSTATE, "   
lv_start_not_possible  TYPE CNVMBTSTATE, "   
lv_activity_id  TYPE CNVMBTACTIVITY-ACTIVITY_ID, "   
lv_restart_mode  TYPE CNVMBTRETSTR-AND_RETURN, "   
lv_internal_sm_db_error  TYPE CNVMBTRETSTR, "   
lv_restart  TYPE CNVMBTRETSTR-AND_RETURN, "   ' '
lv_execution_cancelled_by_user  TYPE CNVMBTRETSTR, "   
lv_only_check  TYPE CNVMBTRETSTR-AND_RETURN, "   ' '
lv_no_dialog  TYPE CNVMBTRETSTR-AND_RETURN, "   ''
lv_iv_jobname  TYPE BTCJOB, "   
lv_iv_jobcount  TYPE BTCJOBCNT. "   

  CALL FUNCTION 'CNV_MBT_STATE_INIT'  "Connect to central PCL state management and check start capability
    EXPORTING
         PACKID = lv_packid
         PHASE = lv_phase
         ACTIVITY_ID = lv_activity_id
         RESTART = lv_restart
         ONLY_CHECK = lv_only_check
         NO_DIALOG = lv_no_dialog
         IV_JOBNAME = lv_iv_jobname
         IV_JOBCOUNT = lv_iv_jobcount
    IMPORTING
         SESSION_ID = lv_session_id
         EX_CNVMBTSTATE = lv_ex_cnvmbtstate
         RESTART_MODE = lv_restart_mode
    EXCEPTIONS
        INVALID_STATE_REQUEST = 1
        START_NOT_POSSIBLE = 2
        INTERNAL_SM_DB_ERROR = 3
        EXECUTION_CANCELLED_BY_USER = 4
. " CNV_MBT_STATE_INIT




ABAP code using 7.40 inline data declarations to call FM CNV_MBT_STATE_INIT

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 PACKID FROM CNVMBTACTIVE INTO @DATA(ld_packid).
 
"SELECT single SESSION_ID FROM CNVMBTSESSIONID INTO @DATA(ld_session_id).
 
 
"SELECT single PHASE FROM CNVMBTACTIVE INTO @DATA(ld_phase).
 
 
 
"SELECT single ACTIVITY_ID FROM CNVMBTACTIVITY INTO @DATA(ld_activity_id).
 
"SELECT single AND_RETURN FROM CNVMBTRETSTR INTO @DATA(ld_restart_mode).
 
 
"SELECT single AND_RETURN FROM CNVMBTRETSTR INTO @DATA(ld_restart).
DATA(ld_restart) = ' '.
 
 
"SELECT single AND_RETURN FROM CNVMBTRETSTR INTO @DATA(ld_only_check).
DATA(ld_only_check) = ' '.
 
"SELECT single AND_RETURN FROM CNVMBTRETSTR INTO @DATA(ld_no_dialog).
DATA(ld_no_dialog) = ''.
 
 
 


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!