SAP Function Modules

CNV_MBT_READ_USERS SAP Function module - Auslesen der Daten zu Tabellen USR02 und CNVMBTUSR







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

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


Pattern for FM CNV_MBT_READ_USERS - CNV MBT READ USERS





CALL FUNCTION 'CNV_MBT_READ_USERS' "Auslesen der Daten zu Tabellen USR02 und CNVMBTUSR
  EXPORTING
    p_packid =                  " cnvmbtpack-packid
*   p_with_filter =             " cnv_mbt_flag  Flag (X = yes, initial = no)
*   p_selection_criteria =      " usr02-bname   User name in user master record
*   p_get_not_locked =          " cnv_mbt_flag  Flag (X = yes, initial = no)
*   p_not_sel_cnvmbtusr =       " cnv_mbt_flag  Flag (X = yes, initial = no)
  TABLES
    p_usr02 =                   " usr02
*   p_cnvmbtusr =               " cnvmbtusr
  EXCEPTIONS
    NO_CNVMBTUSR_ENTRY_FOUND = 1  "
    NO_USR02_ENTRY_FOUND = 2    "
    .  "  CNV_MBT_READ_USERS

ABAP code example for Function Module CNV_MBT_READ_USERS





The ABAP code below is a full code listing to execute function module CNV_MBT_READ_USERS 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_p_usr02  TYPE STANDARD TABLE OF USR02,"TABLES PARAM
wa_p_usr02  LIKE LINE OF it_p_usr02 ,
it_p_cnvmbtusr  TYPE STANDARD TABLE OF CNVMBTUSR,"TABLES PARAM
wa_p_cnvmbtusr  LIKE LINE OF it_p_cnvmbtusr .


SELECT single PACKID
FROM CNVMBTPACK
INTO @DATA(ld_p_packid).

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

SELECT single BNAME
FROM USR02
INTO @DATA(ld_p_selection_criteria).

DATA(ld_p_get_not_locked) = 'Check type of data required'.
DATA(ld_p_not_sel_cnvmbtusr) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_p_usr02 to it_p_usr02.

"populate fields of struture and append to itab
append wa_p_cnvmbtusr to it_p_cnvmbtusr. . CALL FUNCTION 'CNV_MBT_READ_USERS' EXPORTING p_packid = ld_p_packid * p_with_filter = ld_p_with_filter * p_selection_criteria = ld_p_selection_criteria * p_get_not_locked = ld_p_get_not_locked * p_not_sel_cnvmbtusr = ld_p_not_sel_cnvmbtusr TABLES p_usr02 = it_p_usr02 * p_cnvmbtusr = it_p_cnvmbtusr EXCEPTIONS NO_CNVMBTUSR_ENTRY_FOUND = 1 NO_USR02_ENTRY_FOUND = 2 . " CNV_MBT_READ_USERS
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 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_p_packid  TYPE CNVMBTPACK-PACKID ,
it_p_usr02  TYPE STANDARD TABLE OF USR02 ,
wa_p_usr02  LIKE LINE OF it_p_usr02,
ld_p_with_filter  TYPE CNV_MBT_FLAG ,
it_p_cnvmbtusr  TYPE STANDARD TABLE OF CNVMBTUSR ,
wa_p_cnvmbtusr  LIKE LINE OF it_p_cnvmbtusr,
ld_p_selection_criteria  TYPE USR02-BNAME ,
ld_p_get_not_locked  TYPE CNV_MBT_FLAG ,
ld_p_not_sel_cnvmbtusr  TYPE CNV_MBT_FLAG .


SELECT single PACKID
FROM CNVMBTPACK
INTO ld_p_packid.


"populate fields of struture and append to itab
append wa_p_usr02 to it_p_usr02.
ld_p_with_filter = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_p_cnvmbtusr to it_p_cnvmbtusr.

SELECT single BNAME
FROM USR02
INTO ld_p_selection_criteria.

ld_p_get_not_locked = 'Check type of data required'.
ld_p_not_sel_cnvmbtusr = 'Check type of data required'.

SAP Documentation for FM CNV_MBT_READ_USERS


Selects the tables usr02 and cnvmbtusr. It is also possible to set a filter for the selection of the user data from table usr02. This makes ...See here for full SAP fm documentation

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