abap ole参数
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
abap ole参数
English Answer:
Object Linking and Embedding (OLE) is a technology that allows you to embed objects from one application into another. In ABAP, you can use the OLE container control to embed OLE objects into your ABAP programs.
To use the OLE container control, you must first create an instance of the control. You can do this using the CREATE OBJECT statement. The following code creates an instance of the OLE container control:
abap.
DATA lo_ole_container TYPE REF TO cl_gui_ole_container.
CREATE OBJECT lo_ole_container.
Once you have created an instance of the OLE container
control, you can use the methods of the control to embed OLE objects into your ABAP program. The following code embeds a Microsoft Word document into an ABAP program:
abap.
lo_ole_container-
>set_document('C:\path\to\document.doc').
You can also use the OLE container control to create new OLE objects. The following code creates a new Microsoft Excel workbook:
abap.
lo_ole_container->create_document('Excel.Application').
The OLE container control provides a wide range of methods that you can use to manipulate OLE objects. For more information, see the ABAP documentation for the OLE container control.
中文回答:
对象链接和嵌入 (OLE) 是一种技术,允许您将一个应用程序中的对象嵌入到另一个应用程序中。
在 ABAP 中,您可以使用 OLE 容器控件将 OLE 对象嵌入到您的 ABAP 程序中。
要使用 OLE 容器控件,您必须首先创建控件的一个实例。
您可以使用 CREATE OBJECT 语句来完成此操作。
以下代码创建了 OLE 容器控件的一个实例:
abap.
DATA lo_ole_container TYPE REF TO cl_gui_ole_container.
CREATE OBJECT lo_ole_container.
创建 OLE 容器控件的一个实例后,您可以使用控件的方法将OLE 对象嵌入到您的 ABAP 程序中。
以下代码将 Microsoft Word 文档嵌入到一个 ABAP 程序中:
abap.
lo_ole_container-
>set_document('C:\path\to\document.doc').
您还可以使用 OLE 容器控件创建新的 OLE 对象。
以下代码创建了一个新的 Microsoft Excel 工作簿:
abap.
lo_ole_container->create_document('Excel.Application').
OLE 容器控件提供了一系列您可以用于操作 OLE 对象的方法。
有关详细信息,请参阅 OLE 容器控件的 ABAP 文档。