The drop-in replacement has been developed to enable the SAP Desktop Office Integration (DOI) to run on more platforms and operating systems. The SAP Desktop Office Integration is a solution for application developers to integrate Office products like Microsoft Excel and Microsoft Word in their SAP GUI applications. This technology was developed in the 90s and is still heavily used by a lot of applications and customers. It is for example widely used to import and export data from and into an SAP system.
Until now the SAP Desktop Office Integration worked only on Microsoft Windows in combination with SAP GUI for Windows, because it relies on the OLE2 application interface which is only available to native applications like SAP GUI for Windows. With the shift to web applications and other operating systems like Apple macOS this has become an issue for customers who are using SAP GUI applications with SAP GUI for Java or SAP GUI for HTML.
If a customer tries to execute a program which is using the SAP Desktop Office Integration in SAP GUI for HTML or SAP GUI for Java, the program will terminate with the following exception:
Category: ABAP programming error Runtime Errors: RAISE_EXCEPTION Short Text: Exception condition "JAVABEANNOTSUPPORTED" raised.
A drop-in replacement is a component which can replace another component without any other code or configuration changes. The drop-in replacement for the SAP Desktop Office Integration keeps on using the same interfaces as the current solution, but enables applications to also run in the web browser in SAP GUI for HTML or SAP GUI for Java. The goal is to keep the migration effort as low as possible and in most cases it's a one-line code-change. The first version of the drop-in replacement for the SAP Desktop Office Integration will support the import and export scenario of data using Microsoft Excel.
Overview of the Drop-In Replacement of the SAP Desktop Office Integration
With the original implementation you have to get the container control from the class C_OI_CONTAINER_CONTROL_CREATOR and call the method get_container_control( ) which returns the container control object implementing the interface I_OI_CONTAINER_CONTROL. Using the container control object you've been able to get an instance of the document proxy through the method get_document_proxy( ) and on the document proxy instance you've been able to get an instance of the spreadsheet interface by calling the method get_spreadsheet_interface( ).
The code needed to set data in a sheet would look like the following:
c_oi_container_control_creator=>get_container_control( IMPORTING control = DATA(container_control) ). ... container_control->get_document_proxy( EXPORTING document_type = 'Excel.Sheet' IMPORTING document_proxy = DATA(document_proxy) ). ... document_proxy->get_spreadsheet_interface( IMPORTING sheet_interface = DATA(spreadsheet) ). ... spreadsheet->set_ranges_data( ... ).
To switch to the drop-in replacement for SAP Desktop Office Integration, you just have to change the initial call to obtain the container control. Instead of obtaining the container control from the class C_OI_CONTAINER_CONTROL_CREATOR, the container control will then be retrieved from the class CL_SOVY_CONTAINER_CONTROL. The subsequent calls or application logic do not need to be changed.
To enable the in-memory office integration to work properly, an integration mode needs to be provided. This is necessary, because the drop-in replacement needs to now know how it is intended to be used. Previously this was not needed because the Office application was opened at the beginning of the process. Because this is no longer possible in a web application or with SAP GUI for Java, we needed to introduce an integration mode. Of all the possible use cases, we currently support the following integration modes:
You need to get rid of the following line of code:
c_oi_container_control_creator=>get_container_control( ... ).
and replace it with the following line:
cl_sovy_container_control=>get_container_control( EXPORTING office_integration_mode = cl_sovy_container_control=>soi_mode_export IMPORTING control = DATA(container_control) ).
For the export use case, it is now mandatory to call one of the following methods to finalize the data export:
This is a signal for the drop-in replacement that the file creation has been finished and can now be saved.
An example of the export use-case can be found in the package SOVY_IMP. The report TEST_SOVY_SHEET_EXPORT demonstrates how you can export data from an SAP system into an Excel Sheet.
You need to get rid of the following line of code:
c_oi_container_control_creator=>get_container_control( ... ).
and replace it with the following line:
cl_sovy_container_control=>get_container_control( EXPORTING office_integration_mode = cl_sovy_container_control=>soi_mode_import IMPORTING control = DATA(container_control) ).
All subsequent calls do not need to be modified. By default, the SAP GUI Desktop Office Integration will be used in SAP GUI for Windows. Therefore you don't risk anything but gain support for all other use-cases.
An example of the import use-case can be found in the package SOVY_IMP. The report TEST_SOVY_SHEET_IMPORT demonstrates how you can import data from an Excel sheet into an SAP System.
Configuration Options
The method cl_sovy_container_control=>get_container_control( ) can be configured by passing the optional parameter structure config. The following configuration options are possible:
Google and SAP partnered to allow customers to connect core SAP software designed for running all mission-critical processes in the cloud with the collaborative capabilities of Google Docs and Google Sheets. This innovates how work gets done across the enterprise. As part of this partnership the SAP Desktop Office Integration drop-in replacement also supports exporting sheets directly from SAP to Google Sheets. To learn more about what has been achieved as part of this partnership, please read the following blog post:
https://blogs.sap.com/2022/08/21/saps-ui-technologies-enabling-google-workspace/
While the drop-in replacement for the SAP Desktop Office Integration will be able to support a majority of all the relevant use-cases it has the following limitations:
The drop-in replacement for SAP Desktop Office Integration might not always be the right solution. Here are some alternatives:
Because a lot of customers have implemented the SAP Desktop Office Integration in custom programs and reports we are not aware of a lot of scenarios. Initially we've built support for the pure import and export use cases for which we have received a lot of bug reports. If your scenarios are not covered by the current implementation we would be interested to hear about them to be able to improve our solution. Please use the comment section to tell us about your requirements or get in touch to us by mail.
The drop-in replacement for the SAP Desktop Office Integration has been delivered already and is used by customers. Here is a list of known bugs and their fixes and the corresponding SAP notes:
The drop-in replacement for the SAP Desktop Office Integration will be available with SAP S/4HANA Cloud, public edition 2302 (SAP_BASIS release 7.93 or newer), SAP S/4HANA Cloud, private edition 2023 and SAP S/4HANA 2023 (SAP_BASIS release 7.58 or newer).
We're also providing a downport of the import functionality via a correction instruction for older releases like SAP S/4HANA 2020 or newer for the SAP_BASIS releases 7.55, 7.56 and 7.57.
More information regarding the downport of the import functionality can be found in SAP Note 3386113
This down-port of the import functionality will also be delivered with the following service packs:
The function module TEXT_CONVERT_XLS_TO_SAP which is using the SAP Desktop Office Integration has already adapted their code and is now also using the drop-in replacement.
The SAP Note 3443177 offers a down-port for the Excel import functionality to S4CORE 105 - S/4HANA 2020 or newer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
29 | |
13 | |
13 | |
10 | |
9 | |
9 | |
8 | |
8 | |
7 | |
7 |