‎2007 Apr 06 12:11 PM
Hi all,
does anybody know how to attached definition of class (containing only static methods and constants, so no instance will be created) to smartforms? Statement class ... definition load under section "Initialization" doesn't work (i cant use constants f.e. on condition tabs of text node) i get then always message: "Direct access to components of the global class ZCL_SE_CONST is not possible (CLASS ZCL_SE_CONST DEFINITION LOAD statement is mi" SAP 4.6C
Thank you.
Juzio
Message was edited by:
Juzio Kowlaski
‎2007 Apr 06 12:22 PM
Hi Juzio,
I don't know how you have declared the z class, but i am able to use the static attributes of standard class like CL_ABAP_CHAR_UTILITIES in the conditions.
I have used a global variable of the smartform to compare with the static attribute CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB directly in the conditions tab.
regards,
Ravi
‎2007 Apr 06 2:16 PM
H,
which version of sap do you use? it doesn't work on 4.6C. and i'd be gratefull if anybody could tell me if i can load my own (Z) class definition to smartform
Thank you
J
‎2012 Apr 03 5:24 AM
Hi,
In SAP 4.6C you need to use the statement 'CLASS ... DEFINITION LOAD' to access to class's static components.
Eg. :
Report ...
TYPE-POOLS abap.
CLASS cl_abap_objectdescr DEFINITION LOAD.
DATA: line TYPE c LENGTH 80,
...
RG,
Hung.