CREATE SAP Method Factory Method for Table Type Creation Without Reuse









Below is documentation, parameters and attributes of ABAP Method CREATE 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 directly

The following technical details of method CREATE can also be found below:

  • Importing parameters
  • Exporting parameters
  • Changing parameters
  • Returning parameters
  • Exceptions
  • Coding Examples


Parameters of Method CREATE

.

NameTypeData TypeDescriptionDefault Value
P_KEYImportingTYPE
ABAP_KEYDESCR_TAB
Key table
P_KEY_KINDImportingTYPE
ABAP_KEYDEFKIND
Key category
P_LINE_TYPEImportingTYPE REF TO
CL_ABAP_DATADESCR
Line Type
P_TABLE_KINDImportingTYPE
ABAP_TABLEKIND
Table Type (STANDARD, SORTED, HASHED)
P_UNIQUEImportingTYPE
ABAP_BOOL
Uniqueness of the Key
P_TABLE_KINDImportingTYPE
ABAP_TABLEKIND
Table Category (STANDARD, SORTED, HASHED)
P_RESULTReturningTYPE REF TO
CL_ABAP_TABLEDESCR
Result Type



Exceptions of Method CREATE

CX_SY_TABLE_CREATION - Exception when Creating a Table Type

Example 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=>CREATE(
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=>CREATE(
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



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!