SAP Word97 Intergration
*&---------------------------------------------------------------------*
*& Report SAPRDEMOWORD97INTEGRATION *
*&---------------------------------------------------------------------*
INCLUDE rdemoword97integrationtop. DATA: factory TYPE REF TO i_oi_document_factory.
DATA: document TYPE REF TO i_oi_document_proxy.
DATA: link_server TYPE REF TO i_oi_link_server.
DATA: bds_instance TYPE REF TO cl_bds_document_set. DATA: retcode TYPE t_oi_ret_string,
document_type(80) VALUE soi_doctype_word97_document,
document_format(80) TYPE c.
DATA: documents TYPE document_list.
DATA: descr TYPE document_descr. DATA: data_table TYPE sbdst_content,
data_size TYPE i, doc_url TYPE t_url,
has_changed TYPE i,
delimiter(1) TYPE c VALUE'/',
data_type(64) TYPE c,
data_subtype(64) TYPE c,
document_mimetype TYPE bapicompon-mimetype. DATA: first_open VALUE '1'. DATA: BEGIN OF point_data,
proposal(40), lastname(30), comment(128),
END OF point_data.
DATA: points LIKE point_data OCCURS 0 WITH HEADER LINE. CLASS c_event_handler DEFINITION. PUBLIC SECTION.
CLASS-METHODS: close_event_handler
FOR EVENT on_close_document OF i_oi_document_proxy
IMPORTING document_proxy has_changed. CLASS-METHODS: custom_event_handler
FOR EVENT on_custom_event OF i_oi_document_proxy
IMPORTING document_proxy event_name param_count
param1 param2 param3. ENDCLASS. CLASS c_event_handler IMPLEMENTATION.
METHOD close_event_handler.
* FOR EVENT on_close_document OF c_oi_container_control
* IMPORTING document_proxy has_changed.
DATA: answer.
* if has_changed eq 1.
PERFORM save_document TABLES data_table
USING 'X' 'X'
CHANGING data_size document_proxy retcode.
open_document = false.
* endif.
ENDMETHOD. METHOD custom_event_handler.
* FOR EVENT on_custom_event OF i_oi_document_proxy
* IMPORTING document_proxy event_name param_count
* param1 param2 param3.
DATA: text(80).
CONCATENATE 'Word:' event_name 'fired with parameter:' param1
INTO text SEPARATED BY space. "#EC NOTEXT
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'Word 97 Integration Demo'(002)
txt1 = text
txt2 = space.
ENDMETHOD.
ENDCLASS. *&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
DATA: o1 TYPE REF TO c_event_handler.
CREATE OBJECT o1. SET PF-STATUS 'MAIN0100'.
SET TITLEBAR '001'. retcode = c_oi_errors=>ret_ok. IF bds_instance is initial.
CREATE OBJECT bds_instance.
ENDIF. IF factory is initial.
CALL METHOD c_oi_factory_creator=>get_document_factory
IMPORTING factory = factory
retcode = retcode.
IF retcode ne c_oi_errors=>ret_ok. EXIT. ENDIF. CALL METHOD factory->start_factory
EXPORTING r3_application_name =
'SAP Basis' "#EC NOTEXT
register_on_close_event = 'X'
register_on_custom_event = 'X'
IMPORTING retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'. CALL METHOD factory->get_link_server
IMPORTING link_server = link_server
retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'. CALL METHOD link_server->start_link_server
IMPORTING retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'. CALL METHOD factory->get_document_proxy
EXPORTING document_type = document_type
IMPORTING document_proxy = document
retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'. SET HANDLER c_event_handler=>close_event_handler FOR document.
SET HANDLER c_event_handler=>custom_event_handler FOR document.
* dynpro fields default
template = 'DEMOWORD97TEMPLATE'.
user = 'Ehre'. "#EC NOTEXT
company = 'SAP'. "#EC NOTEXT
macro = 'swap_color'. "#EC NOTEXT
event = 'event2'. "#EC NOTEXT
menubar = 'SAP Menu Bar'. "#EC NOTEXT
menu = 'SAP Menu'. "#EC NOTEXT
menuitem = 'Fire R/3 event'. "#EC NOTEXT
proposal = 'First Proposal'. "#EC NOTEXT
author = 'Ehre'. "#EC NOTEXT
comment = 'This is a comment'. "#EC NOTEXT PERFORM refresh_links. ENDIF. ENDMODULE. " STATUS_0100 OUTPUT *&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
CALL METHOD cl_gui_cfw=>dispatch. CASE fcode.
WHEN 'EXIT'. "Zurück
IF not document is initial.
PERFORM save_document TABLES data_table
USING 'X' 'X'
CHANGING data_size document retcode.
FREE document.
ENDIF.
IF not link_server is initial.
CALL METHOD link_server->stop_link_server
IMPORTING retcode = retcode.
FREE link_server.
ENDIF.
IF not factory is initial.
CALL METHOD factory->stop_factory IMPORTING retcode = retcode.
FREE factory.
ENDIF.
IF not bds_instance is initial.
FREE bds_instance.
ENDIF. LEAVE TO SCREEN 0. WHEN 'SELECT'.
IF not document is initial.
PERFORM save_document TABLES data_table
USING 'X' 'X'
CHANGING data_size document retcode.
ENDIF.
IF not factory is initial.
REFRESH documents.
descr-document_name =
'Office Integration Description'(do1).
descr-document_id = 'DEMOWORD97DOC'.
APPEND descr TO documents.
descr-document_name =
'Demo Document'(do2).
descr-document_id = 'DEMOWORD97DOC2'.
APPEND descr TO documents.
descr-document_name =
'Demo Document XP'(do3).
descr-document_id = 'DEMOWORDXPDOC2'.
APPEND descr TO documents. CLEAR doc_url.
PERFORM select_and_load_document
TABLES documents
USING 'Select Document'(sdo)
CHANGING document_type document_format doc_url. IF not doc_url is initial.
CALL METHOD document->open_document
EXPORTING document_url = doc_url
IMPORTING retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
* Document shall also be available in ITAB for respective operations:
CALL METHOD document->save_document_to_table
IMPORTING retcode = retcode
CHANGING document_table = data_table
document_size = data_size.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'. first_open = false.
open_document = true. CALL METHOD document->execute_macro
EXPORTING macro_string = 'R3UpdateTables' "#EC NOTEXT
IMPORTING retcode = retcode.
ELSE.
MESSAGE e010.
ENDIF.
ENDIF. WHEN 'OPEN'.
IF first_open = true.
first_open = false. REFRESH documents.
descr-document_name =
'Office Integration Description'(do1).
descr-document_id = 'DEMOWORD97DOC'.
APPEND descr TO documents. PERFORM select_and_load_document
TABLES documents
USING 'Select Document'(sdo)
CHANGING document_type document_format doc_url.
CALL METHOD document->open_document
EXPORTING document_url = doc_url
IMPORTING retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
* Document shall also be available in ITAB for respective operations:
CALL METHOD document->save_document_to_table
IMPORTING retcode = retcode
CHANGING document_table = data_table
document_size = data_size.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'. ELSE.
* open document stored in internal table data_table
DATA: is_closed TYPE i. CALL METHOD document->is_destroyed
IMPORTING ret_value = is_closed. IF is_closed is initial.
CALL METHOD document->close_document
EXPORTING do_save = 'X'
IMPORTING retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'. CALL METHOD document->save_document_to_table
IMPORTING retcode = retcode
CHANGING document_table = data_table[]
document_size = data_size.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
ENDIF. CALL METHOD document->release_document
IMPORTING retcode = retcode. CALL METHOD document->open_document_from_table
EXPORTING document_table = data_table[]
document_size = data_size
IMPORTING retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
ENDIF.
open_document = true.
CALL METHOD document->execute_macro
EXPORTING macro_string = 'R3UpdateTables' "#EC NOTEXT
IMPORTING retcode = retcode. WHEN 'REFRESH'.
IF not link_server is initial.
PERFORM refresh_links.
CALL METHOD document->execute_macro
EXPORTING macro_string = 'R3UpdateTables' "#EC NOTEXT
IMPORTING retcode = retcode.
ELSE.
MESSAGE e004.
ENDIF. WHEN 'SAVEAS'.
CALL METHOD document->save_as
EXPORTING file_name = ''
prompt_user = 'X'
IMPORTING retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'. WHEN 'CLOSE'.
PERFORM save_document TABLES data_table
USING ' ' 'X'
CHANGING data_size document retcode.
open_document = false. WHEN 'COPYLINK'.
IF not link_server is initial.
PERFORM refresh_links. CALL METHOD link_server->execute_copy_link_dialog
IMPORTING retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
ELSE.
MESSAGE e004.
ENDIF. WHEN 'INSTALL'.
DATA: wp_ref TYPE REF TO i_oi_word_processor_document. CHECK not document is initial and open_document = true.
CALL METHOD document->get_wordprocessor_interface
IMPORTING wp_interface = wp_ref
retcode = retcode.
IF retcode eq c_oi_errors=>ret_ok. CLEAR item_url.
CLEAR descr.
descr-document_id = template. PERFORM select_document
CHANGING descr-document_id
document_format
doc_url
document_mimetype.
item_url = doc_url.
CALL METHOD wp_ref->install_template
EXPORTING template_name = template
url = item_url
IMPORTING retcode = retcode.
FREE wp_ref.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
ELSE.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
ENDIF. WHEN 'EXECT'.
CHECK not document is initial and open_document = true.
CALL METHOD document->get_wordprocessor_interface
IMPORTING wp_interface = wp_ref
retcode = retcode.
IF retcode eq c_oi_errors=>ret_ok.
CALL METHOD wp_ref->set_template
EXPORTING template_name = template
IMPORTING retcode = retcode.
FREE wp_ref.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
ELSE.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
ENDIF. WHEN 'EXECS'.
CHECK not document is initial and open_document = true.
* straight ole automation
DATA: document_cntl_handle TYPE cntl_handle.
INCLUDE ole2incl.
DATA: ocharacters TYPE ole2_object,
orange TYPE ole2_object,
oreplacement TYPE ole2_object,
ofind TYPE ole2_object,
ofont TYPE ole2_object. DATA: char_count TYPE i,
char_position TYPE i,
old_search_string LIKE search,
string_found TYPE i,
color_index TYPE i. CALL METHOD document->get_document_handle
IMPORTING handle = document_cntl_handle
retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
IF old_search_string ne search.
* get number of document characters.
GET PROPERTY OF document_cntl_handle-obj
'characters' = ocharacters.
GET PROPERTY OF ocharacters 'count' = char_count.
char_position = 0.
old_search_string = search.
ENDIF.
* set range now
IF char_position >= char_count.
char_position = 0.
ENDIF.
CALL METHOD OF document_cntl_handle-obj 'Range' = orange
EXPORTING #1 = char_position #2 = char_count.
* search now
GET PROPERTY OF orange 'Find' = ofind.
* set property of ofind 'Text' = search.
* set property of ofind 'Forward' = true.
* call method of ofind 'ClearFormatting'.
* IF NOT REPLACE IS INITIAL.
* GET PROPERTY OF OFIND 'Replacement' = OREPLACEMENT.
* SET PROPERTY OF OREPLACEMENT 'Text' = REPLACE.
* CALL METHOD OF OREPLACEMENT 'ClearFormatting'.
* ENDIF.
IF not replace is initial.
* replace
* CALL METHOD OF ofind 'Execute'
* EXPORTING #1 = search "FindText
* #2 = false "MatchCase
* #3 = false "MatchWholeWord
* #4 = false "MatchWildCards
* #5 = false "MatchSoundsLike
* #6 = true "MatchAllWordForms
* #7 = true "Forward
* #8 = '1' "Wrap
* #9 = true
* #91 = replace
* #92 = '2'.
* char_position = 0.
*BEGIN - Japaneese characters get garbled refer note 878178.
DATA: is_available type i. CALL METHOD document->has_wordprocessor_interface
IMPORTING is_available = is_available
retcode = retcode. IF is_available = 1 . CALL METHOD document->get_wordprocessor_interface
IMPORTING wp_interface = wp_ref
retcode = retcode. IF RETCODE EQ C_OI_ERRORS=>RET_OK. CALL METHOD wp_ref->replace
EXPORTING replace_string = replace
search_string = search
pos = 'GLOBAL'
flag = 'ALL'. ENDIF. ENDIF.
*END - Japaneese characters get garbled refer note 878178. ELSE.
*search
CALL METHOD OF ofind 'Execute'
EXPORTING #1 = search "FindText
#2 = false "MatchCase
#3 = false "MatchWholeWord
#4 = false "MatchWildCards
#5 = false "MatchSoundsLike
#6 = true "MatchAllWordForms
#7 = true "Forward
#8 = '1' "Wrap
#9 = true.
GET PROPERTY OF ofind 'Found' = string_found.
IF string_found > 0.
GET PROPERTY OF orange 'Font' = ofont.
GET PROPERTY OF ofont 'ColorIndex' = color_index.
IF color_index ne 6.
color_index = 6.
ELSE.
color_index = 11.
ENDIF.
SET PROPERTY OF ofont 'ColorIndex' = color_index.
ENDIF.
GET PROPERTY OF orange 'End' = char_position.
ENDIF.
* CALL METHOD DOCUMENT->GET_WORDPROCESSOR_INTERFACE
* IMPORTING WP_INTERFACE = WP_REF
* RETCODE = RETCODE.
* IF RETCODE EQ C_OI_ERRORS=>RET_OK.
* IF REPLACE IS INITIAL.
* CALL METHOD WP_REF->SEARCH
* EXPORTING SEARCH_STRING = SEARCH
* POS = '1'
* FLAG = SPACE
* importing RETCODE = RETCODE.
* ELSE.
* CALL METHOD WP_REF->REPLACE
* EXPORTING SEARCH_STRING = SEARCH
* POS = '1'
* FLAG = SPACE
* REPLACE_STRING = REPLACE
* importing RETCODE = RETCODE.
* ENDIF.
* CALL METHOD C_OI_ERRORS=>SHOW_MESSAGE EXPORTING TYPE = 'E'.
* FREE WP_REF.
* ELSE.
* CALL METHOD C_OI_ERRORS=>SHOW_MESSAGE EXPORTING TYPE = 'E'.
* ENDIF. WHEN 'EXECM'.
CHECK not document is initial and open_document = true.
CALL METHOD document->execute_macro
EXPORTING macro_string = macro
IMPORTING retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'. WHEN 'CHANGE'.
CALL METHOD link_server->add_string_item
EXPORTING item_name = 'user'
item_value = user
IMPORTING retcode = retcode. CALL METHOD link_server->add_string_item
EXPORTING item_name = 'company'
item_value = company
IMPORTING retcode = retcode. WHEN 'ADDMBAR'.
CHECK not document is initial and open_document = true.
CALL METHOD document->add_menu_bar EXPORTING name = menubar
IMPORTING retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'. WHEN 'ADDMENU'.
CHECK not document is initial and open_document = true.
CALL METHOD document->add_menu_popup
EXPORTING name = menu
menu_bar_name = menubar
insert_before_popup = 1
IMPORTING retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'. WHEN 'ADDITEM'.
DATA: position(256).
CHECK not document is initial.
CALL METHOD document->add_menu_item EXPORTING
item_name = menuitem
menu_bar_name = menubar
menu_popup_name = menu
insert_before_item = 0
item_macro = event
IMPORTING retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'. * just for straight ole automation
* data: document_cntl_handle type cntl_handle.
* include ole2incl.
* CALL METHOD DOCUMENT->GET_DOCUMENT_HANDLE
* IMPORTING HANDLE = DOCUMENT_CNTL_HANDLE
* RETCODE = RETCODE.
* CALL METHOD C_OI_ERRORS=>SHOW_MESSAGE EXPORTING TYPE = 'E'.
* CALL METHOD OF DOCUMENT_CNTL_HANDLE-OBJ .... ENDCASE. ENDMODULE. " USER_COMMAND_0100 INPUT *---------------------------------------------------------------------*
* FORM REFRESH_LINKS *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
FORM refresh_links.
IF not link_server is initial. CALL METHOD link_server->add_string_item
EXPORTING item_name = 'Project Name' "#EC NOTEXT
item_value = project_name
no_flush = 'X'
IMPORTING retcode = retcode. CALL METHOD link_server->add_string_item
EXPORTING item_name = 'Topic' "#EC NOTEXT
item_value = project_topic
no_flush = 'X'
IMPORTING retcode = retcode. CALL METHOD link_server->add_string_item
EXPORTING item_name = 'Department' "#EC NOTEXT
item_value = department
no_flush = 'X'
IMPORTING retcode = retcode. CALL METHOD link_server->add_string_item
EXPORTING item_name = 'Author' "#EC NOTEXT
item_value = author
no_flush = 'X'
IMPORTING retcode = retcode. CALL METHOD link_server->add_string_item
EXPORTING item_name = 'Distribution List' "#EC NOTEXT
item_value = distr_list
no_flush = 'X'
IMPORTING retcode = retcode. CALL METHOD link_server->add_string_item
EXPORTING item_name = 'User' "#EC NOTEXT
item_value = user
no_flush = 'X'
IMPORTING retcode = retcode. CALL METHOD link_server->add_string_item
EXPORTING item_name = 'Company' "#EC NOTEXT
item_value = company
no_flush = 'X'
IMPORTING retcode = retcode. DATA: int TYPE i VALUE 100.
CALL METHOD link_server->add_string_item
EXPORTING item_name = 'Number' "#EC NOTEXT
item_value = int
no_flush = 'X'
IMPORTING retcode = retcode. DATA: date TYPE d VALUE '19961231'.
CALL METHOD link_server->add_string_item
EXPORTING item_name = 'Date' "#EC NOTEXT
item_value = date
no_flush = ' '
IMPORTING retcode = retcode. REFRESH points.
points-proposal = proposal.
points-lastname = author.
points-comment = comment.
APPEND points.
points-proposal = 'Second Proposal'.
points-lastname = 'Neuendorf'. "#EC NOTEXT
points-comment = '017299'.
APPEND points.
points-proposal = 'Third Proposal'.
points-lastname = 'Kolb'. "#EC NOTEXT
points-comment = '004711'.
APPEND points.
points-proposal = 'Conclusion'.
points-lastname = 'Kretschmer'. "#EC NOTEXT
points-comment = '000001'.
APPEND points. CALL METHOD link_server->add_table_item2
EXPORTING item_name = 'Agenda' "#EC NOTEXT
IMPORTING retcode = retcode
CHANGING data_table = points[]. CLEAR item_url.
CLEAR descr.
descr-document_name = 'RTF Logo'. "#EC NOTEXT
descr-document_id = 'DEMOWORD97RTF1'. "#EC NOTEXT PERFORM select_document
CHANGING descr-document_id
document_format
doc_url
document_mimetype.
item_url = doc_url.
SPLIT document_mimetype AT delimiter INTO data_type data_subtype.
CALL METHOD link_server->add_binary_item
EXPORTING item_name = 'RTF Item' "#EC NOTEXT
table_url = item_url
data_type = soi_type_application
data_subtype = soi_subtype_rtf
IMPORTING retcode = retcode. CLEAR: item_url.
CLEAR descr.
descr-document_name = 'SAP LOGO'.
descr-document_id = 'DEMOWORD97SAPLOGO'. PERFORM select_document
CHANGING descr-document_id
document_format
doc_url
document_mimetype.
item_url = doc_url.
SPLIT document_mimetype AT delimiter INTO data_type data_subtype.
CALL METHOD link_server->add_binary_item
EXPORTING item_name = 'SAPLogo'
item_title = 'SAP Logo' "#EC NOTEXT
table_url = item_url
data_type = soi_type_image
data_subtype = soi_subtype_gif
IMPORTING retcode = retcode. ENDIF.
ENDFORM. *---------------------------------------------------------------------*
* FORM SAVE_DOCUMENT *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
* --> DOC_TABLE *
* --> DO_ASK *
* --> DO_RELEASE *
* --> DOC_SIZE *
* --> DOCUMENT *
* --> TO *
* --> I_OI_DOCUMENT_PROXY *
* --> RETCODE *
*---------------------------------------------------------------------*
FORM save_document TABLES doc_table TYPE table
USING do_ask TYPE c do_release TYPE c
CHANGING doc_size TYPE i
document TYPE REF TO i_oi_document_proxy
retcode TYPE t_oi_ret_string. DATA: is_closed TYPE i, answer TYPE c, has_changed TYPE i. CALL METHOD document->is_destroyed IMPORTING ret_value = is_closed. IF is_closed is initial.
CALL METHOD document->close_document
EXPORTING do_save = 'X'
IMPORTING has_changed = has_changed
retcode = retcode.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
ENDIF. IF not has_changed is initial.
IF not do_ask is initial.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'Office Integration Demo'(oid)
text_question = 'Save Document?'(sav)
display_cancel_button = ' '
IMPORTING
answer = answer.
ELSE.
answer = '1'.
ENDIF. IF answer eq '1'.
CALL METHOD document->save_document_to_table
IMPORTING retcode = retcode
CHANGING document_table = doc_table[]
document_size = doc_size.
CALL METHOD c_oi_errors=>show_message EXPORTING type = 'E'.
ENDIF.
ENDIF. IF not do_release is initial.
CALL METHOD document->release_document
IMPORTING retcode = retcode.
ENDIF.
ENDFORM.
*=======================================================================
*=======================================================================
FORM select_document
CHANGING document_id TYPE c
document_format TYPE c
doc_url TYPE t_url
document_mimetype TYPE bapicompon-mimetype. * Tables and WAs:
DATA: doc_signature TYPE sbdst_signature,
wa_doc_signature LIKE LINE OF doc_signature,
doc_components TYPE sbdst_components,
wa_doc_components LIKE LINE OF doc_components,
doc_uris TYPE sbdst_uri,
wa_doc_uris LIKE LINE OF doc_uris.
* IDs:
DATA: doc_classname TYPE sbdst_classname VALUE 'SOFFICEINTEGRATION',
doc_classtype TYPE sbdst_classtype VALUE 'OT',
doc_object_key TYPE sbdst_object_key VALUE 'SOFFICEINTEGRATION',
doc_mimetype LIKE bapicompon-mimetype.
*----------------------------------------------------------------------- CLEAR: wa_doc_signature, wa_doc_components, wa_doc_uris.
REFRESH: doc_signature, doc_components, doc_uris. wa_doc_signature-prop_name = 'DESCRIPTION'.
wa_doc_signature-prop_value = descr-document_id.
APPEND wa_doc_signature TO doc_signature. CALL METHOD bds_instance->get_info
EXPORTING classname = doc_classname
classtype = doc_classtype
object_key = doc_object_key
CHANGING components = doc_components
signature = doc_signature
EXCEPTIONS nothing_found = 1
error_kpro = 2
internal_error = 3
parameter_error = 4
not_authorized = 5
not_allowed = 6.
IF sy-subrc ne 0 and sy-subrc ne 1.
MESSAGE e016.
ENDIF.
IF sy-subrc = 1.
MESSAGE e017.
ENDIF. CALL METHOD bds_instance->get_with_url
EXPORTING classname = doc_classname
classtype = doc_classtype
object_key = doc_object_key
CHANGING uris = doc_uris
signature = doc_signature
EXCEPTIONS nothing_found = 1
error_kpro = 2
internal_error = 3
parameter_error = 4
not_authorized = 5
not_allowed = 6.
IF sy-subrc ne 0 and sy-subrc ne 1.
MESSAGE e016.
ENDIF.
IF sy-subrc = 1.
MESSAGE e017.
ENDIF. READ TABLE doc_components INTO wa_doc_components INDEX 1.
READ TABLE doc_uris INTO wa_doc_uris INDEX 1.
doc_mimetype = wa_doc_components-mimetype.
doc_url = wa_doc_uris-uri. CASE doc_mimetype.
WHEN 'application/x-rtf' OR 'text/rtf'.
document_format = soi_docformat_rtf.
WHEN 'application/x-oleobject'.
document_format = soi_docformat_compound.
WHEN 'text/plain'.
document_format = soi_docformat_text.
WHEN OTHERS.
document_format = soi_docformat_native.
ENDCASE. ENDFORM.
*=======================================================================
*=======================================================================
FORM select_and_load_document
TABLES documents
USING dialog_title TYPE c
CHANGING document_type TYPE c
document_format TYPE c
doc_url TYPE t_url.
* Tables and WAs:
DATA: doc_signature TYPE sbdst_signature,
wa_doc_signature LIKE LINE OF doc_signature,
doc_components TYPE sbdst_components,
wa_doc_components LIKE LINE OF doc_components,
doc_properties TYPE sbdst_properties,
wa_doc_properties LIKE LINE OF doc_properties,
doc_uris TYPE sbdst_uri,
wa_doc_uris LIKE LINE OF doc_uris.
* IDs:
DATA: doc_classname TYPE sbdst_classname VALUE 'SOFFICEINTEGRATION',
doc_classtype TYPE sbdst_classtype VALUE 'OT',
doc_object_key TYPE sbdst_object_key VALUE 'SOFFICEINTEGRATION',
doc_mimetype LIKE bapicompon-mimetype.
*----------------------------------------------------------------------- DATA: field_desc LIKE rsvbfidesc OCCURS 1 WITH HEADER LINE.
DATA: l_nr LIKE sy-tabix. REFRESH field_desc.
field_desc-fieldnum = 1.
field_desc-display = 'X'.
APPEND field_desc. l_nr = 0.
CALL FUNCTION 'RS_VALUES_BOX'
EXPORTING
left_upper_col = 5
left_upper_row = 5
pagesize = 10
title = dialog_title
IMPORTING
linenumber = l_nr
TABLES
field_desc = field_desc
value_tab = documents
EXCEPTIONS
OTHERS = 1. IF sy-subrc eq 0 and l_nr ne 0.
READ TABLE documents INDEX l_nr INTO descr.
IF sy-subrc eq 0.
CLEAR: wa_doc_signature, wa_doc_components, wa_doc_uris.
REFRESH: doc_signature, doc_components, doc_uris. wa_doc_signature-prop_name = 'DESCRIPTION'.
wa_doc_signature-prop_value = descr-document_id.
APPEND wa_doc_signature TO doc_signature. CALL METHOD bds_instance->get_info
EXPORTING classname = doc_classname
classtype = doc_classtype
object_key = doc_object_key
CHANGING components = doc_components
signature = doc_signature
EXCEPTIONS nothing_found = 1
error_kpro = 2
internal_error = 3
parameter_error = 4
not_authorized = 5
not_allowed = 6.
IF sy-subrc ne 0 and sy-subrc ne 1.
MESSAGE e016.
ENDIF.
IF sy-subrc = 1.
MESSAGE e017.
ENDIF. CALL METHOD bds_instance->get_with_url
EXPORTING classname = doc_classname
classtype = doc_classtype
object_key = doc_object_key
CHANGING uris = doc_uris
signature = doc_signature
EXCEPTIONS nothing_found = 1
error_kpro = 2
internal_error = 3
parameter_error = 4
not_authorized = 5
not_allowed = 6.
IF sy-subrc ne 0 and sy-subrc ne 1.
MESSAGE e016.
ENDIF.
IF sy-subrc = 1.
MESSAGE e017.
ENDIF. READ TABLE doc_components INTO wa_doc_components INDEX 1.
READ TABLE doc_uris INTO wa_doc_uris INDEX 1.
doc_mimetype = wa_doc_components-mimetype.
document_mimetype = doc_mimetype.
doc_url = wa_doc_uris-uri. CASE doc_mimetype.
WHEN 'application/x-rtf' OR 'text/rtf'.
document_format = soi_docformat_rtf.
WHEN 'application/x-oleobject'.
document_format = soi_docformat_compound.
WHEN 'text/plain'.
document_format = soi_docformat_text.
WHEN OTHERS.
document_format = soi_docformat_native.
ENDCASE. ENDIF.
ENDIF. ENDFORM.
*=======================================================================
*----------------------------------------------------------------------*
* INCLUDE RDEMOWORD97INTEGRATIONTOP *
*----------------------------------------------------------------------*
REPORT SAPRDEMOWORD97INTEGRATION MESSAGE-ID DEMOOFFICEINTEGRATIO. CONSTANTS: TRUE VALUE 1, FALSE VALUE 0. TYPES: BEGIN OF DOCUMENT_DESCR,
DOCUMENT_NAME(40), DOCUMENT_ID(64),
END OF DOCUMENT_DESCR. TYPES: DOCUMENT_LIST TYPE DOCUMENT_DESCR OCCURS 0. TYPES: T_URL LIKE BAPIURI-URI. * dynpro 100 fields:
DATA: TEMPLATE(30),SEARCH(19), USER(19), COMPANY(19),
MACRO(19), MENU(19), MENUITEM(19),MENUBAR(19), EVENT(19).
DATA: REPLACE LIKE SEARCH. DATA: CURRENTMENUBAR LIKE MENUBAR, CURRENTMENU LIKE MENU,
OPEN_DOCUMENT(1).
DATA: ITEM_URL TYPE T_URL. DATA: PROJECT_NAME(80) VALUE 'Office Integration', "#EC NOTEXT
PROJECT_TOPIC(80) VALUE 'Word97 Integration', "#EC NOTEXT
DEPARTMENT(40) VALUE 'SAP AG', "#EC NOTEXT
AUTHOR(30) VALUE 'Ehre', "#EC NOTEXT
DISTR_LIST(30) VALUE 'SAP01',
PROPOSAL(40), COMMENT(128). SET SCREEN 100. TYPE-POOLS: SBDST. INCLUDE OFFICEINTEGRATIONINCLUDE. DATA: FCODE LIKE SY-UCOMM.
*----------------------------------------------------------------------*
* INCLUDE OFFICEINTEGRATIONINCLUDE *
*----------------------------------------------------------------------* TYPE-POOLS: SOI.
TYPE-POOLS: CNDP. CLASS C_OI_ERRORS DEFINITION LOAD.
CLASS CL_GUI_CFW DEFINITION LOAD. INCLUDE OFFICEINTEGRATIONINTERFACES.
INCLUDE OFFICEINTEGRATIONOLECREATOR.
INCLUDE OFFICEINTEGRATIONOLECLASSESIMP.
*----------------------------------------------------------------------*
* INCLUDE OFFICEINTEGRATIONINTERFACES *
*----------------------------------------------------------------------* TYPES: T_OI_RET_STRING TYPE SOI_RET_STRING,
T_OI_CUSTOM_PARAM TYPE SOI_CUSTOM_PARAM.
TYPES: T_OI_MESSAGE_PARAM(50) TYPE C.
TYPES: T_OI_PROXY_ERROR_CODE TYPE I. TYPES: T_OI_FIELDS_TABLE TYPE STANDARD TABLE OF RFC_FIELDS.
TYPES: T_OI_PROPERTIES_TABLE TYPE STANDARD TABLE OF DPPROPS. CLASS CL_GUI_CFW DEFINITION LOAD. INTERFACE I_OI_DOCUMENT_FACTORY.
CONSTANTS:
DOCUMENT_FORMAT_COMPOUND(3) TYPE C VALUE 'OLE',
DOCUMENT_FORMAT_NATIVE(6) TYPE C VALUE 'NATIVE',
DOCUMENT_FORMAT_RTF(3) TYPE C VALUE 'RTF',
DOCUMENT_FORMAT_TEXT(4) TYPE C VALUE 'TEXT'. METHODS: START_FACTORY
IMPORTING R3_APPLICATION_NAME TYPE C
VALUE(REP_ID) TYPE SY-REPID DEFAULT SY-REPID
VALUE(DYNPRO_NR) TYPE SY-DYNNR
DEFAULT SY-DYNNR
REGISTER_ON_CLOSE_EVENT TYPE C DEFAULT ' '
REGISTER_ON_CUSTOM_EVENT TYPE C DEFAULT ' '
VALUE(NO_FLUSH) TYPE C DEFAULT ' '
EXPORTING RETCODE TYPE SOI_RET_STRING
ERROR TYPE REF TO I_OI_ERROR. METHODS: STOP_FACTORY
IMPORTING EXIT_CONTROL_MANAGER TYPE C DEFAULT ' '
VALUE(NO_FLUSH) TYPE C DEFAULT ' '
EXPORTING RETCODE TYPE SOI_RET_STRING
ERROR TYPE REF TO I_OI_ERROR. METHODS: LINK_FACTORY
IMPORTING VALUE(REP_ID) TYPE SY-REPID
VALUE(DYNPRO_NR) TYPE SY-DYNNR
VALUE(NO_FLUSH) TYPE C DEFAULT ' '
EXPORTING RETCODE TYPE SOI_RET_STRING
ERROR TYPE REF TO I_OI_ERROR. METHODS: GET_DOCUMENT_PROXY
IMPORTING DOCUMENT_TYPE TYPE C
DOCUMENT_FORMAT TYPE C DEFAULT 'NATIVE'
REGISTER_CONTAINER TYPE C DEFAULT ' '
VALUE(NO_FLUSH) TYPE C DEFAULT ' '
EXPORTING DOCUMENT_PROXY TYPE REF TO I_OI_DOCUMENT_PROXY
RETCODE TYPE SOI_RET_STRING
ERROR TYPE REF TO I_OI_ERROR. METHODS: GET_LINK_SERVER
IMPORTING SERVER_TYPE TYPE C DEFAULT ' '
VALUE(NO_FLUSH) TYPE C DEFAULT ' '
EXPORTING LINK_SERVER TYPE REF TO I_OI_LINK_SERVER
RETCODE TYPE SOI_RET_STRING
ERROR TYPE REF TO I_OI_ERROR. METHODS: GET_TABLE_COLLECTION
IMPORTING VALUE(NO_FLUSH) TYPE C DEFAULT ' '
EXPORTING TABLE_COLLECTION TYPE
REF TO I_OI_TABLE_COLLECTION
RETCODE TYPE SOI_RET_STRING
ERROR TYPE REF TO I_OI_ERROR. METHODS: GET_REGISTERED_DOC_TYPES
IMPORTING INTERFACE_TYPE TYPE C DEFAULT ' '
VALUE(NO_FLUSH) TYPE C DEFAULT ' '
EXPORTING DESCR_LIST TYPE SOI_DOCUMENT_TYPE_DESCR_LIST
RETCODE TYPE SOI_RET_STRING
ERROR TYPE REF TO I_OI_ERROR. METHODS: CHECK_REGISTERED_DOC_TYPES
IMPORTING VALUE(NO_FLUSH) TYPE C DEFAULT ' '
EXPORTING ERROR TYPE REF TO I_OI_ERROR
CHANGING DESCR_LIST TYPE SOI_DOCUMENT_TYPE_DESCR_LIST
RETCODE TYPE SOI_RET_STRING.
ENDINTERFACE.
*----------------------------------------------------------------------* CLASS C_OI_OLE_CONTROL_CREATOR DEFINITION.
PUBLIC SECTION.
CLASS-METHODS: GET_OLE_CONTAINER_CONTROL
EXPORTING CONTROL TYPE REF TO I_OI_OLE_CONTAINER_CONTROL
RETCODE TYPE SOI_RET_STRING
ERROR TYPE REF TO I_OI_ERROR.
ENDCLASS. CLASS C_OI_FACTORY_CREATOR DEFINITION.
PUBLIC SECTION.
CONSTANTS:
FACTORY_TYPE_OLE(3) TYPE C VALUE 'OLE',
FACTORY_TYPE_PORTABLE(8) TYPE C VALUE 'PORTABLE'. CLASS-METHODS: GET_DOCUMENT_FACTORY
IMPORTING FACTORY_TYPE TYPE C DEFAULT 'PORTABLE'
EXPORTING FACTORY TYPE REF TO I_OI_DOCUMENT_FACTORY
RETCODE TYPE SOI_RET_STRING
ERROR TYPE REF TO I_OI_ERROR.
ENDCLASS. CLASS C_OI_OLE_DOCUMENT_FACTORY DEFINITION.
PUBLIC SECTION.
INTERFACES: I_OI_DOCUMENT_FACTORY. PRIVATE SECTION.
DATA: CONTAINER_CONTROL TYPE REF TO I_OI_OLE_CONTAINER_CONTROL.
ENDCLASS.
*----------------------------------------------------------------------*
* INCLUDE OFFICEINTEGRATIONIMPL *
*----------------------------------------------------------------------* CLASS c_oi_factory_creator IMPLEMENTATION.
METHOD get_document_factory.
* IMPORTING factory_type TYPE c
* EXPORTING factory TYPE REF TO i_oi_document_factory
* retcode TYPE c.
DATA: olefactoryobj TYPE REF TO c_oi_ole_document_factory.
DATA: has_activex,has_javabean. * DATA: WINSYS TYPE OLELOAD-WINSYS.
* determine window system
* CALL FUNCTION 'WS_QUERY'
* EXPORTING QUERY = 'WS'
* IMPORTING RETURN = WINSYS.
* CASE WINSYS.
* WHEN 'WN32'.
* CREATE OBJECT OLEFACTORYOBJ.
* FACTORY = OLEFACTORYOBJ.
* RETCODE = C_OI_ERRORS=>RET_OK.
* WHEN 'JAVA'.
* CREATE OBJECT OLEFACTORYOBJ.
* FACTORY = OLEFACTORYOBJ.
* RETCODE = C_OI_ERRORS=>RET_OK.
* WHEN 'PLAT'.
* CREATE OBJECT OLEFACTORYOBJ.
* FACTORY = OLEFACTORYOBJ.
* RETCODE = C_OI_ERRORS=>RET_OK.
* WHEN OTHERS.
* RETCODE = C_OI_ERRORS=>RET_ERROR.
* ENDCASE. CALL FUNCTION 'GUI_HAS_ACTIVEX'
IMPORTING
return = has_activex. CALL FUNCTION 'GUI_HAS_JAVABEANS'
IMPORTING
return = has_javabean. IF ( NOT has_activex IS INITIAL ) OR
( NOT has_javabean IS INITIAL ).
CREATE OBJECT olefactoryobj.
factory = olefactoryobj.
retcode = c_oi_errors=>ret_ok.
ELSE.
retcode = c_oi_errors=>ret_error.
ENDIF. CALL METHOD c_oi_errors=>create_error_for_retcode
EXPORTING retcode = retcode
no_flush = ' '
IMPORTING error = error.
ENDMETHOD.
ENDCLASS. CLASS c_oi_ole_control_creator IMPLEMENTATION.
METHOD get_ole_container_control.
* EXPORTING control TYPE REF TO i_oi_container_control
* retcode TYPE t_oi_ret_string.
DATA: l_control TYPE REF TO i_oi_container_control. CALL METHOD c_oi_container_control_creator=>get_container_control
IMPORTING control = l_control
retcode = retcode
error = error.
control ?= l_control. ENDMETHOD.
ENDCLASS. CLASS c_oi_ole_document_factory IMPLEMENTATION.
METHOD i_oi_document_factory~start_factory.
* IMPORTING r3_application_name TYPE c
* value(rep_id) type sy-repid default sy-repid
* value(dynpro_nr) type sy-dynnr
* default sy-dynnr
* register_on_close_event type c default ' '
* register_on_custom_event type c default ' '
* RETURNING value(retcode) TYPE c.
IF container_control IS INITIAL.
CALL METHOD c_oi_ole_control_creator=>get_ole_container_control
IMPORTING control = container_control
retcode = retcode.
IF retcode EQ c_oi_errors=>ret_ok.
CALL METHOD container_control->init_control
EXPORTING r3_application_name = r3_application_name
inplace_mode = 0
rep_id = rep_id
shell_style = cl_gui_control=>ws_child
dynpro_nr = dynpro_nr
parent = cl_gui_container=>default_screen
register_on_close_event = register_on_close_event
register_on_custom_event =
register_on_custom_event
no_flush = no_flush
IMPORTING retcode = retcode
error = error.
ELSE.
CALL METHOD c_oi_errors=>create_error_for_retcode
EXPORTING retcode = retcode
no_flush = no_flush
IMPORTING error = error.
ENDIF.
ELSE. " already created
retcode = c_oi_errors=>ret_ok.
CALL METHOD c_oi_errors=>create_error_for_retcode
EXPORTING retcode = retcode
no_flush = no_flush
IMPORTING error = error.
ENDIF.
ENDMETHOD. METHOD i_oi_document_factory~stop_factory.
* IMPORTING exit_control_manager TYPE c DEFAULT 'X'
* RETURNING value(retcode) TYPE c.
IF NOT container_control IS INITIAL.
CALL METHOD container_control->destroy_control
EXPORTING no_flush = no_flush
IMPORTING retcode = retcode
error = error.
ELSE. " already destroyed
retcode = c_oi_errors=>ret_ok.
CALL METHOD c_oi_errors=>create_error_for_retcode
EXPORTING retcode = retcode
no_flush = no_flush
IMPORTING error = error.
ENDIF.
ENDMETHOD. METHOD i_oi_document_factory~link_factory.
* IMPORTING value(rep_id) LIKE sy-repid
* value(dynpro_nr) LIKE sy-dynnr
* RETURNING value(retcode) TYPE t_oi_ret_string.
IF NOT container_control IS INITIAL.
CALL METHOD container_control->link_control
EXPORTING rep_id = rep_id
dynpro_nr = dynpro_nr
no_flush = no_flush
IMPORTING retcode = retcode
error = error.
ELSE.
retcode = c_oi_errors=>ret_object_not_initialized.
CALL METHOD c_oi_errors=>create_error_for_retcode
EXPORTING retcode = retcode
no_flush = no_flush
IMPORTING error = error.
ENDIF.
ENDMETHOD. METHOD i_oi_document_factory~get_document_proxy.
* IMPORTING document_type TYPE c
* EXPORTING document_proxy TYPE
* REF TO i_oi_document_proxy
* retcode TYPE c.
IF NOT container_control IS INITIAL.
CALL METHOD container_control->get_document_proxy
EXPORTING document_type = document_type
document_format = document_format
register_container = register_container
no_flush = no_flush
IMPORTING document_proxy = document_proxy
retcode = retcode
error = error.
ELSE.
retcode = c_oi_errors=>ret_object_not_initialized.
CALL METHOD c_oi_errors=>create_error_for_retcode
EXPORTING retcode = retcode
no_flush = no_flush
IMPORTING error = error.
ENDIF.
ENDMETHOD. METHOD i_oi_document_factory~get_link_server.
* IMPORTING server_type TYPE c DEFAULT ' '
* EXPORTING link_server TYPE REF TO i_oi_link_server
* retcode TYPE t_oi_ret_string.
IF NOT container_control IS INITIAL.
CALL METHOD container_control->get_link_server
EXPORTING server_type = server_type
no_flush = no_flush
IMPORTING link_server = link_server
retcode = retcode
error = error.
ELSE.
retcode = c_oi_errors=>ret_object_not_initialized.
CALL METHOD c_oi_errors=>create_error_for_retcode
EXPORTING retcode = retcode
no_flush = no_flush
IMPORTING error = error.
ENDIF.
ENDMETHOD. METHOD i_oi_document_factory~get_table_collection.
* EXPORTING table_collection TYPE
* REF TO i_oi_table_collection
* retcode TYPE t_oi_ret_string.
IF NOT container_control IS INITIAL.
CALL METHOD container_control->get_table_collection
EXPORTING no_flush = no_flush
IMPORTING table_collection = table_collection
retcode = retcode
error = error.
ELSE.
retcode = c_oi_errors=>ret_object_not_initialized.
CALL METHOD c_oi_errors=>create_error_for_retcode
EXPORTING retcode = retcode
no_flush = no_flush
IMPORTING error = error.
ENDIF.
ENDMETHOD. METHOD i_oi_document_factory~get_registered_doc_types.
* IMPORTING interface_type TYPE c DEFAULT ' '
* EXPORTING descr_list TYPE t_oi_interface_descr_list
* retcode TYPE t_oi_ret_string.
IF NOT container_control IS INITIAL.
CALL METHOD container_control->get_registered_doc_types
EXPORTING interface_type = interface_type
no_flush = no_flush
IMPORTING descr_list = descr_list
retcode = retcode
error = error.
ELSE.
retcode = c_oi_errors=>ret_object_not_initialized.
CALL METHOD c_oi_errors=>create_error_for_retcode
EXPORTING retcode = retcode
no_flush = no_flush
IMPORTING error = error.
ENDIF.
ENDMETHOD. METHOD i_oi_document_factory~check_registered_doc_types.
* CHANGING descr_list TYPE t_oi_interface_descr_list
* retcode TYPE t_oi_ret_string.
IF NOT container_control IS INITIAL.
CALL METHOD container_control->check_registered_doc_types
EXPORTING no_flush = no_flush
IMPORTING error = error
CHANGING descr_list = descr_list
retcode = retcode.
ELSE.
retcode = c_oi_errors=>ret_object_not_initialized.
CALL METHOD c_oi_errors=>create_error_for_retcode
EXPORTING retcode = retcode
no_flush = no_flush
IMPORTING error = error.
ENDIF.
ENDMETHOD.
ENDCLASS.
***INCLUDE OLE2INCL.
TYPE-POOLS OLE2 .
SAP Word97 Intergration的更多相关文章
- SAP PI入门
本教程的目的是让读者理解:SAP Process Intergration(以下简称SAP PI)是什么.我们不需要探究课题的本质,但是会讨论SAP PI的架构和不同特点.本文只会覆盖到PI的基本特点 ...
- SAP Office Excel Intergration
*&---------------------------------------------------------------------* *& Report DEMOEXCEL ...
- SAP CRM 性能小技巧
导言 本页面打算收集SAP CRM实施中可以用于避免性能问题的注意事项,重要的事项会由图标标识. 如果你有其他的技巧想要说出来,别犹豫! 性能注意事项 通用 缓存读取类访问,特别是在性能关键的地方,比 ...
- SAP CRM 树视图(TREE VIEW)
树视图可以用于表示数据的层次. 例如:SAP CRM中的组织结构数据可以表示为树视图. 在SAP CRM Web UI的术语当中,没有像表视图(table view)或者表单视图(form view) ...
- SAP CRM 显示消息/在消息中进行导航
向用户展示消息,在任何软件中都是十分重要的. 在SAP CRM WEB UI中展示消息,不是一项很难的任务,只需要创建消息并在之后调用方法来显示它 消息类和消息号: 我在SE91中创建了如下的消息类和 ...
- BPM与 SAP & Oracle EBS集成解决方案分享
一.需求分析 SAP和Oracle EBS都是作为全球顶级的的ERP产 品,得到了众多客户的青睐.然而由于系统庞大.价格昂贵以及定位不同,客户在实施过程中经常会面临以下困惑: 1.SAP如何实现&qu ...
- 【SAP业务模式】之ICS(四):组织单元的配置
SAP的ICS业务后台配置主要有以下几个配置点: 1.组织单元的配置(公司代码.销售组织.工厂.采购组织等): 2.主数据的部分: 3.订单和开票的定价过程: 4.开票输出类型: 5.公司间发票的配置 ...
- 【SAP业务模式】之ICS(三):前台操作
本片博文开始讲解SAP前台是如何实现ICS业务模式的. 一.VA01开立销售订单 我这里为了方便,创建了一个订单类型ZMIV作为公司间销售的订单类型,其实公司间销售订单跟标准的销售订单是一致的.同时, ...
- 【SAP业务模式】之ICS(一):业务详述
PS:本专题系列讲述如何在SAP系统中实现ICS的业务模式,本系列博文系原创,如要转载引用,请保持原文一致并注明出处! SAP系统自身功能非常强大,支持多种业务模式,通过前台后台的配置就可以实现多种效 ...
随机推荐
- STL空间分配器源码分析(一)
一.摘要 STL的空间分配器(allocator)定义于命名空间std内,主要为STL容器提供内存的分配和释放.对象的构造和析构的统一管理.空间分配器的实现细节,对于容器来说完全透明,容器不需关注内存 ...
- Junit单元测试:
* 测试分类: 1. 黑盒测试:不需要写代码,给输入值,看程序是否能够输出期望的值. 2. 白盒测试:需要写代码的.关注程序具体的执行流程. * Junit使用:白盒测试 * 步骤: 1. 定义一个测 ...
- Android Studio 的蓝牙串口通信(附Demo源码下载)
根据相关代码制作了一个开源依赖包,将以下所有的代码进行打包,直接调用即可完成所有的操作.详细说明地址如下,如果觉得有用可以GIthub点个Star支持一下: 项目官网 Kotlin版本说明文档 Jav ...
- 通过Nginx TCP反向代理实现Apache Doris负载均衡
概述 Nginx能够实现HTTP.HTTPS协议的负载均衡,也能够实现TCP协议的负载均衡.那么,问题来了,可不可以通过Nginx实现Apache Doris数据库的负载均衡呢?答案是:可以.接下来, ...
- python学习番外篇——字符串的数据类型转换及内置方法
目录 字符串的数据类型转换及内置方法 类型转换 内置方法 优先掌握的方法 需要掌握的方法 strip, lstrip, rstrip lower, upper, islower, isupper 插入 ...
- 初次接触Java感受
认真开始研究了idea后端开发环境 感触很深,突然觉得自己不能再一天的颓废下去,认真找点事情做一做,毕竟自己还是一张白纸,趁着自己年纪轻轻 经过一周的摸索自己努力了还不够,心里多么渴望自己身边的人能够 ...
- 深度长文:深入理解Ceph存储架构
点击上方"开源Linux",选择"设为星标" 回复"学习"获取独家整理的学习资料! 本文是一篇Ceph存储架构技术文章,内容深入到每个存储特 ...
- Nginx实战|Nginx健康检查
开源Linux 长按二维码加关注~ 上一篇:盘点提高国内访问Github的速度的9种方案 服务治理的一个重要任务是感知服务节点变更,完成服务自动注册及异常节点的自动摘除.这就需要服务治理平台能够:及时 ...
- JZ008和大于等于target的最短数组
title: 长度最小的子数组 题目描述 题目链接:长度最小的子数组.剑指offer008 解题思路 简单滑动窗口题目,需要知道: 窗口左指针移动条件:窗口内总和 ≥ target 即可以不断移动窗口 ...
- mapboxgl 中插值表达式的应用场景
目录 一.前言 二.语法 三.对地图颜色进行拉伸渲染 1. 热力图 2. 轨迹图 2. 模型网格渲染 四.随着地图缩放对图形属性进行插值 五.interpolate的高阶用法 六.总结 一.前言 in ...