‎2010 Oct 01 6:25 PM
Hi All,
I need to access a varable in one of the method in ABAP stack
Event Type_____Event____________________________Program
METHOD______IF_EX_ME_GUI_PO_CUST~EXECUTE__ZCL_IM_PTP_PO_CUSTM_FLDS======CP --> I am here
METHOD______IF_EX_ME_GUI_PO_CUST~EXECUTE__CL_EX_ME_GUI_PO_CUST==========CP
METHOD______EXECUTE________________________SAPLMEGUI
METHOD______EXECUTE________________________CL_COMPOSITE_SCREEN_VIEW_MM===CP --> need to access here
I tried to access using the below code
DATA: LV type string.
FIELD-SYMBOLS: <FS> TYPE ANY.
LV = '(CL_COMPOSITE_SCREEN_VIEW_MM===CP)WA-VIEW'.
ASSIGN (LV) TO <FS>.But the field symbol is unassigned. Is there any other way to access the variable.
Regards,
Vipin
‎2010 Oct 04 7:58 AM
Hello,
I don't think you'll be able to access the class directly! This will impact the encapsulation design of OOPs, you'll be able to access the PRIVATE & PROTECTED attributes of that class!
You should try to access the Object Reference variable defined in the program. Suppose you've an obj. ref. variable defined like this:
DATA: OBJ_REF TYPE REF TO CL_SOMECLASS.You can try to access the variable OBJ_REF from the call stack:
FIELD-SYMBOLS: <OBJ> TYPE OBJECT.
ASSIGN ('OBJ_REF') TO <OBJ>.Hope i'm clear.
BR,
Suhas
‎2010 Oct 04 7:58 AM
Hello,
I don't think you'll be able to access the class directly! This will impact the encapsulation design of OOPs, you'll be able to access the PRIVATE & PROTECTED attributes of that class!
You should try to access the Object Reference variable defined in the program. Suppose you've an obj. ref. variable defined like this:
DATA: OBJ_REF TYPE REF TO CL_SOMECLASS.You can try to access the variable OBJ_REF from the call stack:
FIELD-SYMBOLS: <OBJ> TYPE OBJECT.
ASSIGN ('OBJ_REF') TO <OBJ>.Hope i'm clear.
BR,
Suhas