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

constructors

Former Member
0 Likes
452

i have created a class which has a constructor which imports the value of a and b.

for this particular class iam creating an object obj1 by exporting the values for a and b to the constructor.

then iam creating an object called obj1 and obj2 without passing any parameters. because these objects should not execute that constructor rather it should call all the other methods.

for this program it shows an error message saying " the obligatory parameter A has no value assigned to it" at the lace where iam using create object obj2 and obj3.

can anyone help me what has to be done to resolve this.

thanks,

Phyrose.

2 REPLIES 2
Read only

Former Member
0 Likes
425

I guess there is no default constructor in ABAP !!

So you'll have to use that which you created.

I am not sure whether you can do constructor overriding !

Regards

Nishant

Read only

Former Member
0 Likes
425

Hi,

In the import parameters give values to the particular constructor.

Regards

Srinu