SAP CNV_MBT_RFC_GET Function Module for determine any destination for a given package depending on EXEC_TARGET
CNV_MBT_RFC_GET is a standard cnv mbt rfc get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for determine any destination for a given package depending on EXEC_TARGET 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 rfc get FM, simply by entering the name CNV_MBT_RFC_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: CNV_MBT_RFC
Program Name: SAPLCNV_MBT_RFC
Main Program: SAPLCNV_MBT_RFC
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function CNV_MBT_RFC_GET 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_RFC_GET'"determine any destination for a given package depending on EXEC_TARGET.
EXPORTING
PACKID = "Packid
* EXEC_TARGET = "Target system
* ALL_AS_TABLE = 'X' "Return in the form of table
* NONE_AT_LOCAL_DEST = 'X' "Not at local destination
* NO_RFC_MNGMNT_CALL = 'X' "Don´t call RFC management for check
* CHECK_LOCK = "Check for incorrect logins
* CALL_LOCAL = ' ' "Return local Dest empty to call Dest
IMPORTING
DESTINATION_ID = "Destination ID
UNICODE_ERROR = "Destination with wrong unicode setting
TABLES
* DESTTAB = "Internal table of Destination ID
EXCEPTIONS
NO_DESTINATIONS_FOR_PACKID = 1 NO_SPECIFIC_DESTINATION_TYPE = 2 GET_SYSTEM_INFO_FAILURE = 3 RFC_FAILURE = 4 SYSTEM_INFO_HAS_CHANGED = 5 LOGIN_NOT_POSSIBLE = 6 WRONG_UNICODE_SETTINGS = 7
IMPORTING Parameters details for CNV_MBT_RFC_GET
PACKID - Packid
Data type: CNVMBTACTIVE-PACKIDOptional: No
Call by Reference: No ( called with pass by value option)
EXEC_TARGET - Target system
Data type: CNVMBTACTIVITY-EXEC_TARGETOptional: Yes
Call by Reference: No ( called with pass by value option)
ALL_AS_TABLE - Return in the form of table
Data type: CNVMBTRETSTR-AND_RETURNDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
NONE_AT_LOCAL_DEST - Not at local destination
Data type: CNVMBTRETSTR-AND_RETURNDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_RFC_MNGMNT_CALL - Don´t call RFC management for check
Data type: CNV_MBT_FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHECK_LOCK - Check for incorrect logins
Data type: CNV_MBT_FLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
CALL_LOCAL - Return local Dest empty to call Dest
Data type: CNV_MBT_FLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CNV_MBT_RFC_GET
DESTINATION_ID - Destination ID
Data type: CNVMBTDEST-DESTINATION_IDOptional: No
Call by Reference: No ( called with pass by value option)
UNICODE_ERROR - Destination with wrong unicode setting
Data type: CNV_MBT_FLAGOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CNV_MBT_RFC_GET
DESTTAB - Internal table of Destination ID
Data type: CNVMBTDESTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_DESTINATIONS_FOR_PACKID - Problem : If no destinations are found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_SPECIFIC_DESTINATION_TYPE - Problem : If destinations of the type not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
GET_SYSTEM_INFO_FAILURE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RFC_FAILURE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SYSTEM_INFO_HAS_CHANGED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LOGIN_NOT_POSSIBLE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_UNICODE_SETTINGS -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CNV_MBT_RFC_GET 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, " | |||
| lt_desttab | TYPE STANDARD TABLE OF CNVMBTDEST, " | |||
| lv_destination_id | TYPE CNVMBTDEST-DESTINATION_ID, " | |||
| lv_no_destinations_for_packid | TYPE CNVMBTDEST, " | |||
| lv_exec_target | TYPE CNVMBTACTIVITY-EXEC_TARGET, " | |||
| lv_unicode_error | TYPE CNV_MBT_FLAG, " | |||
| lv_no_specific_destination_type | TYPE CNV_MBT_FLAG, " | |||
| lv_all_as_table | TYPE CNVMBTRETSTR-AND_RETURN, " 'X' | |||
| lv_get_system_info_failure | TYPE CNVMBTRETSTR, " | |||
| lv_rfc_failure | TYPE CNVMBTRETSTR, " | |||
| lv_none_at_local_dest | TYPE CNVMBTRETSTR-AND_RETURN, " 'X' | |||
| lv_no_rfc_mngmnt_call | TYPE CNV_MBT_FLAG, " 'X' | |||
| lv_system_info_has_changed | TYPE CNV_MBT_FLAG, " | |||
| lv_check_lock | TYPE CNV_MBT_FLAG, " | |||
| lv_login_not_possible | TYPE CNV_MBT_FLAG, " | |||
| lv_call_local | TYPE CNV_MBT_FLAG, " ' ' | |||
| lv_wrong_unicode_settings | TYPE CNV_MBT_FLAG. " |
|   CALL FUNCTION 'CNV_MBT_RFC_GET' "determine any destination for a given package depending on EXEC_TARGET |
| EXPORTING | ||
| PACKID | = lv_packid | |
| EXEC_TARGET | = lv_exec_target | |
| ALL_AS_TABLE | = lv_all_as_table | |
| NONE_AT_LOCAL_DEST | = lv_none_at_local_dest | |
| NO_RFC_MNGMNT_CALL | = lv_no_rfc_mngmnt_call | |
| CHECK_LOCK | = lv_check_lock | |
| CALL_LOCAL | = lv_call_local | |
| IMPORTING | ||
| DESTINATION_ID | = lv_destination_id | |
| UNICODE_ERROR | = lv_unicode_error | |
| TABLES | ||
| DESTTAB | = lt_desttab | |
| EXCEPTIONS | ||
| NO_DESTINATIONS_FOR_PACKID = 1 | ||
| NO_SPECIFIC_DESTINATION_TYPE = 2 | ||
| GET_SYSTEM_INFO_FAILURE = 3 | ||
| RFC_FAILURE = 4 | ||
| SYSTEM_INFO_HAS_CHANGED = 5 | ||
| LOGIN_NOT_POSSIBLE = 6 | ||
| WRONG_UNICODE_SETTINGS = 7 | ||
| . " CNV_MBT_RFC_GET | ||
ABAP code using 7.40 inline data declarations to call FM CNV_MBT_RFC_GET
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 DESTINATION_ID FROM CNVMBTDEST INTO @DATA(ld_destination_id). | ||||
| "SELECT single EXEC_TARGET FROM CNVMBTACTIVITY INTO @DATA(ld_exec_target). | ||||
| "SELECT single AND_RETURN FROM CNVMBTRETSTR INTO @DATA(ld_all_as_table). | ||||
| DATA(ld_all_as_table) | = 'X'. | |||
| "SELECT single AND_RETURN FROM CNVMBTRETSTR INTO @DATA(ld_none_at_local_dest). | ||||
| DATA(ld_none_at_local_dest) | = 'X'. | |||
| DATA(ld_no_rfc_mngmnt_call) | = 'X'. | |||
| DATA(ld_call_local) | = ' '. | |||
Search for further information about these or an SAP related objects