GENERATE_CLASS_NEW SAP Method Generate Class
Below is documentation, parameters and attributes of ABAP Method GENERATE_CLASS_NEW within SAP class CL_ABAPCG_NWA_UTIL. 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_ABAPCG_NWA_UTIL into the relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in.
Method Type - Instance
This is an Instance Method so needs to be instantiated first before you can access any of the methods. I.e. you need to create a local variable of TYPE ref to the class.The following technical details of method GENERATE_CLASS_NEW can also be found below:
- Importing parameters
- Exporting parameters
- Changing parameters
- Returning parameters
- Exceptions
- Coding Examples
Parameters of Method GENERATE_CLASS_NEW
.| Name | Type | Data Type | Description | Default Value |
| CLASSNAME | Importing | TYPE SEOCLSNAME | Object Type Name | |
| DEVCLASS | Importing | TYPE DEVCLASS | Package | |
| INTFNAME | Importing | TYPE SEOCLSNAME | Object Type Name | |
| METHOD_SET | Importing | TYPE SEO_METHODS | Parameters | |
| PARAMETER_SET | Importing | TYPE SEO_PARAMETERS | Methods of a class | |
| REQNUM | Importing | TYPE TRKORR_OLD | Request/Task |
Exceptions of Method GENERATE_CLASS_NEW
CX_ABAPCG_EXCEPTION - ABAP CodeGenerator ExceptionsExample ABAP coding
DATA: lo_class TYPE REF TO CL_ABAPCG_NWA_UTIL.
DATA: lv_CLASSNAME TYPE SEOCLSNAME,
lv_DEVCLASS TYPE DEVCLASS,
lv_INTFNAME TYPE SEOCLSNAME,
lv_METHOD_SET TYPE SEO_METHODS,
lv_PARAMETER_SET TYPE SEO_PARAMETERS,
lv_REQNUM TYPE TRKORR_OLD,
lv_other TYPE c.
CALL METHOD lo_class=>GENERATE_CLASS_NEW(
EXPORTING
CLASSNAME = lv_CLASSNAME
DEVCLASS = lv_DEVCLASS
INTFNAME = lv_INTFNAME
METHOD_SET = lv_METHOD_SET
PARAMETER_SET = lv_PARAMETER_SET
REQNUM = lv_REQNUM ).
Links to Related Class(s)
CL_ABAPC...Full list of available SAP object classes
Search for further information about these or an SAP related objects