SAP DD_GET_NAMETAB_HEADER Function Module for Reading the header of the active / inactive nametab
DD_GET_NAMETAB_HEADER is a standard dd get nametab header SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Reading the header of the active / inactive nametab 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 get nametab header FM, simply by entering the name DD_GET_NAMETAB_HEADER into the relevant SAP transaction such as SE37 or SE38.
Function Group: SDNT
Program Name: SAPLSDNT
Main Program: SAPLSDNT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function DD_GET_NAMETAB_HEADER 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_GET_NAMETAB_HEADER'"Reading the header of the active / inactive nametab.
EXPORTING
* STATUS = 'A' "A: Read active NT, N: Read inactive, M: Latest
TABNAME = "Table name
IMPORTING
R_MODEFLAG = "Mode flag if read inactive
R_STATUS = "read version (N/A)
X030L_WA = "Nametab header
EXCEPTIONS
NOT_FOUND = 1
IMPORTING Parameters details for DD_GET_NAMETAB_HEADER
STATUS - A: Read active NT, N: Read inactive, M: Latest
Data type: DDXTT-MODEFLAGDefault: 'A'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABNAME - Table name
Data type: DD02L-TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for DD_GET_NAMETAB_HEADER
R_MODEFLAG - Mode flag if read inactive
Data type: DDXTT-MODEFLAGOptional: No
Call by Reference: No ( called with pass by value option)
R_STATUS - read version (N/A)
Data type: DDXTT-MODEFLAGOptional: No
Call by Reference: No ( called with pass by value option)
X030L_WA - Nametab header
Data type: X030LOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND - No header of the specified status is available
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DD_GET_NAMETAB_HEADER 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_status | TYPE DDXTT-MODEFLAG, " 'A' | |||
| lv_not_found | TYPE DDXTT, " | |||
| lv_r_modeflag | TYPE DDXTT-MODEFLAG, " | |||
| lv_tabname | TYPE DD02L-TABNAME, " | |||
| lv_r_status | TYPE DDXTT-MODEFLAG, " | |||
| lv_x030l_wa | TYPE X030L. " |
|   CALL FUNCTION 'DD_GET_NAMETAB_HEADER' "Reading the header of the active / inactive nametab |
| EXPORTING | ||
| STATUS | = lv_status | |
| TABNAME | = lv_tabname | |
| IMPORTING | ||
| R_MODEFLAG | = lv_r_modeflag | |
| R_STATUS | = lv_r_status | |
| X030L_WA | = lv_x030l_wa | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| . " DD_GET_NAMETAB_HEADER | ||
ABAP code using 7.40 inline data declarations to call FM DD_GET_NAMETAB_HEADER
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 MODEFLAG FROM DDXTT INTO @DATA(ld_status). | ||||
| DATA(ld_status) | = 'A'. | |||
| "SELECT single MODEFLAG FROM DDXTT INTO @DATA(ld_r_modeflag). | ||||
| "SELECT single TABNAME FROM DD02L INTO @DATA(ld_tabname). | ||||
| "SELECT single MODEFLAG FROM DDXTT INTO @DATA(ld_r_status). | ||||
Search for further information about these or an SAP related objects