Posts

Showing posts with the label local class

Local abstract class with example using parameters.

Image
1. Goto SE38. 2. Give program name and click on create. 3. Give description and select type executable program . 4. Write code. REPORT  zab_cl_abstract . DATA :  lv_erzet  TYPE  erzet ,       lv_erdat  TYPE  erdat ,       lv_vbtyp  TYPE  vbtyp ,       lv_ernam  TYPE  ernam . PARAMETERS :  p_vbeln  TYPE  vbeln . PARAMETERS :  p_r1  TYPE  c  RADIOBUTTON  GROUP  g1 ,             p_r2  TYPE  c  RADIOBUTTON  GROUP  g1 . CLASS   cl_abstract  DEFINITION   ABSTRACT .    PUBLIC  SECTION .      METHODS  display  ABSTRACT        IMPORTING  pvbeln  TYPE  vbeln        EXPORTING  perzet...

Local class with example using Static method with parameters.

Image
  1. Goto  SE38 . 2. Give  program name  and click on  create . 3. Give  title  and   select type as  executable program  and click   on save . 4. Write  code.        REPORT  zab_rp_local_class1 .      DATA :  lv_matkl  TYPE  matkl ,           lv_mtart  TYPE  mtart ,           lv_mbrsh  TYPE  mbrsh ,           lv_meins  TYPE  meins .      PARAMETERS :  p_matnr  TYPE  matnr .      CLASS   class1  DEFINITION .        PUBLIC  SECTION .          CLASS-METHODS  display  IMPORTING   pmatnr  TYPE  matnr             ...

Local class with example using Instance method with parameters.

Image
  1. Goto  SE38 . 2. Give  program name  and click on  create . 3. Give  title  and select type as executable program  and click   on save . 4. Write code.        REPORT  zab_rp_local_class .      DATA :  lv_matkl  TYPE  matkl ,           lv_mtart  TYPE  mtart ,           lv_mbrsh  TYPE  mbrsh ,           lv_meins  TYPE  meins .      PARAMETERS :  p_matnr  TYPE  matnr .      CLASS   class1  DEFINITION .        PUBLIC  SECTION .          METHODS  display  IMPORTING   pmatnr  TYPE  matnr                 ...