Example of Dynamic Service
Provider
Apart from the service providers whose elements come from a repository, there are service providers that generate their elements dynamically at runtime. In this way, current information can be displayed in a simple manner in the record.
The implementation of a dynamic service provider requires little effort and is of great benefit. SAP does not deliver dynamic service providers, but does provide an example implementation.
The dynamic service provider for resubmission entries allows the user to determine in an opened record which other person(s) have set this record for resubmission.
The service provider has only one element: the list of persons who have set the current record for resubmission. This list is always read again at runtime. Since there is only one element, it makes sense to include it as an instance node in the record model. In the record structure, the user then sees a node called Resubmission Entries. For this node there is only one activity: Display. If the user chooses this activity, the list is displayed. At that moment in time, the list is read, and is always up-to-date.
The classes of the service provider for resubmission entries are CL_SRM_RESUB_BACKEND and CL_SRM_RESUB_CLIENT, and can be studied as an example implementation.