SAP Function Modules

RFC_METADATA_GET SAP Function module







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

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


Pattern for FM RFC_METADATA_GET - RFC METADATA GET





CALL FUNCTION 'RFC_METADATA_GET' "
* EXPORTING
*   deep =                      " char1
*   language = SY-LANGU         " sprsl
*   get_client_dep_fields =     " boolean
*   get_timestamps =            " boolean
*   evaluate_links =            " boolean
*   do_not_resolve_simple_types =   " boolean
  TABLES
    functionnames =             " rfcfunctionname
    datatypes =                 " rfc_md_ddic_name
    known_datatypes =           " rfc_md_ddic_name
    parameters =                " rfc_metadata_params
    datatypescont =             " rfc_metadata_ddic
    indirecttypes =             " rfc_metadata_ddic_indirect
*   func_errors =               " rfc_func_error
*   dd_errors =                 " rfc_dd_error
  EXCEPTIONS
    INVALID_MODE = 1            "
    INTERNAL_ERROR = 2          "
    .  "  RFC_METADATA_GET

ABAP code example for Function Module RFC_METADATA_GET





The ABAP code below is a full code listing to execute function module RFC_METADATA_GET 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_functionnames  TYPE STANDARD TABLE OF RFCFUNCTIONNAME,"TABLES PARAM
wa_functionnames  LIKE LINE OF it_functionnames ,
it_datatypes  TYPE STANDARD TABLE OF RFC_MD_DDIC_NAME,"TABLES PARAM
wa_datatypes  LIKE LINE OF it_datatypes ,
it_known_datatypes  TYPE STANDARD TABLE OF RFC_MD_DDIC_NAME,"TABLES PARAM
wa_known_datatypes  LIKE LINE OF it_known_datatypes ,
it_parameters  TYPE STANDARD TABLE OF RFC_METADATA_PARAMS,"TABLES PARAM
wa_parameters  LIKE LINE OF it_parameters ,
it_datatypescont  TYPE STANDARD TABLE OF RFC_METADATA_DDIC,"TABLES PARAM
wa_datatypescont  LIKE LINE OF it_datatypescont ,
it_indirecttypes  TYPE STANDARD TABLE OF RFC_METADATA_DDIC_INDIRECT,"TABLES PARAM
wa_indirecttypes  LIKE LINE OF it_indirecttypes ,
it_func_errors  TYPE STANDARD TABLE OF RFC_FUNC_ERROR,"TABLES PARAM
wa_func_errors  LIKE LINE OF it_func_errors ,
it_dd_errors  TYPE STANDARD TABLE OF RFC_DD_ERROR,"TABLES PARAM
wa_dd_errors  LIKE LINE OF it_dd_errors .

DATA(ld_deep) = 'Check type of data required'.
DATA(ld_language) = 'Check type of data required'.
DATA(ld_get_client_dep_fields) = 'Check type of data required'.
DATA(ld_get_timestamps) = 'Check type of data required'.
DATA(ld_evaluate_links) = 'Check type of data required'.
DATA(ld_do_not_resolve_simple_types) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_functionnames to it_functionnames.

"populate fields of struture and append to itab
append wa_datatypes to it_datatypes.

"populate fields of struture and append to itab
append wa_known_datatypes to it_known_datatypes.

"populate fields of struture and append to itab
append wa_parameters to it_parameters.

"populate fields of struture and append to itab
append wa_datatypescont to it_datatypescont.

"populate fields of struture and append to itab
append wa_indirecttypes to it_indirecttypes.

"populate fields of struture and append to itab
append wa_func_errors to it_func_errors.

"populate fields of struture and append to itab
append wa_dd_errors to it_dd_errors. . CALL FUNCTION 'RFC_METADATA_GET' * EXPORTING * deep = ld_deep * language = ld_language * get_client_dep_fields = ld_get_client_dep_fields * get_timestamps = ld_get_timestamps * evaluate_links = ld_evaluate_links * do_not_resolve_simple_types = ld_do_not_resolve_simple_types TABLES functionnames = it_functionnames datatypes = it_datatypes known_datatypes = it_known_datatypes parameters = it_parameters datatypescont = it_datatypescont indirecttypes = it_indirecttypes * func_errors = it_func_errors * dd_errors = it_dd_errors EXCEPTIONS INVALID_MODE = 1 INTERNAL_ERROR = 2 . " RFC_METADATA_GET
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_deep  TYPE CHAR1 ,
it_functionnames  TYPE STANDARD TABLE OF RFCFUNCTIONNAME ,
wa_functionnames  LIKE LINE OF it_functionnames,
ld_language  TYPE SPRSL ,
it_datatypes  TYPE STANDARD TABLE OF RFC_MD_DDIC_NAME ,
wa_datatypes  LIKE LINE OF it_datatypes,
ld_get_client_dep_fields  TYPE BOOLEAN ,
it_known_datatypes  TYPE STANDARD TABLE OF RFC_MD_DDIC_NAME ,
wa_known_datatypes  LIKE LINE OF it_known_datatypes,
ld_get_timestamps  TYPE BOOLEAN ,
it_parameters  TYPE STANDARD TABLE OF RFC_METADATA_PARAMS ,
wa_parameters  LIKE LINE OF it_parameters,
ld_evaluate_links  TYPE BOOLEAN ,
it_datatypescont  TYPE STANDARD TABLE OF RFC_METADATA_DDIC ,
wa_datatypescont  LIKE LINE OF it_datatypescont,
ld_do_not_resolve_simple_types  TYPE BOOLEAN ,
it_indirecttypes  TYPE STANDARD TABLE OF RFC_METADATA_DDIC_INDIRECT ,
wa_indirecttypes  LIKE LINE OF it_indirecttypes,
it_func_errors  TYPE STANDARD TABLE OF RFC_FUNC_ERROR ,
wa_func_errors  LIKE LINE OF it_func_errors,
it_dd_errors  TYPE STANDARD TABLE OF RFC_DD_ERROR ,
wa_dd_errors  LIKE LINE OF it_dd_errors.

ld_deep = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_functionnames to it_functionnames.
ld_language = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_datatypes to it_datatypes.
ld_get_client_dep_fields = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_known_datatypes to it_known_datatypes.
ld_get_timestamps = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_parameters to it_parameters.
ld_evaluate_links = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_datatypescont to it_datatypescont.
ld_do_not_resolve_simple_types = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_indirecttypes to it_indirecttypes.

"populate fields of struture and append to itab
append wa_func_errors to it_func_errors.

"populate fields of struture and append to itab
append wa_dd_errors to it_dd_errors.

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