Skip to Content
author's profile photo Former Member
Former Member

How to consume SAP Data Provider OCX in .Net

Hi Colleagues,

We are trying to integrated Viewer (Non-SAP GUI environment based tool) in SAP GUI using SAP GUI Control frame work.

While integration we get to know that SAP GUI control framework have limitation with character size(255 bytes).

To resolve this issue we are trying to use SAP Data Provider ocx to exchange information as a binary data.

I am completely new in this topic. So, I am not able to find place from where I can start.

Can you please guide me, How can I start?

Thanks and Regards,

Utkarsh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 01, 2012 at 01:07 PM

    Several possibilities. See program SAPRDEMO_ACTIVEX_INTEGRATION as an example.

    Key bits of code shown below.

    DATA: control TYPE REF TO i_oi_container_control,
    ocx_document TYPE REF TO i_oi_document_proxy,
    has_activex TYPE flag,
    retcode TYPE soi_ret_string,
    doc_handle TYPE cntl_handle,
    document_type TYPE soi_document_type VALUE 'SAPActiveXDoc.Example1'.

    "Test whether activeX is supported"
    CALL FUNCTION 'GUI_HAS_ACTIVEX'
    IMPORTING return = has_activex.
    CHECK NOT has_activex IS INITIAL.

    CALL METHOD control->init_control
    EXPORTING r3_application_name = 'R/3 Basis'
    inplace_enabled = 'X'
    register_on_close_event = 'X'
    register_on_custom_event = 'X'
    parent = cl_gui_container=>default_screen
    IMPORTING retcode = retcode.

    CALL METHOD control->get_document_proxy
    EXPORTING document_type = document_type
    IMPORTING document_proxy = oxc_document
    retcode = retcode.

    CALL METHOD oxc_document->open_activex_document
    IMPORTING retcode = retcode.

    CALL METHOD ocx_document->get_document_handle
    IMPORTING handle = doc_handle
    retcode = retcode.

    CALL FUNCTION 'CONTROL_CALL_METHOD'
    EXPORTING h_control = doc_handle
    method = 'MyMethod'
    p_count = 0.

    CALL METHOD ocx_document->clsoe_activex_document
    IMPORTING retcode = retcode.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.