SAP Function Modules

LVC_FIELDCATALOG_MERGE SAP Function module







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

Associated Function Group: SLVC
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM LVC_FIELDCATALOG_MERGE - LVC FIELDCATALOG MERGE





CALL FUNCTION 'LVC_FIELDCATALOG_MERGE' "
* EXPORTING
*   i_buffer_active =           "               Buffer active
*   i_structure_name =          " dd02l-tabname  Structure name (structure, table, view)
*   i_client_never_display = 'X'  " slis_char_1  Hide client fields
*   i_bypassing_buffer =        " char01        Ignore buffer while reading
*   i_internal_tabname =        " dd02l-tabname  Table Name
  CHANGING
    ct_fieldcat =               " lvc_t_fcat    Field Catalog with Field Descriptions
  EXCEPTIONS
    INCONSISTENT_INTERFACE = 1  "               Call parameter combination error
    PROGRAM_ERROR = 2           "               Program Errors
    .  "  LVC_FIELDCATALOG_MERGE

ABAP code example for Function Module LVC_FIELDCATALOG_MERGE





The ABAP code below is a full code listing to execute function module LVC_FIELDCATALOG_MERGE 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_ct_fieldcat) = 'Check type of data required'.
DATA(ld_i_buffer_active) = 'some text here'.

SELECT single TABNAME
FROM DD02L
INTO @DATA(ld_i_structure_name).

DATA(ld_i_client_never_display) = 'Check type of data required'.
DATA(ld_i_bypassing_buffer) = 'Check type of data required'.

SELECT single TABNAME
FROM DD02L
INTO @DATA(ld_i_internal_tabname).
. CALL FUNCTION 'LVC_FIELDCATALOG_MERGE' * EXPORTING * i_buffer_active = ld_i_buffer_active * i_structure_name = ld_i_structure_name * i_client_never_display = ld_i_client_never_display * i_bypassing_buffer = ld_i_bypassing_buffer * i_internal_tabname = ld_i_internal_tabname CHANGING ct_fieldcat = ld_ct_fieldcat EXCEPTIONS INCONSISTENT_INTERFACE = 1 PROGRAM_ERROR = 2 . " LVC_FIELDCATALOG_MERGE
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_ct_fieldcat  TYPE LVC_T_FCAT ,
ld_i_buffer_active  TYPE STRING ,
ld_i_structure_name  TYPE DD02L-TABNAME ,
ld_i_client_never_display  TYPE SLIS_CHAR_1 ,
ld_i_bypassing_buffer  TYPE CHAR01 ,
ld_i_internal_tabname  TYPE DD02L-TABNAME .

ld_ct_fieldcat = 'Check type of data required'.
ld_i_buffer_active = 'some text here'.

SELECT single TABNAME
FROM DD02L
INTO ld_i_structure_name.

ld_i_client_never_display = 'Check type of data required'.
ld_i_bypassing_buffer = 'Check type of data required'.

SELECT single TABNAME
FROM DD02L
INTO ld_i_internal_tabname.

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