Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Reg:Create object as well as appending with data : x type table of ref to y

Hi

I have coded like this to create an object based on the class definition.

data : instantiation_1 type ref to counter,
       instantiation_2 type ref to counter,
       instantiation_3 type ref to counter,
       instantiation_tab type table of ref to counter.

 create object : instantiation_1,
                       instantiation_2,
                      instantiation_3.

 append : instantiation_1 to instantiation_tab,
              instantiation_2 to instantiation_tab,
              instantiation_3 to instantiation_tab.
 

And when i see it in the debugger i am getting the values like this under instantiation tab

{O:3*\PROGRAM=YHPAP004_TEST\CLASS=COUNTER}
{O:5*\PROGRAM=YHPAP004_TEST\CLASS=COUNTER}
{O:6*\PROGRAM=YHPAP004_TEST\CLASS=COUNTER}

Can any one please explain me how to understand over the above values??

Thanks

Former Member
Former Member replied

Hello Arun

The most important thing about your observation is that you can individual instances of the same program object (here: your class) within the same application. This is not possible with e.g. function groups. Or to put it into other words: You can have only a single "instance" of a function group (and its modules) within the same application.

Regards

Uwe

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question