Integration into an SAP Application

This section contains information about the options for integrating Records Management into an SAP application.

System-Controlled Execution of Activities in Records

You can specify that the system executes activities in records in the background.

For this purpose, SAP provides the Records API. You can use the Records API to execute almost all activities that are provided for the user in the Records Browser. For more information, see SAP Service Marketplace atservice.sap.com/recordsmanagement→ Media Center → Documentation → “Accessing the Records API” .

For remote access, SAP also provides a number of Business Application Programming Interfaces (BAPIs). The BAPIs act on the business object RECORD. To view the available BAPIs, use the BAPI Explorer (transaction BAPI). In this transaction, choose Basis → Basis Services, and open the business object RECORD. The following BAPIs exist:

BAPI_RECORD_CREATE: Create record

BAPI_RECORD_ADDELEMENT: Add an element to a record

BAPI_RECORD_ADDELEMENTS: Add multiple elements to a record

BAPI_RECORD_GETPROPERTIES: Determine properties of a record

BAPI_RECORD_CHANGEPROPERTIES: Change the attribute values of a record

BAPI_RECORD_DELETEELEMENTS: Delete multiple elements from a record

BAPI_RECORD_DELETE: Delete record

BAPI_RECORD_GETLIST: Find records

For more information on these BAPIs, see the online BAPI documentation.

System-Controlled Execution of Activities in Documents

You can specify that the system carries out activities in records in the background. To enable this background processing, SAP provides a range of BAPIs that can manipulate documents without user interaction. The BAPIs act on the business object RM_DOCUMENT. To view the available BAPIs, use the BAPI Explorer (transaction BAPI). In this transaction, choose Basis → Basis Services, and open the business object RM_DOCUMENT. The following BAPIs exist:

BAPI_SRM_DOC_CREATE: Create document

BAPI_SRM_DOC_DELETE: Delete document

BAPI_SRM_DOC_GETPROPERTIES: Determine document attributes

BAPI_SRM_DOC_CHANGEPROPERTIES: Set document attributes

BAPI_SRM_DOC_CHECKIN_CONT_TAB: Set document content and transfer tables with row length 255

BAPI_SRM_DOC_CHECKIN_CONT_TAB: Get document content and transfer tables with row length 255

BAPI_RECORD_GETLIST: Get a list of documents

BAPI_SRM_DOC_GET_VERSION_LIST: Get a list of versions for a document

BAPI_SRM_DOC_GET_COMP_INFO: Get file information (file ID, mime type, file size, and so on)

For more information on these BAPIs, see the online BAPI documentation.

Navigating From an Application to a Record

You can integrate a button into an application to enable the user to navigate directly to a record in the Records Browser. Users can go to an existing record, or create a new record.

Integration is carried out using by the business object RECORD. The integration is easily implemented and is sufficient for most application scenarios. You only have the options for manipulating a record that are offered in the methods of the business object RECORD. You can display the methods of the business object RECORD in the Business Object Repository Browser (transaction code SWO3). Choose Basis Components → Basis Services → Records Management . The methods contain the calls for the BAPIs named above, and also offer methods for displaying, changing, and searching for records.

Navigating From an Application to an Element

You can integrate a button into an application that enables the user to navigate directly to any element within Records Management. This integration requires more complicated implementation than the integration using the business object RECORD, but is not restricted to displaying records. You can navigate to the display of any element, and you can call all activities that are possible for the element. For this purpose, SAP provides the following function module:

SRM_START_FRAMEWORK_RFC

This function module starts the Records Management Framework using a concrete element instance. Calling the function module causes the system to switch to transaction ORGANIZER with an opened element. The module is RFC-compatible, but can also be called locally. You can call a model activity or an instance activity. A model activity is an activity for an unspecified element, for example, Search or Create . An instance activity is an activity for a specific element, for example: Display , Change , or Delete .



If you use the function module SRM_START_FRAMEWORK_RFC, and you have generated a root object (either explicitly or implicitly), the function module can only be called with the destination NONE, or called remotely so that a new internal session is created.

Integration of Records Management as a GUI Control

You can display a record or any other Records Management element in any application transaction as a control. Whereas calling the function module SRM_START_FRAMEWORK_RFC causes the system to switch screens, Records Management can be integrated into a screen of the application by using the control.

Records Management provides the classes CL_SRM_BASE_CONTROL and CL_SRM_STACKED_CONTROL for this.

For more information, see SAP Service Marketplace atservice.sap.com/recordsmanagement→ Media Library → Documentation → “Integrating Records Management as a GUI Control”