GET_WITH_KEYS SAP Method Table Type Creation with Secondary Keys and Reuse









Below is documentation, parameters and attributes of ABAP Method GET_WITH_KEYS 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 GET_WITH_KEYS can also be found below:

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


Parameters of Method GET_WITH_KEYS

.

NameTypeData TypeDescriptionDefault Value
P_INITIAL_SIZEImportingTYPE
I
Initial Table Size
P_KEYSImportingTYPE
ABAP_TABLE_KEYDESCR_TAB
Table Keys
P_LINE_TYPEImportingTYPE REF TO
CL_ABAP_DATADESCR
Type Description Object of Row Type of Table
P_KEY_ALIASESImportingTYPE
ABAP_KEY_ALIAS_MAP
Table Key Aliases
P_RESULTReturningTYPE REF TO
CL_ABAP_TABLEDESCR
Type Description Object of Table



Exceptions of Method GET_WITH_KEYS

CX_SY_TABLE_CREATION - Exception when Creating a Table Type

Example ABAP coding


DATA: lv_P_INITIAL_SIZE TYPE I,
lv_P_KEYS TYPE ABAP_TABLE_KEYDESCR_TAB,
lv_P_LINE_TYPE TYPE CL_ABAP_DATADESCR,
lv_P_RESULT TYPE CL_ABAP_TABLEDESCR,
lv_P_KEY_ALIASES TYPE ABAP_KEY_ALIAS_MAP,
lv_other TYPE c.

CALL METHOD CL_ABAP_TABLEDESCR=>GET_WITH_KEYS(
EXPORTING
P_INITIAL_SIZE = lv_P_INITIAL_SIZE
P_KEYS = lv_P_KEYS
P_LINE_TYPE = lv_P_LINE_TYPE
P_KEY_ALIASES = lv_P_KEY_ALIASES
RECEIVING
P_RESULT = lv_P_RESULT )



"Alternate coding for Method Call with returning parameter
lv_P_RESULT = CL_ABAP_TABLEDESCR=>GET_WITH_KEYS(
EXPORTING
P_INITIAL_SIZE = lv_P_INITIAL_SIZE
P_KEYS = lv_P_KEYS
P_LINE_TYPE = lv_P_LINE_TYPE
P_KEY_ALIASES = lv_P_KEY_ALIASES ).

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!