GET_INSTANCE SAP Method Create class
Below is documentation, parameters and attributes of ABAP Method GET_INSTANCE within SAP class CL_PERS_DEFAULT_TABLE. 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_PERS_DEFAULT_TABLE 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_INSTANCE can also be found below:
- Importing parameters
- Exporting parameters
- Changing parameters
- Returning parameters
- Exceptions
- Coding Examples
Parameters of Method GET_INSTANCE
.| Name | Type | Data Type | Description | Default Value |
| P_PERS_KEY | Importing | TYPE SPERS_KEY | Personalization object key | |
| P_PERS_REG_DATA | Importing | TYPE SPERS_REG | Personalization object settings | |
| P_PERS_TYPE | Importing | TYPE SPERS_TYPE | Personalization level | |
| P_INSTANCE | Returning | TYPE REF TO CL_PERS_DEFAULT_TABLE | Standard personalization repository |
Exceptions of Method GET_INSTANCE
PERS_KEY_NOT_FOUND - Personalization object key does not existExample ABAP coding
DATA: lv_P_INSTANCE TYPE CL_PERS_DEFAULT_TABLE,
lv_P_PERS_KEY TYPE SPERS_KEY,
lv_P_PERS_REG_DATA TYPE SPERS_REG,
lv_P_PERS_TYPE TYPE SPERS_TYPE,
lv_other TYPE c.
CALL METHOD CL_PERS_DEFAULT_TABLE=>GET_INSTANCE(
EXPORTING
P_PERS_KEY = lv_P_PERS_KEY
P_PERS_REG_DATA = lv_P_PERS_REG_DATA
P_PERS_TYPE = lv_P_PERS_TYPE
RECEIVING
P_INSTANCE = lv_P_INSTANCE )
"Alternate coding for Method Call with returning parameter
lv_P_INSTANCE = CL_PERS_DEFAULT_TABLE=>GET_INSTANCE(
EXPORTING
P_PERS_KEY = lv_P_PERS_KEY
P_PERS_REG_DATA = lv_P_PERS_REG_DATA
P_PERS_TYPE = lv_P_PERS_TYPE ).
Links to Related Class(s)
CL_PERS_...Full list of available SAP object classes
Search for further information about these or an SAP related objects