i learn about oo abap and i want to ask about ME ,
what does me->category is initial. commend is doing?
method DISPLAY . data: ls_vt001w type v_t001w. if me->category is initial. CLEAR ls_vT001W. ls_VT001W-MANDT = SY-MANDT. ls_VT001W-WERKS = me->PLANT. CALL FUNCTION 'VIEW_MAINTENANCE_SINGLE_ENTRY' EXPORTING ACTION = 'SHOW' VIEW_NAME = 'V_T001W' CHANGING ENTRY = ls_vT001W. else. SET PARAMETER ID 'WRK' FIELD me->PLANT. CALL TRANSACTION 'WB03' AND SKIP FIRST SCREEN. endif. endmethod.
Uwe Schieferstein replied
Me is the instance itself meaning you are "within the instance.
Therefore you could simply code:
IF ( category IS INITIAL ). " category = instance attribute ... ENDIF.
However, for better readability I prefer to use the ME-> style.