can I reuse the same aggregate ?

can I reuse the same aggregate ?

  
I use the same aggregate on many screens.  I tried to create a web block but I can not reuse inside the preparation. I have to copy and paste the aggregate even when I create web blocks to reuse code. What I can do ?  Can I create a store procedure in a personal environment ? Any other option ?  The idea is to maintain only one code.
Create an action that calls the aggregate.  Call that action in your preparation.  You can have input parameters if needed but you need an output parameter that is the result of the aggregate, typically a list of records.  From there you can do anything you want.

Hope this helps,
Curt
Curt,
  when I tried to do that I had to create a bunch of registers on each part of the system. That way I don't have a clear code to maintain. I was thinking to use something where I can access a pointer to use the aggregate as an object. Imagine a Singleton (design pattern) and the use in each part of the system.
Aggregates, like normal SQL, return lists of records.  There is no 'object' in your sense of the word.  It's tough to help more without knowing more about your application.  For example, I'm not sure what creating a bunch of registers (I'm not even sure what you mean by register in this context) has to do with the ability to reuse an aggregate.  Maybe its terminology that's getting things hung up.  How would you do this on in some other environment if you had a stored procedure that returned a list of records?  That's basically what the aggregate is doing.  Unless you have some very unusual use case this should be easy.  Maybe you can make a small eSpace and post it here and I can look at it and give better advice.

Curt
Solution
Curt I thought about you said and I tried to create a small eSpace. For my surprise the data type (which is a Record List - the idea of records I told you before) can be reused directly in the table records component. I was complicating a lot thinking only in the structures. Now it is fine.
Thanks so much
Solution