03-13-2007 1:44 AM
Hello All,
I am getting the following error:
Class ZPOSITION_INFORMATION,Method EXTRACT_DATA
Field "ENDMETHOD" is unknown. It is neither in one of the specified
tables nor defined by a "DATA" statement. "DATA" statement.
Here is the code in the method EXTRACT_DATA
method EXTRACT_DATA .
data: emp_type type char50,
end_d type sy-datum,
loc type char04,
pers_sub type char04,
position_title type char40,
start_d type sy-datum .
select single empneededby from hrp9007 into start_date
where OBJID = POS_NUM .
write start_date .
write "hello world" .
endmethod.
Kind regards.
Srinivas
03-13-2007 1:58 AM
03-13-2007 1:58 AM
03-13-2007 2:04 AM
I must appreciate your patience Rich. Many thanks. But again one more error (sorry for that).
Class ZPOSITION_INFORMATION,Public Section
Implementation missing for method "CONSTRUCTOR". "CONSTRUCTOR".
How important is the constructor. Do I always need to put something in constructor. Or can I skip the constructor alltogether.
Kind Regards.
Srinivas
03-13-2007 2:22 AM
When I try to test/execute the class, I get the message:
"You are not authorized to execute this object".
I am able to activate the class though.
How can I test the class.
Regards.
Srinivas
03-13-2007 2:26 AM
Constructor is the method of a class which executes automatically when an object of that class is instantiated. You need not put any code withing construct, unless you require to initialize public/private data of the object or assign default values.
For your second question, a class as such is not executable, a class is just a template. The object is instantiated at runtime, so you first instantiate the object and call its methods. This is how you will execute a method. Though, static methods can be executed independent of object instantiation.
03-13-2007 2:32 AM
Hi Vishnu,
Thanks for your reply!
I have one more problem.
When I try to test/execute the class, I get the message:
"You are not authorized to execute this object".
I am able to activate the class though.
How can I test the class.
Kind Regards.
Srinivas