SAP Function Modules

CNV_TDMS_02_EXIST_TABLE SAP Function module - Function module to ascertain the existance of table on DB







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

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


Pattern for FM CNV_TDMS_02_EXIST_TABLE - CNV TDMS 02 EXIST TABLE





CALL FUNCTION 'CNV_TDMS_02_EXIST_TABLE' "Function module to ascertain the existance of table on DB
  EXPORTING
    tabname =                   " cnvmbttables-tabname  Table Name
    status =                    " dd02l-as4local  Activation status of a Repository object
  IMPORTING
    ex_subrc =                  " sy-subrc      0: exists, 4: does not exist
    ex_clidep =                 " dd02l-clidep  Client dependent
    ex_tabclass =               " dd02l-tabclass  Tabclass
    ex_sqltab =                 " dd02l-sqltab  Pool/Cluster
  EXCEPTIONS
    WRONG_STATUS = 1            "
    OTHER_ERROR = 2             "
    .  "  CNV_TDMS_02_EXIST_TABLE

ABAP code example for Function Module CNV_TDMS_02_EXIST_TABLE





The ABAP code below is a full code listing to execute function module CNV_TDMS_02_EXIST_TABLE 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_ex_subrc  TYPE SY-SUBRC ,
ld_ex_clidep  TYPE DD02L-CLIDEP ,
ld_ex_tabclass  TYPE DD02L-TABCLASS ,
ld_ex_sqltab  TYPE DD02L-SQLTAB .


SELECT single TABNAME
FROM CNVMBTTABLES
INTO @DATA(ld_tabname).


SELECT single AS4LOCAL
FROM DD02L
INTO @DATA(ld_status).
. CALL FUNCTION 'CNV_TDMS_02_EXIST_TABLE' EXPORTING tabname = ld_tabname status = ld_status IMPORTING ex_subrc = ld_ex_subrc ex_clidep = ld_ex_clidep ex_tabclass = ld_ex_tabclass ex_sqltab = ld_ex_sqltab EXCEPTIONS WRONG_STATUS = 1 OTHER_ERROR = 2 . " CNV_TDMS_02_EXIST_TABLE
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_ex_subrc  TYPE SY-SUBRC ,
ld_tabname  TYPE CNVMBTTABLES-TABNAME ,
ld_ex_clidep  TYPE DD02L-CLIDEP ,
ld_status  TYPE DD02L-AS4LOCAL ,
ld_ex_tabclass  TYPE DD02L-TABCLASS ,
ld_ex_sqltab  TYPE DD02L-SQLTAB .


SELECT single TABNAME
FROM CNVMBTTABLES
INTO ld_tabname.


SELECT single AS4LOCAL
FROM DD02L
INTO ld_status.

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