GET SAP Method Factory Method for Table Type Creation With Reuse
Below is documentation, parameters and attributes of ABAP Method GET within SAP class CL_ABAP_TABLEDESCR. There is also a number of example ABAP code snipts to help you use the functionality of this method.
This method is available within SAP systems depending on your version and release level, you can view further information by entering the class name CL_ABAP_TABLEDESCR into the relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in.
Method Type - Static
This is a Static Method so you can call it directlyThe following technical details of method GET can also be found below:
- Importing parameters
- Exporting parameters
- Changing parameters
- Returning parameters
- Exceptions
- Coding Examples
Parameters of Method GET
.| Name | Type | Data Type | Description | Default Value |
| P_KEY | Importing | TYPE ABAP_KEYDESCR_TAB | Key Table | |
| P_KEY_KIND | Importing | TYPE ABAP_KEYDEFKIND | Key Category | |
| P_LINE_TYPE | Importing | TYPE REF TO CL_ABAP_DATADESCR | Row Type | |
| P_TABLE_KIND | Importing | TYPE ABAP_TABLEKIND | Table Type (STANDARD, SORTED, HASHED) | |
| P_UNIQUE | Importing | TYPE ABAP_BOOL | Uniqueness of the Key | |
| P_TABLE_KIND | Importing | TYPE ABAP_TABLEKIND | Table Category (STANDARD, SORTED, HASHED) | |
| P_RESULT | Returning | TYPE REF TO CL_ABAP_TABLEDESCR | Result Type |
Exceptions of Method GET
CX_SY_TABLE_CREATION - Exception when Creating a Table TypeExample ABAP coding
DATA: lv_P_KEY TYPE ABAP_KEYDESCR_TAB,
lv_P_KEY_KIND TYPE ABAP_KEYDEFKIND,
lv_P_LINE_TYPE TYPE CL_ABAP_DATADESCR,
lv_P_RESULT TYPE CL_ABAP_TABLEDESCR,
lv_P_TABLE_KIND TYPE ABAP_TABLEKIND,
lv_P_UNIQUE TYPE ABAP_BOOL,
lv_P_TABLE_KIND TYPE ABAP_TABLEKIND,
lv_other TYPE c.
CALL METHOD CL_ABAP_TABLEDESCR=>GET(
EXPORTING
P_KEY = lv_P_KEY
P_KEY_KIND = lv_P_KEY_KIND
P_LINE_TYPE = lv_P_LINE_TYPE
P_TABLE_KIND = lv_P_TABLE_KIND
P_UNIQUE = lv_P_UNIQUE
P_TABLE_KIND = lv_P_TABLE_KIND
RECEIVING
P_RESULT = lv_P_RESULT )
"Alternate coding for Method Call with returning parameter
lv_P_RESULT = CL_ABAP_TABLEDESCR=>GET(
EXPORTING
P_KEY = lv_P_KEY
P_KEY_KIND = lv_P_KEY_KIND
P_LINE_TYPE = lv_P_LINE_TYPE
P_TABLE_KIND = lv_P_TABLE_KIND
P_UNIQUE = lv_P_UNIQUE
P_TABLE_KIND = lv_P_TABLE_KIND ).
Links to Related Class(s)
CL_ABAP_...Full list of available SAP object classes
Search for further information about these or an SAP related objects