CL_DOCUMENT_HISTORY - Document Viewer

ABAP Short Reference   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Functionality

Class (control) for displaying documents.

Enables display of any externally stored documents in application-specific GUI containers.

Methods that can be called by applications:

ADD_NEW_DOCUMENTS: Adds additional documents for display to the History

DISPLAY: Displays documents from the History

CLOSE_WINDOW: Closes a selected document in the History and in the display.

Methods that can be called by applications:

GET_MARKED_DOCUMENT: Function for requesting a selected document. This function is required for realizing document display in a separate viewer (see class CL_DOCUMENT_VIEWER).

Individual Methods

Method CONSTRUCTOR

- Generates an object of the class CL_DOCUMENT_HISTORY. When the object is generated, documents fordisplay are transferred directly to the object in the parameter DOCUMENTS. In the parameter VIEWERMODE, you can also specify which functions (toolbars) are active for the user.

Parameter DOCUMENTS

The documents are transferred as a table with the structure TOADI:

,,TOADI-ADID: Document ID

,,TOADI-AID: ID of the repository in which the documents are stored

,,TOADI-DTI: Document type of document

,,TOADI-DCL: Document class of document

,,TOADI-OTI: Object type of object to which the document is linked

,,TOADI-OID: ID of the object to which the document is linked

,,TOADI-WID: Window ID of the window in which the document is to be displayed

,,TOADI-WTI: Window title of the window in which the document is to be displayed

The fields TOADI-ADID, TOADI-AID, and either TOADI-DTI or TOADI-DCL are obligatory. All other values do not have to be entered.

TOADI-OTI and TOADI-OID can be transferred to activate the Generic Object Services in the document display (see also parameter VIEWERMODE).

TOADI-WID and TOADI-WTI are only used when displaying documents in your own viewer, and have no effect when using the application-integrated Control.

Parameter VIEWERMODE

You can use this parameter to specify which toolbar functions are available. You can use the type group ALNK to access the parameter values. The values are as follows:

ALNK_DISPLAY_VIEWERMODE: The user can use all document functions, including the Generic Object Services (if TOADI-OTI and TOADI-OID are transferred).

ALNK_DISPLAY_PLUGINMODE: The user cannot use the Generic Object Services, or the functions for selectingor closing a document. This is the default value of the parameter. This value should be used for allapplications that integrate the Control CL_DOCUMENT_HISTORY in their application interface, but which have already published their object in the actual relevant interface.

ALNK_DISPLAY_PLUGINGOSMODE: This is the same as ALNK_DISPLAY_PLUGINMODE, but the Generic Object Services are available.

ALNK_DISPLAY_NOBUTTONS: Neither the Generic Object Services nor any other buttons are available in control. You should only use this mode in exceptional cases, because it deprives the user of document-related functions.

Method ADD_NEW_DOCUMENTS

Transfers the documents for display to the generated object. The documents are transferred in the parameter NEW_DOCUMENTS.

Parameter NEW_DOCUMENTS

See the parameter description for the parameter DOCUMENTS in the constructor method. If documents transferred in NEW_DOCUMENTS are already included in the object, these entries are ignored.

Method DISPLAY

Displays the current document in the container PARENT, which is transferred by the application. If morethan one document is sent to the object (using the constructor or the method ADD_NEW_DOCUMENTS), the document that was transferred first is displayed.

Parameter PARENT

GUI container in which the documents are displayed.

Method CLOSE_WINDOW

Close the document specified by the transferred parameters WINDOW_ID, CONTREP_ID, DOCUMENT_ID, and DOCUMENT_CLASS.Application developers integrating the class CL_DOCUMENT_HISTORY as a control in their own application do not need this method.

Parameter

WINDOW_ID, CONTREP_ID, DOCUMENT_ID and DOCUMENT_CLASS uniquely define a document. The following relationship applies to the DOCUMENTS structure (see the parameter DOCUMENTS in the constructor):

WINDOW_ID = DOCUMENTS-WID

CONTREP_ID = DOCUMENTS-AID

DOCUMENT_ID = DOCUMENTS-ADID

DOCUMENT_CLASS = DOCUMENTS-DCL.

Relationships

Example

See the example program ARLINK_VIEWER_EXAMPLE, which determines the existing links from a business object to documents, and displays the documents.

Notes

Further information



ABAP Short Reference   General Material Data  
This documentation is copyright by SAP AG.


Length: 4836 Date: 20120526 Time: 140635     triton ( 214 ms )