on 06-04-2009 7:09 AM
Hi,
I have declared an attribute as reference to a class in component controller and i had made use of it to call methods (which inturn calls function modules) within the class. The class is activated successfully. When i syntax check the code, it says 'Field <attribute> is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement'.
I tried making it 'Public' and still resulted in same error. I tried to call the method with syntax 'WD_COMP_CONTROLLER -> <attribute> -> <methodname>'. Still i result in same kind of error. I am not sure on how to solve this error. Earlier posts in this forum doesnot give me a clear picture on how to solve this error. Can someone please help me to solve this error ?
Thanks,
Gaurav.
Edited by: Gaurav Subramaniam on Jun 4, 2009 8:09 AM
Hi Again,
Here is a way to access the ref variables of WD_COMP_CONTROLLER
att_ref X(mark as public) type ref to TEST_CLASS.
* Now in View, have one local var declared of similar type and get the comp_contr inst
lc_view_attr_ref type ref to TEST_CLASS
lc_view_attr_ref = wd_comp_controller->att_ref.
* now using this lc_view_attr_ref, you can access class methods
Regards,
Manne.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav,
Even i donot have idea on how to access ref variables for WD_COMP_CONTOLLER from view but what can be done as an alternative is below.
Declare attribute a referance(as you said and this will not given any syntax issue) and have two methods in COMP_CONTROLLER which will SET/GET the referance value.
Using these custom defined methods you can get the WD_COMP_CONTROLLER ref attribute to a local value and using this loca value you can call the class methods.
I know this is indirect way but it might be helpful.
Best Regards,
Manne.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have you given that attribute as TYPE REF TO as it is refering to your Zclass. Is that right.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.