GoodleAds

OOPS ABAP LOCAL CLASS PROGRAM ON CONSTRUCTOR


PARAMETERS P_TELFX TYPE KNA1-TELFX.
*----------------------------------------------------------------------*
*       CLASS LCL_ABAP DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS LCL_ABAP DEFINITION.

  
PUBLIC SECTION.
  
DATA V_TELFX TYPE KNA1-TELFX.
  
CLASS-DATA V_TELFX1 TYPE KNA1-TELFX.

  
METHODS INSTANCE_CONSTRUCTOR
  
IMPORTING INPUT_TELFX TYPE KNA1-TELFX.

 
CLASS-METHODS CLASS_CONSTRUCTOR.
ENDCLASS.                                         "LCL_ABAP DEFINITION
DATA OOPS TYPE REF TO LCL_ABAP.
CREATE OBJECT OOPS.
CALL METHOD OOPS->INSTANCE_CONSTRUCTOR
  
EXPORTING
    INPUT_TELFX 
P_TELFX.
WRITE:/ OOPS->V_TELFX,
        LCL_ABAP
=>V_TELFX1 COLOR 3.


*----------------------------------------------------------------------*
*       CLASS LCL_ABAP IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS LCL_ABAP IMPLEMENTATION.

  
METHOD INSTANCE_CONSTRUCTOR.
    V_TELFX 
P_TELFX.
  
ENDMETHOD.
                                                  
"INSTANCE_CONSTRUCTOR
  
METHOD CLASS_CONSTRUCTOR.

    V_TELFX1 
'0221-9933-4400'.
  
ENDMETHOD.                                    "CLASS_CONSTRUCTOR
ENDCLASS.
                                                                                                                       "LCL_ABAP IMPLEMENTATION
****************************************************************
*INSTANCE_CONSTRUCTOR = INSTANCE
* CLASS_CONSTRUCTOR = STATIC CONSTRUCTOR.
* DATA = INSTANCE.
* CLASS-DATA = STATIC
* METHOD = INSTANCE
* CLASS-METHOD = STATIC

******************************************************************

OUTPUT:








No comments:

Post a Comment