CREATE SAP Method Create an Instance (if Necessary)
Below is documentation, parameters and attributes of ABAP Method CREATE within SAP class CL_ABAP_COMPILER. 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_COMPILER 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 CREATE can also be found below:
- Importing parameters
- Exporting parameters
- Changing parameters
- Returning parameters
- Exceptions
- Coding Examples
Parameters of Method CREATE
.| Name | Type | Data Type | Description | Default Value |
| P_INCLUDE | Importing | TYPE PROGRAM | Include Name | |
| P_INCLUDES | Importing | TYPE SCR_PROGRAMS | List of Includes | |
| P_NAME | Importing | TYPE PROGRAM | Program Name | |
| P_NO_PACKAGE_CHECK | Importing | TYPE SYCHAR01 | No Package Check | |
| P_ONLY_INTERFACE | Importing | TYPE SYCHAR01 | Only Interface of Program | |
| P_SUBSTITUTIONS | Importing | TYPE SREPTAB | Table Type for SYNTAX-CHECK REPLACING | |
| P_NO_PACKAGE_CHECK | Importing | TYPE ABAP_BOOL | No Package Check | |
| P_ONLY_INTERFACE | Importing | TYPE ABAP_BOOL | Only Interface of Program | |
| P_RESULT | Returning | TYPE REF TO CL_ABAP_COMPILER | Cross Reference of an ABAP Program |
Exceptions of Method CREATE
This method does not have any exceptionsExample ABAP coding
DATA: lv_P_INCLUDE TYPE PROGRAM,
lv_P_INCLUDES TYPE SCR_PROGRAMS,
lv_P_NAME TYPE PROGRAM,
lv_P_NO_PACKAGE_CHECK TYPE SYCHAR01,
lv_P_ONLY_INTERFACE TYPE SYCHAR01,
lv_P_RESULT TYPE CL_ABAP_COMPILER,
lv_P_SUBSTITUTIONS TYPE SREPTAB,
lv_P_NO_PACKAGE_CHECK TYPE ABAP_BOOL,
lv_P_ONLY_INTERFACE TYPE ABAP_BOOL,
lv_other TYPE c.
CALL METHOD CL_ABAP_COMPILER=>CREATE(
EXPORTING
P_INCLUDE = lv_P_INCLUDE
P_INCLUDES = lv_P_INCLUDES
P_NAME = lv_P_NAME
P_NO_PACKAGE_CHECK = lv_P_NO_PACKAGE_CHECK
P_ONLY_INTERFACE = lv_P_ONLY_INTERFACE
P_SUBSTITUTIONS = lv_P_SUBSTITUTIONS
P_NO_PACKAGE_CHECK = lv_P_NO_PACKAGE_CHECK
P_ONLY_INTERFACE = lv_P_ONLY_INTERFACE
RECEIVING
P_RESULT = lv_P_RESULT )
"Alternate coding for Method Call with returning parameter
lv_P_RESULT = CL_ABAP_COMPILER=>CREATE(
EXPORTING
P_INCLUDE = lv_P_INCLUDE
P_INCLUDES = lv_P_INCLUDES
P_NAME = lv_P_NAME
P_NO_PACKAGE_CHECK = lv_P_NO_PACKAGE_CHECK
P_ONLY_INTERFACE = lv_P_ONLY_INTERFACE
P_SUBSTITUTIONS = lv_P_SUBSTITUTIONS
P_NO_PACKAGE_CHECK = lv_P_NO_PACKAGE_CHECK
P_ONLY_INTERFACE = lv_P_ONLY_INTERFACE ).
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