CONSTRUCTOR SAP Method CONSTRUCTOR









Below is documentation, parameters and attributes of ABAP Method CONSTRUCTOR within SAP class CX_DB2_NOT_FOUND. There is also a number of example ABAP code snipts to help you use the functionality of this method.

This method is a Class Constructor so it is called automatically when the class is accessed for the first time.

This method is available within SAP systems depending on your version and release level, you can view further information by entering the class name CX_DB2_NOT_FOUND 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 CONSTRUCTOR can also be found below:

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


Parameters of Method CONSTRUCTOR

.

NameTypeData TypeDescriptionDefault Value
CALLSTACKImportingTYPE
ABAP_CALLSTACK
CLASS_NAMEImportingTYPE
SYREPID
CODE_LINEImportingTYPE
I
CX_NAMEImportingTYPE
SYREPID
DESCRIPTIONImportingTYPE
STRING
FUNCTION_UNITImportingTYPE
SYREPID
FUNCTION_UNIT
INCLUDE_NAMEImportingTYPE
SYREPID
LONGTEXTImportingTYPE
STRING
MESSAGEImportingTYPE
STRING
METHOD_NAMEImportingTYPE
SYREPID
METHOD_NAME
PREVIOUSImportingLIKE
PREVIOUS
PROGRAM_NAMEImportingTYPE
SYREPID
RCImportingTYPE
SYSUBRC
RC
RFC_MESSAGEImportingTYPE
DBA_RFC_MESSAGE
RFC_MESSAGE
SYSIDImportingTYPE
DB6NAVSYST-SYSID
SYSID
SYSLOG_MESSAGEImportingTYPE
CHAR70
SY_BATCHImportingTYPE
SY-BATCH
SY_TABIXImportingTYPE
SY-TABIX
TEXTIDImportingLIKE
TEXTID



Exceptions of Method CONSTRUCTOR

This method does not have any exceptions

Example ABAP coding

As the method is a Class Constructor the below code doesnt really make sense as it cant be executed as a stand alone method but this is how it would look if it was a normal static method.

DATA: lo_class TYPE REF TO CX_DB2_NOT_FOUND.
DATA: lv_CALLSTACK TYPE ABAP_CALLSTACK,
lv_CLASS_NAME TYPE SYREPID,
lv_CODE_LINE TYPE I,
lv_CX_NAME TYPE SYREPID,
lv_DESCRIPTION TYPE STRING,
lv_FUNCTION_UNIT TYPE SYREPID,
lv_INCLUDE_NAME TYPE SYREPID,
lv_LONGTEXT TYPE STRING,
lv_MESSAGE TYPE STRING,
lv_METHOD_NAME TYPE SYREPID,
lv_PREVIOUS TYPE PREVIOUS,
lv_PROGRAM_NAME TYPE SYREPID,
lv_RC TYPE SYSUBRC,
lv_RFC_MESSAGE TYPE DBA_RFC_MESSAGE,
lv_SYSID TYPE DB6NAVSYST-SYSID,
lv_SYSLOG_MESSAGE TYPE CHAR70,
lv_SY_BATCH TYPE SY-BATCH,
lv_SY_TABIX TYPE SY-TABIX,
lv_TEXTID TYPE TEXTID,
lv_other TYPE c.

CALL METHOD lo_class=>CONSTRUCTOR(
EXPORTING
CALLSTACK = lv_CALLSTACK
CLASS_NAME = lv_CLASS_NAME
CODE_LINE = lv_CODE_LINE
CX_NAME = lv_CX_NAME
DESCRIPTION = lv_DESCRIPTION
FUNCTION_UNIT = lv_FUNCTION_UNIT
INCLUDE_NAME = lv_INCLUDE_NAME
LONGTEXT = lv_LONGTEXT
MESSAGE = lv_MESSAGE
METHOD_NAME = lv_METHOD_NAME
PREVIOUS = lv_PREVIOUS
PROGRAM_NAME = lv_PROGRAM_NAME
RC = lv_RC
RFC_MESSAGE = lv_RFC_MESSAGE
SYSID = lv_SYSID
SYSLOG_MESSAGE = lv_SYSLOG_MESSAGE
SY_BATCH = lv_SY_BATCH
SY_TABIX = lv_SY_TABIX
TEXTID = lv_TEXTID ).

Links to Related Class(s)

CX_DB2_N...
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!