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 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_INCLUDEImportingTYPE
PROGRAM
Include Name
P_INCLUDESImportingTYPE
SCR_PROGRAMS
List of Includes
P_NAMEImportingTYPE
PROGRAM
Program Name
P_NO_PACKAGE_CHECKImportingTYPE
SYCHAR01
No Package Check
P_ONLY_INTERFACEImportingTYPE
SYCHAR01
Only Interface of Program
P_SUBSTITUTIONSImportingTYPE
SREPTAB
Table Type for SYNTAX-CHECK REPLACING
P_NO_PACKAGE_CHECKImportingTYPE
ABAP_BOOL
No Package Check
P_ONLY_INTERFACEImportingTYPE
ABAP_BOOL
Only Interface of Program
P_RESULTReturningTYPE REF TO
CL_ABAP_COMPILER
Cross Reference of an ABAP Program



Exceptions of Method CREATE

This method does not have any exceptions

Example 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



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!