Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

error in smartform using classes

Former Member
0 Likes
469

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

2 REPLIES 2
Read only

Swetabh
Explorer
0 Likes
406

Please clarify more.

Read only

Former Member
0 Likes
406

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