SAP Function Modules

DD_GET_DD03P_ALL SAP Function module - Simultaneous reading of A- and N-version of the field definitions







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

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


Pattern for FM DD_GET_DD03P_ALL - DD GET DD03P ALL





CALL FUNCTION 'DD_GET_DD03P_ALL' "Simultaneous reading of A- and N-version of the field definitions
* EXPORTING
*   a_noincl = ' '              "               Filter for include lines {'X', ' '}
*   defstatus = 'A'             " dd04l-as4local  Status of the DTEL/DOMA definition {'A', 'M'}
*   langu = SYST-LANGU          " dd03p-ddlanguage
*   langu = SYST-LANGU          " dd03p-ddlanguage  Language of the DTEL texts or the '%'
*   n_noincl = ' '              "               Filter for include lines {'X', ' '}
*   tabname = ' '               " dd03l-tabname
*   tabname = ' '               " dd03l-tabname  Name of the table to be read
  IMPORTING
    a_field_no =                " sy-tabix      Number of the found fields of the A version of the table
    a_nodef =                   " sy-tabix
    a_nodef =                   " sy-tabix      Index of the last field without definition or 0
    a_notext =                  " sy-tabix      Index of the last field without text or 0
    fstati =                    "
    fstati =                    "               found versions {' ' , 'M', 'N', 'A'}
    n_field_no =                " sy-tabix      Number of the fields of the N version of the table
    n_nodef =                   " sy-tabix
    n_nodef =                   " sy-tabix      Index of the last field without definition or 0
    n_notext =                  " sy-tabix      Index of the last field without text or 0
  TABLES
    a_dd03p_tab =               " dd03p         Fields of the A version of the table
    n_dd03p_tab =               " dd03p         Fields of the N version of the table
  EXCEPTIONS
    ILLEGAL_VALUE = 1           "               current parameter with invalid value
    .  "  DD_GET_DD03P_ALL

ABAP code example for Function Module DD_GET_DD03P_ALL





The ABAP code below is a full code listing to execute function module DD_GET_DD03P_ALL 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_a_field_no  TYPE SY-TABIX ,
ld_a_nodef  TYPE SY-TABIX ,
ld_a_nodef  TYPE SY-TABIX ,
ld_a_notext  TYPE SY-TABIX ,
ld_fstati  TYPE STRING ,
ld_fstati  TYPE STRING ,
ld_n_field_no  TYPE SY-TABIX ,
ld_n_nodef  TYPE SY-TABIX ,
ld_n_nodef  TYPE SY-TABIX ,
ld_n_notext  TYPE SY-TABIX ,
it_a_dd03p_tab  TYPE STANDARD TABLE OF DD03P,"TABLES PARAM
wa_a_dd03p_tab  LIKE LINE OF it_a_dd03p_tab ,
it_n_dd03p_tab  TYPE STANDARD TABLE OF DD03P,"TABLES PARAM
wa_n_dd03p_tab  LIKE LINE OF it_n_dd03p_tab .

DATA(ld_a_noincl) = 'some text here'.

SELECT single AS4LOCAL
FROM DD04L
INTO @DATA(ld_defstatus).


DATA(ld_langu) = Check type of data required

DATA(ld_langu) = Check type of data required
DATA(ld_n_noincl) = 'some text here'.

SELECT single TABNAME
FROM DD03L
INTO @DATA(ld_tabname).


SELECT single TABNAME
FROM DD03L
INTO @DATA(ld_tabname).


"populate fields of struture and append to itab
append wa_a_dd03p_tab to it_a_dd03p_tab.

"populate fields of struture and append to itab
append wa_n_dd03p_tab to it_n_dd03p_tab. . CALL FUNCTION 'DD_GET_DD03P_ALL' * EXPORTING * a_noincl = ld_a_noincl * defstatus = ld_defstatus * langu = ld_langu * langu = ld_langu * n_noincl = ld_n_noincl * tabname = ld_tabname * tabname = ld_tabname IMPORTING a_field_no = ld_a_field_no a_nodef = ld_a_nodef a_nodef = ld_a_nodef a_notext = ld_a_notext fstati = ld_fstati fstati = ld_fstati n_field_no = ld_n_field_no n_nodef = ld_n_nodef n_nodef = ld_n_nodef n_notext = ld_n_notext TABLES a_dd03p_tab = it_a_dd03p_tab n_dd03p_tab = it_n_dd03p_tab EXCEPTIONS ILLEGAL_VALUE = 1 . " DD_GET_DD03P_ALL
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_a_field_no  TYPE SY-TABIX ,
ld_a_noincl  TYPE STRING ,
it_a_dd03p_tab  TYPE STANDARD TABLE OF DD03P ,
wa_a_dd03p_tab  LIKE LINE OF it_a_dd03p_tab,
ld_a_nodef  TYPE SY-TABIX ,
ld_a_nodef  TYPE SY-TABIX ,
ld_defstatus  TYPE DD04L-AS4LOCAL ,
it_n_dd03p_tab  TYPE STANDARD TABLE OF DD03P ,
wa_n_dd03p_tab  LIKE LINE OF it_n_dd03p_tab,
ld_a_notext  TYPE SY-TABIX ,
ld_langu  TYPE DD03P-DDLANGUAGE ,
ld_langu  TYPE DD03P-DDLANGUAGE ,
ld_fstati  TYPE STRING ,
ld_fstati  TYPE STRING ,
ld_n_noincl  TYPE STRING ,
ld_n_field_no  TYPE SY-TABIX ,
ld_tabname  TYPE DD03L-TABNAME ,
ld_tabname  TYPE DD03L-TABNAME ,
ld_n_nodef  TYPE SY-TABIX ,
ld_n_nodef  TYPE SY-TABIX ,
ld_n_notext  TYPE SY-TABIX .

ld_a_noincl = 'some text here'.

"populate fields of struture and append to itab
append wa_a_dd03p_tab to it_a_dd03p_tab.

SELECT single AS4LOCAL
FROM DD04L
INTO ld_defstatus.


"populate fields of struture and append to itab
append wa_n_dd03p_tab to it_n_dd03p_tab.

ld_langu = Check type of data required

ld_langu = Check type of data required
ld_n_noincl = 'some text here'.

SELECT single TABNAME
FROM DD03L
INTO ld_tabname.


SELECT single TABNAME
FROM DD03L
INTO ld_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 DD_GET_DD03P_ALL or its description.