The concepts of the class CL_ITS_GENERATE_TEMPLATE are listed below:
The parts of the template to be generated are stored as templates themselves. For CL_ITS_GENERATE_HTML_MOBILE, you can find these templates in the ITS service ITSGENMOBILE in theme 99. These generator templates are integrated as suitable locations by calls of the method _GET_FROM_TEMPLATE.
The templates can contain parameters that are replaced by strings generated in the generator. The replacements are transferred in the parameter PI_REPLACEMENTS. The strings to be replaced start with GEN_. However, this is not compulsory for your own generators.
You can exchange individual templates by overwriting the method in which the method _GET_FROM_TEMPLATE is called. You can also set the default service and default theme in the constructor or at another location (definition in CL_ITS_GENERATE_HTML_MOBILE).
Header data and content are differentiated. Header elements are not required for subscreen dynpros. The content receives a frame that is simpler for subscreens that for "standard" screens.
Elements are sometimes nested inside one another (frames, elements of a loop). With the templates for mobile devices, this is reflected in the HTML structure (nested tables). To determine the elements of an area, you can use the method _GET_ELEMENTS. The contents of the table for an area are written by the method _CONTENT_RECURSIVE.