SAP Function Modules

DB6_GET_CATALOG_INFO SAP Function module - DB6: Fill Systables,syscolumns,sysindexes for a Given Object (Table/Inde







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

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


Pattern for FM DB6_GET_CATALOG_INFO - DB6 GET CATALOG INFO





CALL FUNCTION 'DB6_GET_CATALOG_INFO' "DB6: Fill Systables,syscolumns,sysindexes for a Given Object (Table/Index)
  EXPORTING
*   object_type = 'TA'          " db6xplobj-obj_type
    object_schema =             " db6xplobj-obj_schema
    object_name =               " db6xplobj-obj_name
    eee_flag =                  " db6xplstmt-deletable
*   connection =                " dbcon-con_name  Logical name for a database connection
*   advise_mode = ABAP_FALSE    " boolean       get index data from ADVISE_INDEX yes or no
*   explain_schema =            " db6schema     DB6: Schema Name
  TABLES
    systables =                 " db6xpltabl    DB6: struktur von SYSCAT.TABLES + syscat.tablespaces-ngname
    sysindexes =                " db6xplindx    DB6: struktur von SYSCAT.INDEXES
    syscolumns =                " db6xplcols    DB6: struktur von SYSCAT.COLUMNS
    sysnodes =                  " db6xplnode    DB6: EXPLAIN: syscat.nodegroups+syscat.nodegroupdef
  EXCEPTIONS
    ADBC_ERROR = 1              "
    .  "  DB6_GET_CATALOG_INFO

ABAP code example for Function Module DB6_GET_CATALOG_INFO





The ABAP code below is a full code listing to execute function module DB6_GET_CATALOG_INFO 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_systables  TYPE STANDARD TABLE OF DB6XPLTABL,"TABLES PARAM
wa_systables  LIKE LINE OF it_systables ,
it_sysindexes  TYPE STANDARD TABLE OF DB6XPLINDX,"TABLES PARAM
wa_sysindexes  LIKE LINE OF it_sysindexes ,
it_syscolumns  TYPE STANDARD TABLE OF DB6XPLCOLS,"TABLES PARAM
wa_syscolumns  LIKE LINE OF it_syscolumns ,
it_sysnodes  TYPE STANDARD TABLE OF DB6XPLNODE,"TABLES PARAM
wa_sysnodes  LIKE LINE OF it_sysnodes .


DATA(ld_object_type) = some text here

DATA(ld_object_schema) = some text here

DATA(ld_object_name) = some text here

DATA(ld_eee_flag) = some text here

SELECT single CON_NAME
FROM DBCON
INTO @DATA(ld_connection).

DATA(ld_advise_mode) = 'Check type of data required'.
DATA(ld_explain_schema) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_systables to it_systables.

"populate fields of struture and append to itab
append wa_sysindexes to it_sysindexes.

"populate fields of struture and append to itab
append wa_syscolumns to it_syscolumns.

"populate fields of struture and append to itab
append wa_sysnodes to it_sysnodes. . CALL FUNCTION 'DB6_GET_CATALOG_INFO' EXPORTING * object_type = ld_object_type object_schema = ld_object_schema object_name = ld_object_name eee_flag = ld_eee_flag * connection = ld_connection * advise_mode = ld_advise_mode * explain_schema = ld_explain_schema TABLES systables = it_systables sysindexes = it_sysindexes syscolumns = it_syscolumns sysnodes = it_sysnodes EXCEPTIONS ADBC_ERROR = 1 . " DB6_GET_CATALOG_INFO
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_object_type  TYPE DB6XPLOBJ-OBJ_TYPE ,
it_systables  TYPE STANDARD TABLE OF DB6XPLTABL ,
wa_systables  LIKE LINE OF it_systables,
ld_object_schema  TYPE DB6XPLOBJ-OBJ_SCHEMA ,
it_sysindexes  TYPE STANDARD TABLE OF DB6XPLINDX ,
wa_sysindexes  LIKE LINE OF it_sysindexes,
ld_object_name  TYPE DB6XPLOBJ-OBJ_NAME ,
it_syscolumns  TYPE STANDARD TABLE OF DB6XPLCOLS ,
wa_syscolumns  LIKE LINE OF it_syscolumns,
ld_eee_flag  TYPE DB6XPLSTMT-DELETABLE ,
it_sysnodes  TYPE STANDARD TABLE OF DB6XPLNODE ,
wa_sysnodes  LIKE LINE OF it_sysnodes,
ld_connection  TYPE DBCON-CON_NAME ,
ld_advise_mode  TYPE BOOLEAN ,
ld_explain_schema  TYPE DB6SCHEMA .


ld_object_type = some text here

"populate fields of struture and append to itab
append wa_systables to it_systables.

ld_object_schema = some text here

"populate fields of struture and append to itab
append wa_sysindexes to it_sysindexes.

ld_object_name = some text here

"populate fields of struture and append to itab
append wa_syscolumns to it_syscolumns.

ld_eee_flag = some text here

"populate fields of struture and append to itab
append wa_sysnodes to it_sysnodes.

SELECT single CON_NAME
FROM DBCON
INTO ld_connection.

ld_advise_mode = 'Check type of data required'.
ld_explain_schema = '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 DB6_GET_CATALOG_INFO or its description.