Mittentes in ABAP Programma

ORDO a1 DEFINITION.
 SECTIO PVBLICA.
 DATA: NUM1S EXEMPLUM I. VALORI C .
 METHODS:m1.
 ENDCLASS.
 ORDO a1 IMPLEMENTATION.
 VIA m1.
 Scribe: 'a1:', num1.
 ENDMETHOD.
 ENDCLASS.
 ORDO b1 DEFINITIONE HEREDITATIS EX a1.
 SECTIO PVBLICA.
 METHODS: m2, m1 REFINITION.
 ENDCLASS.
 ORDO b1 IMPLEMENTATION.
 VIA m1.
 num1 = num1 .
 Scribe: 'b1:', num1.
 ENDMETHOD.
 VIA m2.
 Scribe: 'M2 in genere b1'.
 ENDMETHOD.
 ENDCLASS.
 PRIMORDIUM.
 DATA: a TYPE REF TO a1.
 DATA: b TYPE REF TO b1.
 *data: c type REF TO c1.
 ************************************************** b.
 a = b.  "VOCATIO EXCITATIO RATIO a->m1().
 * call METHOD a->m2( ).  "Non possumus accedere ad methodos proprias sub classe super genere ref utentes.
 NOVAE-LINE.
 b ?= a.  " DEJECTIONEM CALL RATIONE B->m1 ( ).
 NOVAE-LINE.
 RATIO b->m2( ).
 ************************************************** *************** " error nullus ref create OBJECTUM a.
 b ?= a.  "Dejiciens adhuc dat TUBER METHOD B->m1( ) .
 ************************************************** *************** OBJECTUM CREO a.
 TEMPTATIO.
 b ?= a.  "ur conatus a 'NULL' objectum referat dump CAPH cx_sy_move_cast_errorem.
 RATIO b->m1( ).
 ENDTRY.
 ************************************************** *************** OBJECTUM CREO a.
 b.
 TEMPTATIO.
 b ?= a.
 RAPTO cx_sy_move_cast_error.
 RATIO b->m1( ).
 appellant RATIONE B-> m2 ().
 ENDTRY.
 ORDO lcl_shape DEFINITION.
 SECTIO PVBLICA.
 DE MODIS TRAHENDIS.
 ENDCLASS.
 ORDO lcl_circulus DEFINITIONIS HEREDITATIS EX lcl_shape.
 SECTIO PVBLICA.
 MODIS: TRAHERE REFINITIONEM, calc_aream.
 ENDCLASS.
 ORDO lcl_SHAPE EXTINCTIO.
 VIA trahunt.
 Scribe :/' Ducens quamlibet figuram.
 ENDMETHOD.
 ENDCLASS.
 ORDO lcl_circle IMPLEMENTATION.
 VIA trahunt.
 SCRIB :/ Tractus figurae specificae: Circulus.
 ENDMETHOD.
 VIA calc_area.
 Scribe :/' Area Of Crcle = 2iiR'.
 ENDMETHOD.
 ENDCLASS.
 PRIMORDIUM.
 DATA : o_cir TYPE REF TO lcl_circulus.
 OBJECTUM CREARE o_cir.
 NOMINA RATIONE o_cir->trahe( ).  " vocat genus Trahe ( ) methodum CALL METHOD o_cir->calc_area( ) .
 ULINE.
 "--------- Angusta cast(upcast)---------------" DATA : o_shp TYPE REF TO lcl_shape.
 o_shp = o_cir.  " Angusta jacta (Upcast) VOCA RATIONE o_shp->draw( ).  " vocat modum sub class Trahe ( ) methodum " vocant METHOD o_shp->calc_aream( ) .  "Compilation error ULINE.
 "---------- Dilatatio Cast (Downcast) -----------" DATA : o_cir1 TYPE REF TO lcl_circulo.
 « o_cir1 = o_shp.  " complilatio error o_cir1 ?= o_shp.  " Dilatatio Cast (Downcast) VOCA RATIONE o_cir1->trahe( ) .  " vocat genus Trahe ( ) methodum CALL METHOD o_cir1->calc_area( ) .
 ORDO a1 DEFINITION.
 SECTIO PVBLICA.
 DATA: NUM1S EXEMPLUM I. VALORI C .
 METHODS:m1.
 ENDCLASS.
 ORDO a1 IMPLEMENTATION.
 VIA m1.
 Scribe: 'a1:', num1.
 ENDMETHOD.
 ENDCLASS.
 ORDO b1 DEFINITIONE HEREDITATIS EX a1.
 SECTIO PVBLICA.
 METHODS: m2, m1 REFINITION.
 ENDCLASS.
 ORDO b1 IMPLEMENTATION.
 VIA m1.
 num1 = num1 .
 Scribe: 'b1:', num1.
 ENDMETHOD.
 VIA m2.
 Scribe: 'M2 in genere b1'.
 ENDMETHOD.
 ENDCLASS.
 PRIMORDIUM.
 DATA: PARENTES TYPE REF TO a1.
 DATA: puer TYPE REF TO b1.
 *data: c type REF TO c1.
 ************************************************** ************** OBJECTUM PUER CREARE.
 parens = puer.  "VOCATIO EREPTIONIS RATIO PARENT->m1( ) .
 VOCA RATIONE PUBLICA->m1( ) .
 VOCA RATIONE PUBLICA->m2( ) .
 * call METHOD a->m2( ).  "Non possumus accedere ad methodos proprias sub classe super genere ref utentes.
 NOVAE-LINE.
 puer ?= parens.  "VOCATIO DE MODO prolis-> m1 ( ).
 NOVAE-LINE.
 VOCA RATIONE PUBLICA->m2( ) .
 ************************************************** **************** *" error nullus ref creo OBJECTUM a.
 *b ?= a.  "Dejiciens stillam dans dump* call METHOD b->m1( ).
 ************************************************** **************** * OBJECTUM CREO, a.
 TEMPTATIO.
 b ?= a.  "ur conatus a 'NULL' objectum referat dump CAPH cx_sy_move_cast_errorem.
 RATIO b->m1( ).
 ENDTRY.
 ************************************************** **************** * OBJECTUM CREO, a.
 b.
 TEMPTATIO.
 b ?= a.
 RAPTO cx_sy_move_cast_error.
 RATIO b->m1( ).
 appellant RATIONE B-> m2 ().
 ENDTRY.
 ************************************************************
 TYPES: INCIPIT ty_data, auth TYPE c, FINIS ty_datae.
 DATA: ls_user TYPE ty_data, ls_user2 TYPE ty_data, lt_user2 TYPE TABLE OF ty_data, lt_user TYPE TABLE OF ty_data.
 lv_string = 'a,b,c,a'.
 lv_string2 = 'd,b,c,a'.
 SCISSUS lv_string AT ',' IN lt_usorem INDEX.
 SCISSUS lv_string2 AT ',' IN lt_user2 INDEX.
 MACULA AT lt_user2 assignans agri symboli ( ).
 INSERT IN INDEX lt_user.
 ENDLOOP.
 SORT lt_user BY auth.
 DELETE DUPLICATA ADJACENTIUM EX lt_usore COMPARATIO auth.
 SI sy-subrc=0.
 MACULA AT lt_user assignans agri-SYMBOL. ).
 SI lv_string_final IS PRIMI.
 lv_string_final = -auth.
 ALIUS.
 CONCATENATE lv_string_final -auth IN lv_string_final separatum ','.
 ENDIF.
 ENDLOOP.
 ENDIF.

 

Leave a comment

Et hoc site utitur ad redigendum Akismet spamma annotatum est. Disce quomodo data est processionaliter vestri comment.