* Selection screen example
SELECTION-SCREEN:
SKIP 1.
PARAMETERS: sel_wbs LIKE prps-posid OBLIGATORY MEMORY ID pro.
* Set the screen that has the container with the name 'CONTAINER'
SET SCREEN 100.
TYPE-POOLS: soi.
CLASS c_oi_errors DEFINITION LOAD.
CLASS cl_gui_cfw DEFINITION LOAD.
DATA: item_url(256).
DATA: ok_code LIKE sy-ucomm,
save_ok LIKE sy-ucomm.
DATA: control TYPE REF TO i_oi_container_control.
DATA: container TYPE REF TO cl_gui_custom_container.
DATA: link_server_decl TYPE REF TO i_oi_link_server.
DATA: retcode TYPE soi_ret_string,
document_type TYPE soi_document_type
VALUE soi_doctype_excel97_sheet.
DATA: proxy TYPE REF TO i_oi_document_proxy.
DATA: bds_instance TYPE REF TO cl_bds_document_set,
doc_uris TYPE sbdst_uri,
wa_doc_uris LIKE LINE OF doc_uris,
doc_components TYPE sbdst_components,
doc_signature TYPE sbdst_signature,
wa_doc_signature LIKE LINE OF doc_signature.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'MAIN0100'.
SET TITLEBAR '001'.
retcode = c_oi_errors=>ret_ok.
IF control IS INITIAL.
DATA: b_has_activex.
CALL FUNCTION 'GUI_HAS_ACTIVEX'
IMPORTING
return = b_has_activex.
IF b_has_activex IS INITIAL.
MESSAGE e000 WITH 'No Windows GUI'.
ENDIF.
CALL METHOD c_oi_container_control_creator=>get_container_control
IMPORTING control = control
retcode = retcode.
CALL METHOD c_oi_errors=>show_message
EXPORTING type = 'E'.
* Fill the template
IF NOT control IS INITIAL.
CALL METHOD control->get_document_proxy
EXPORTING document_type = document_type
IMPORTING document_proxy = proxy
retcode = retcode.
IF bds_instance IS INITIAL.
CREATE OBJECT bds_instance.
ENDIF.
wa_doc_signature-prop_name = 'DESCRIPTION'.
* The name of the template you created using transaction OAOR
* Class = SOFFICEINTEGRATION, Type = OT
wa_doc_signature-prop_value = 'ZDECL'.
APPEND wa_doc_signature TO doc_signature.
CASE save_ok.
WHEN 'EXIT'.
IF NOT proxy IS INITIAL.
CALL METHOD proxy->close_document.
FREE proxy.
ENDIF.
IF NOT link_server_decl IS INITIAL.
CALL METHOD link_server_decl->stop_link_server
IMPORTING retcode = retcode.
FREE link_server_decl.
ENDIF.
IF NOT control IS INITIAL.
CALL METHOD control->destroy_control
IMPORTING retcode = retcode.
FREE control.
ENDIF.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.