SAP CNV_20100_CREATE_DYNAMIC_TABLE Function Module for creates a dynamic internal table









CNV_20100_CREATE_DYNAMIC_TABLE is a standard cnv 20100 create dynamic table SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for creates a dynamic internal table processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for cnv 20100 create dynamic table FM, simply by entering the name CNV_20100_CREATE_DYNAMIC_TABLE into the relevant SAP transaction such as SE37 or SE38.

Function Group: CNV_20100_IC
Program Name: SAPLCNV_20100_IC
Main Program: SAPLCNV_20100_IC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CNV_20100_CREATE_DYNAMIC_TABLE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'CNV_20100_CREATE_DYNAMIC_TABLE'"creates a dynamic internal table
EXPORTING
I_STRUCT_NAME = "Table name
* I_ALV_CLEAR_KEY = 'X' "General flag

IMPORTING
E_TOTAL_LENGTH = "length of the internal table

CHANGING
DYN_WA = "reference to the newly created internal table
* DYN_TABLE = "reference to the newly created workarea for this internal table

TABLES
* CTBL_ALV_FIELDCAT = "Field catalog
* CTBL_DYN_CATALOG = "ALV control: Field catalog
.



IMPORTING Parameters details for CNV_20100_CREATE_DYNAMIC_TABLE

I_STRUCT_NAME - Table name

Data type: DD02L-TABNAME
Optional: No
Call by Reference: Yes

I_ALV_CLEAR_KEY - General flag

Data type: FLAG
Default: 'X'
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for CNV_20100_CREATE_DYNAMIC_TABLE

E_TOTAL_LENGTH - length of the internal table

Data type: I
Optional: No
Call by Reference: Yes

CHANGING Parameters details for CNV_20100_CREATE_DYNAMIC_TABLE

DYN_WA - reference to the newly created internal table

Data type: DATA
Optional: No
Call by Reference: Yes

DYN_TABLE - reference to the newly created workarea for this internal table

Data type: DATA
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for CNV_20100_CREATE_DYNAMIC_TABLE

CTBL_ALV_FIELDCAT - Field catalog

Data type: SLIS_T_FIELDCAT_ALV
Optional: Yes
Call by Reference: Yes

CTBL_DYN_CATALOG - ALV control: Field catalog

Data type: LVC_S_FCAT
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for CNV_20100_CREATE_DYNAMIC_TABLE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_dyn_wa  TYPE DATA, "   
lv_i_struct_name  TYPE DD02L-TABNAME, "   
lv_e_total_length  TYPE I, "   
lt_ctbl_alv_fieldcat  TYPE STANDARD TABLE OF SLIS_T_FIELDCAT_ALV, "   
lv_dyn_table  TYPE DATA, "   
lv_i_alv_clear_key  TYPE FLAG, "   'X'
lt_ctbl_dyn_catalog  TYPE STANDARD TABLE OF LVC_S_FCAT. "   

  CALL FUNCTION 'CNV_20100_CREATE_DYNAMIC_TABLE'  "creates a dynamic internal table
    EXPORTING
         I_STRUCT_NAME = lv_i_struct_name
         I_ALV_CLEAR_KEY = lv_i_alv_clear_key
    IMPORTING
         E_TOTAL_LENGTH = lv_e_total_length
    CHANGING
         DYN_WA = lv_dyn_wa
         DYN_TABLE = lv_dyn_table
    TABLES
         CTBL_ALV_FIELDCAT = lt_ctbl_alt_fieldcat
         CTBL_DYN_CATALOG = lt_ctbl_dyn_catalog
. " CNV_20100_CREATE_DYNAMIC_TABLE




ABAP code using 7.40 inline data declarations to call FM CNV_20100_CREATE_DYNAMIC_TABLE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single TABNAME FROM DD02L INTO @DATA(ld_i_struct_name).
 
 
 
 
DATA(ld_i_alv_clear_key) = 'X'.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!