SAP Function Modules

GET_TABD_FOR_VERSIONS SAP Function module - Table objects (headers, fields, foreign keys, texts) for version admin.







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

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


Pattern for FM GET_TABD_FOR_VERSIONS - GET TABD FOR VERSIONS





CALL FUNCTION 'GET_TABD_FOR_VERSIONS' "Table objects (headers, fields, foreign keys, texts) for version admin.
  EXPORTING
*   status = 'A'                " dd02l-as4local  active or revised object
    tabname =                   " dd02l-tabname  Table name
  TABLES
    vd02v =                     " dd02v         Header
    vd03v =                     " dd03v         Fields
    vd05v =                     " dd05v         Foreign key fields
    vd08v =                     " dd08v         Foreign key
*   vd35v =                     " dd35v
*   vd36v =                     " dd36v
*   vd02tv =                    " dd02tv
*   vd03tv =                    " dd03tv
*   vd08tv =                    " dd08tv
*   vsmodilog =                 " smodilog
*   vsmodisrc =                 " smodisrc
  EXCEPTIONS
    NOT_FOUND = 1               "               Table is not found
    NO_MOD_DD = 2               "               no DD modification is available
    .  "  GET_TABD_FOR_VERSIONS

ABAP code example for Function Module GET_TABD_FOR_VERSIONS





The ABAP code below is a full code listing to execute function module GET_TABD_FOR_VERSIONS 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:
it_vd02v  TYPE STANDARD TABLE OF DD02V,"TABLES PARAM
wa_vd02v  LIKE LINE OF it_vd02v ,
it_vd03v  TYPE STANDARD TABLE OF DD03V,"TABLES PARAM
wa_vd03v  LIKE LINE OF it_vd03v ,
it_vd05v  TYPE STANDARD TABLE OF DD05V,"TABLES PARAM
wa_vd05v  LIKE LINE OF it_vd05v ,
it_vd08v  TYPE STANDARD TABLE OF DD08V,"TABLES PARAM
wa_vd08v  LIKE LINE OF it_vd08v ,
it_vd35v  TYPE STANDARD TABLE OF DD35V,"TABLES PARAM
wa_vd35v  LIKE LINE OF it_vd35v ,
it_vd36v  TYPE STANDARD TABLE OF DD36V,"TABLES PARAM
wa_vd36v  LIKE LINE OF it_vd36v ,
it_vd02tv  TYPE STANDARD TABLE OF DD02TV,"TABLES PARAM
wa_vd02tv  LIKE LINE OF it_vd02tv ,
it_vd03tv  TYPE STANDARD TABLE OF DD03TV,"TABLES PARAM
wa_vd03tv  LIKE LINE OF it_vd03tv ,
it_vd08tv  TYPE STANDARD TABLE OF DD08TV,"TABLES PARAM
wa_vd08tv  LIKE LINE OF it_vd08tv ,
it_vsmodilog  TYPE STANDARD TABLE OF SMODILOG,"TABLES PARAM
wa_vsmodilog  LIKE LINE OF it_vsmodilog ,
it_vsmodisrc  TYPE STANDARD TABLE OF SMODISRC,"TABLES PARAM
wa_vsmodisrc  LIKE LINE OF it_vsmodisrc .


SELECT single AS4LOCAL
FROM DD02L
INTO @DATA(ld_status).


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


"populate fields of struture and append to itab
append wa_vd02v to it_vd02v.

"populate fields of struture and append to itab
append wa_vd03v to it_vd03v.

"populate fields of struture and append to itab
append wa_vd05v to it_vd05v.

"populate fields of struture and append to itab
append wa_vd08v to it_vd08v.

"populate fields of struture and append to itab
append wa_vd35v to it_vd35v.

"populate fields of struture and append to itab
append wa_vd36v to it_vd36v.

"populate fields of struture and append to itab
append wa_vd02tv to it_vd02tv.

"populate fields of struture and append to itab
append wa_vd03tv to it_vd03tv.

"populate fields of struture and append to itab
append wa_vd08tv to it_vd08tv.

"populate fields of struture and append to itab
append wa_vsmodilog to it_vsmodilog.

"populate fields of struture and append to itab
append wa_vsmodisrc to it_vsmodisrc. . CALL FUNCTION 'GET_TABD_FOR_VERSIONS' EXPORTING * status = ld_status tabname = ld_tabname TABLES vd02v = it_vd02v vd03v = it_vd03v vd05v = it_vd05v vd08v = it_vd08v * vd35v = it_vd35v * vd36v = it_vd36v * vd02tv = it_vd02tv * vd03tv = it_vd03tv * vd08tv = it_vd08tv * vsmodilog = it_vsmodilog * vsmodisrc = it_vsmodisrc EXCEPTIONS NOT_FOUND = 1 NO_MOD_DD = 2 . " GET_TABD_FOR_VERSIONS
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_status  TYPE DD02L-AS4LOCAL ,
it_vd02v  TYPE STANDARD TABLE OF DD02V ,
wa_vd02v  LIKE LINE OF it_vd02v,
ld_tabname  TYPE DD02L-TABNAME ,
it_vd03v  TYPE STANDARD TABLE OF DD03V ,
wa_vd03v  LIKE LINE OF it_vd03v,
it_vd05v  TYPE STANDARD TABLE OF DD05V ,
wa_vd05v  LIKE LINE OF it_vd05v,
it_vd08v  TYPE STANDARD TABLE OF DD08V ,
wa_vd08v  LIKE LINE OF it_vd08v,
it_vd35v  TYPE STANDARD TABLE OF DD35V ,
wa_vd35v  LIKE LINE OF it_vd35v,
it_vd36v  TYPE STANDARD TABLE OF DD36V ,
wa_vd36v  LIKE LINE OF it_vd36v,
it_vd02tv  TYPE STANDARD TABLE OF DD02TV ,
wa_vd02tv  LIKE LINE OF it_vd02tv,
it_vd03tv  TYPE STANDARD TABLE OF DD03TV ,
wa_vd03tv  LIKE LINE OF it_vd03tv,
it_vd08tv  TYPE STANDARD TABLE OF DD08TV ,
wa_vd08tv  LIKE LINE OF it_vd08tv,
it_vsmodilog  TYPE STANDARD TABLE OF SMODILOG ,
wa_vsmodilog  LIKE LINE OF it_vsmodilog,
it_vsmodisrc  TYPE STANDARD TABLE OF SMODISRC ,
wa_vsmodisrc  LIKE LINE OF it_vsmodisrc.


SELECT single AS4LOCAL
FROM DD02L
INTO ld_status.


"populate fields of struture and append to itab
append wa_vd02v to it_vd02v.

SELECT single TABNAME
FROM DD02L
INTO ld_tabname.


"populate fields of struture and append to itab
append wa_vd03v to it_vd03v.

"populate fields of struture and append to itab
append wa_vd05v to it_vd05v.

"populate fields of struture and append to itab
append wa_vd08v to it_vd08v.

"populate fields of struture and append to itab
append wa_vd35v to it_vd35v.

"populate fields of struture and append to itab
append wa_vd36v to it_vd36v.

"populate fields of struture and append to itab
append wa_vd02tv to it_vd02tv.

"populate fields of struture and append to itab
append wa_vd03tv to it_vd03tv.

"populate fields of struture and append to itab
append wa_vd08tv to it_vd08tv.

"populate fields of struture and append to itab
append wa_vsmodilog to it_vsmodilog.

"populate fields of struture and append to itab
append wa_vsmodisrc to it_vsmodisrc.

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