CL_DOCUMENT_HISTORY_DV - Document Viewer

Vendor Master (General Section)   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Functionality

Class ( control) for displaying documents.

This class enables any number of documents stored externally to be displayed in application-specific GUI containers.

Methods that can be called from the calling applications:

ADD_NEW_DOCUMENTS: Adds further documents for display to the history

DISPLAY: Displays documents from the history

CLOSE_WINDOW: Closes the selected document in the history and in the display.

Methods that should not be called from the calling applications:

GET_MARKED_DOCUMENT: Function to search for a selected document. This function is required to show the document display in a separate viewer (see class CL_DOCUMENT_VIEWER).

Details of Methods

Method CONSTRUCTOR

Creates an object in class CL_DOCUMENT_HISTORY. When the object is created, documents to be displayedare transferred directly to the object in the parameter DOCUMENTS. Furthermore, in parameter VIEWERMODE you can specify which functions (in the toolbar) are activated for the user.

Parameter DOCUMENTS

Documents are transferred in table form from the structure TOADI:

,,TOADI-ADID: Document identification

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

,,TOADI-DTI: Document type

,,TOADI-DCL: Document class

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

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

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

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

Fields TOADI-ADID, TOADI-AID and either TOADI-DTI or TOADI-DCL are mandatory. All other values are optional.

TOADI-OTI and TOADI-OID can be defined to activate generic object services in the document display (see also parameter VIEWERMODE).

TOADI-WID and TOADI-WTI are important only for displaying documents in a separate viewer and are not important for using as a control integrated in the application.

Parameter VIEWERMODE

This parameter is used to specify which toolbar functions are provided. You can access the parameter values using type group ALNK. The following values are available:

ALNK_DISPLAY_VIEWERMODE: All document functions including generic object services are available to the user (provided TOADI-OTI and TOADI-OID are set).

ALNK_DISPLAY_PLUGINMODE: The generic object services are not available to the user. Neither are theselect and close functions available. This is the default value of the parameter. All applications thatinclude control CL_DOCUMENT_HISTORY in their own user interface but have already published their object in the interface in question should work with this default value.

ALNK_DISPLAY_PLUGINGOSMODE: This value is the same as ALNK_DISPLAY_PLUGINMODE, but the generic object services are available.

ALNK_DISPLAY_NOBUTTONS: Neither the generic object services nor other buttons are available in the control. This mode should only be used in exceptional cases, as the user cannot use any document functions.

Method ADD_NEW_DOCUMENTS

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

Parameter NEW_DOCUMENTS

See description of parameter DOCUMENTS in the constructor method. If documents already known to the object are transferred in NEW_DOCUMENTS, these news entries are ignored.

Method DISPLAY

Displays the current documents in container PARENT, which is transferred from the application. If severaldocuments have been communicated to the object (using the constructor or method ADD_NEW_DOCUMENTS), the document transferred first is displayed.

Parameter PARENT

GUI container, in which the documents are displayed.

Method CLOSE_WINDOW

Closes the document specified by the set parameters WINDOW_ID, CONTREP_ID, DOCUMENT_ID, and DOCUMENT_CLASS.This method typically is not required by application developers who integrate class CL_DOCUMENT_HISTORY as a control into their own application.

Parameters

WINDOW_ID, CONTREP_ID, DOCUMENT_ID, and DOCUMENT_CLASS define a unique document. The following relationship based on the DOCUMENTS structure applies (see 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 links existing to documents from a given business object and displays these documents.

Notes

Further information



General Material Data   CPI1466 during Backup  
This documentation is copyright by SAP AG.


Length: 4853 Date: 20120526 Time: 140647     triton ( 187 ms )