Share ProDataSet and temp-table definitions between procedures
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
As we have shown in these examples, it is a good idea
to put your definitions into include files so that they can be reused
in as many procedures as need them and maintained by editing the
one include file for a definition. It is also a good idea to separate
your temp-table definitions from your ProDataSet definitions. This
lets you reuse the temp-tables, for example, in multiple different
ProDataSets, as the ttItem illustration above shows.
It also lets you include ProDataSet definitions in places where
the temp-tables need to be defined separately, such as in the AppBuilder.
In summary, there is no single right granularity or complexity
for a business object or the ProDataSet that represents its data.
Design your ProDataSets so that they represent useful collections
of data, either single business documents or sets of data that are
normally handled together. Remember as you do this that the AVM
gives you a lot of flexibility in how you load and use the data in
a single ProDataSet. As you have seen in earlier examples, an Order ProDataSet
can contain a single Order with all its detail,
or it can be used to browse Order headers and filling
in the detail as you need it. Thus, you can make the scope of a
business object larger or smaller, depending on your needs.