Application Development 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: 

How to create a new object for a particular class?

Former Member
0 Kudos
86

Hi,

Can anybody please tell the steps for creating a new object for a particular class.

Thanks,

Sreeja

1 ACCEPTED SOLUTION

Former Member
0 Kudos
38

Declare the object as TYPE REF TO the class and use the CREATE OBJECT statement to create an object.

DATA <obj_name> TYPE REF TO <class_name>.

CREATE OBJECT <obj_name>.

Please mark points if the solution was useful.

Regards,

Manoj

4 REPLIES 4

Former Member
0 Kudos
39

Declare the object as TYPE REF TO the class and use the CREATE OBJECT statement to create an object.

DATA <obj_name> TYPE REF TO <class_name>.

CREATE OBJECT <obj_name>.

Please mark points if the solution was useful.

Regards,

Manoj

Former Member
0 Kudos
38

Hi,

Just have a look at this below link

http://www.geocities.com/rmtiwari/Resources/Training/BusinessWorkflow/BusinessObjects_files/frame.ht...

<b>REWARD POINTS IF USEFUL</b>

Former Member
0 Kudos
38

1) Declare object as TYPE REF TO the class.

2) Use CREATE OBJECT to create an object.

example....

DATA v_obj TYPE REF TO c_class.

CREATE OBJECT v_obj.

Reward Points...

Vijay
Active Contributor
0 Kudos
38

hi

<b>SYNTAX </b>

data: <OBJECT NAME> type ref to <CLASS NAME>.

<b>EXAMPLE</b>

data: obj type ref to cx_root.

REGARDS

VIJAY

<b>PLZ REWARD POINTS IF USEFUL</b>