‎2007 Dec 13 3:03 AM
Hi ,
I am trying create refernce object for a class in porgram lines of smartform.
it is giving error.
the code is
lo_act_rec type ref to cl_hrrcf_abstract_activity_rec.
lo_act type ref to cl_hrrcf_abstract_activity.
lo_act_rec ?= gs_activity-activity.
lo_act ?= lo_act_rec->infotype_records.
plz help me
‎2007 Dec 13 7:52 AM
‎2007 Dec 14 7:17 AM
Hi,
You have not yet instantiated the references you have declared before assignign values to them.
I would suggest you to use the following 2 statements to instantiate them:
CREATE OBJECT lo_act_rec.
CREATE OBJECT lo_act.
Or if you have any specific constructor methods within the corresponding classes, use them first before assigning values like this.
Very often you might have methods to create objects from a particular structure, etc... Please check for this in the class you are using.
Hope this helps.
Regards,
Archana