‎2010 Aug 23 7:56 AM
Dear All,
I am creating document by using the interface.
I can see the document is getting created and opened, but immediately it is getting closed
I want this document to be open until i close. How can i suceed.
Here is my code below
CALL METHOD c_oi_container_control_creator=>get_container_control
IMPORTING
control = gi_cont_control.
* Initialiaze container control Mandatory
CALL METHOD gi_cont_control->init_control
EXPORTING
inplace_enabled = ' '
inplace_scroll_documents = 'X'
no_flush = 'X'
r3_application_name = 'TEST'
register_on_close_event = 'X'
register_on_custom_event = 'X'
parent = gcl_custom_container
name = 'TESTING'
autoalign = 'X'
EXCEPTIONS
javabeannotsupported = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Get the reference of the document proxy
CALL METHOD gi_cont_control->get_document_proxy
EXPORTING
document_type = 'Word.Document.8'
IMPORTING
document_proxy = gi_document
error = gi_error.
CREATE OBJECT gcl_event_doc.
SET HANDLER gcl_event_doc->on_close_doc FOR gi_document.
CALL METHOD gi_document->create_document.
Regards,
Lisa
‎2010 Aug 23 12:11 PM
Solved it by own.
Just call method in PAI this will solve the problem