Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

OO-me qustion

Hi,

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.

Regards

Tags:
replied

Hello

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.

Regards

Uwe

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question