Show TOC

Function documentationThe Document Container

 

The HR Reporting reuse class CL_HRGRT_DOCUMENT_CONTAINER, aka the Document Container, is the singleton instance into which you place the output from your report. This output is then automatically fetched by the Document Display UIBB.

The singleton state is ensured because the constructor is a private method, so it cannot be called externally, but is called internally by method GET_INSTANCE

.At INITIALIZE in your feeder class, you call the super class INITIALIZE method which calls the GET_INSTANCE method of the Document Container. The attribute GO_INSTANCE on this class is a reference to the class itself, so the method GET_INSTANCE checks if the reference is bound, and only creates the instance if the reference is still initial.

Activities

Since the Document Display UIBB HRGRT_FC_DOCUMENT_DISPLAY fetches the data from the Document Container, there are only two steps for you to carry out in your feeder class:

  1. At INITIALIZE, ensure the class is instantiated. If you have not redefined this method, this is done for you already in the super method. If you must redefine for other reasons, all you need do is call the super method, also see Get the Global Data (Method INITIALIZE).

  2. At GET_DATA, move the output from your reporting scenario to the Document Container using its method SET_DOCUMENT.

    Note Note

    See the class constants in GC_DOC_TYPE to know what to use when filling the method parameter IV_CONTENT_TYPE. The method needs to know whether it is a PDF, spreadsheet and so on.

    End of the note.

    Caution Caution

    Currently the only document types supported are PDF and Office types.

    End of the caution.