SAP DD_DICTIONARY_TO_NAMETAB Function Module for Reads DD information and generates X030L and X031L









DD_DICTIONARY_TO_NAMETAB is a standard dd dictionary to nametab SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Reads DD information and generates X030L and X031L 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 dd dictionary to nametab FM, simply by entering the name DD_DICTIONARY_TO_NAMETAB into the relevant SAP transaction such as SE37 or SE38.

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



Function DD_DICTIONARY_TO_NAMETAB 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 'DD_DICTIONARY_TO_NAMETAB'"Reads DD information and generates X030L and X031L
EXPORTING
* FOREIGN_KEY = 'X' "DD08L (foreign key) is also read
* PRID = 0 "
* STATUS = 'M' "'M' = latest version, 'A' = active version
TABNAME = "Table name
* TECHNICAL_INFO = 'X' "DDO9L (technical information) is also read
* NO_INCL_NAMED = ' ' "
* INCL_ALIGN = 'X' "
* NO_EXPAND = ' ' "

IMPORTING
X030L_WA = "Nametab header ( output )

TABLES
X031L_TAB = "Nametab fields ( output )

EXCEPTIONS
MAPPING_ERROR = 1
.



IMPORTING Parameters details for DD_DICTIONARY_TO_NAMETAB

FOREIGN_KEY - DD08L (foreign key) is also read

Data type: DD08L-AS4LOCAL
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

PRID -

Data type: SY-TABIX
Optional: Yes
Call by Reference: No ( called with pass by value option)

STATUS - 'M' = latest version, 'A' = active version

Data type: DD03L-AS4LOCAL
Default: 'M'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABNAME - Table name

Data type: DD02V-TABNAME
Optional: No
Call by Reference: No ( called with pass by value option)

TECHNICAL_INFO - DDO9L (technical information) is also read

Data type: DD09L-AS4LOCAL
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_INCL_NAMED -

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

INCL_ALIGN -

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

NO_EXPAND -

Data type: ABAP_BOOL
Default: ' '
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for DD_DICTIONARY_TO_NAMETAB

X030L_WA - Nametab header ( output )

Data type: X030L
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for DD_DICTIONARY_TO_NAMETAB

X031L_TAB - Nametab fields ( output )

Data type: X031L
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

MAPPING_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for DD_DICTIONARY_TO_NAMETAB 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_x030l_wa  TYPE X030L, "   
lt_x031l_tab  TYPE STANDARD TABLE OF X031L, "   
lv_foreign_key  TYPE DD08L-AS4LOCAL, "   'X'
lv_mapping_error  TYPE DD08L, "   
lv_prid  TYPE SY-TABIX, "   0
lv_status  TYPE DD03L-AS4LOCAL, "   'M'
lv_tabname  TYPE DD02V-TABNAME, "   
lv_technical_info  TYPE DD09L-AS4LOCAL, "   'X'
lv_no_incl_named  TYPE DD09L, "   ' '
lv_incl_align  TYPE ABAP_BOOL, "   'X'
lv_no_expand  TYPE ABAP_BOOL. "   ' '

  CALL FUNCTION 'DD_DICTIONARY_TO_NAMETAB'  "Reads DD information and generates X030L and X031L
    EXPORTING
         FOREIGN_KEY = lv_foreign_key
         PRID = lv_prid
         STATUS = lv_status
         TABNAME = lv_tabname
         TECHNICAL_INFO = lv_technical_info
         NO_INCL_NAMED = lv_no_incl_named
         INCL_ALIGN = lv_incl_align
         NO_EXPAND = lv_no_expand
    IMPORTING
         X030L_WA = lv_x030l_wa
    TABLES
         X031L_TAB = lt_x031l_tab
    EXCEPTIONS
        MAPPING_ERROR = 1
. " DD_DICTIONARY_TO_NAMETAB




ABAP code using 7.40 inline data declarations to call FM DD_DICTIONARY_TO_NAMETAB

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 AS4LOCAL FROM DD08L INTO @DATA(ld_foreign_key).
DATA(ld_foreign_key) = 'X'.
 
 
"SELECT single TABIX FROM SY INTO @DATA(ld_prid).
 
"SELECT single AS4LOCAL FROM DD03L INTO @DATA(ld_status).
DATA(ld_status) = 'M'.
 
"SELECT single TABNAME FROM DD02V INTO @DATA(ld_tabname).
 
"SELECT single AS4LOCAL FROM DD09L INTO @DATA(ld_technical_info).
DATA(ld_technical_info) = 'X'.
 
DATA(ld_no_incl_named) = ' '.
 
DATA(ld_incl_align) = 'X'.
 
DATA(ld_no_expand) = ' '.
 


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!