SAP Tutorials Blog

 

 


REPORT  YSAP_OOABAP_READ_ONLY.



class class1 definition.

  PUBLIC SECTION.

  data: pernr type pa0002-pernr READ-ONLY.

  methods: constructor importing p_pernr type i.

  endclass.


  class class1 implementation.

    method constructor.

      me->pernr = p_pernr.

      endmethod.

      endclass.


START-OF-SELECTION.

  DATA: test TYPE REF TO class1.

  CREATE OBJECT test

    EXPORTING

      p_pernr = 10.

  WRITE: 'pernr:', test->pernr. 


Serkan AKKAVAK

Computer Engineer BSc

SAP Department Manager

Contact : serkurumsal@yandex.com